I had created an editbox and it was working just fine but after I added a custom WndProc for it, the text "my edit" is not visible and won't take focus when clicked.
HWND handle=CreateWindowExW(0,L"Edit",L"my edit",WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_CENTER | ES_MULTILINE | ES_AUTOVSCROLL,
0,0,200,200,window.handle,0,GetModuleHandle(NULL),0);
Until here it was working just fine
After I set this window procedure, the edit control is not working anymore as expected
SetWindowLongPtr(handle,GWLP_WNDPROC,(LRESULT)staticWndProc);
LRESULT CALLBACK staticWndProc(HWND handle, UINT uMsg, WPARAM wParam, LPARAM lParam){
switch (uMsg){
case WM_LBUTTONDOWN:
std::wcout << handle << L" click\n"; //click event works
break;
default:
return DefWindowProcW(handle,uMsg,wParam,lParam);
}
return 0;
}
Do I have to handle manually some event or change my construction style flags?