Button not showing, a possible problem because of trying to redirect it to a specific WndProc
May 28, 2015 at 2:48pm UTC
May 29, 2015 at 1:28pm UTC
i only checked WObject.cpp
LRESULT WObject::WindowProcedure(UINT uMsg, WPARAM wParam, LPARAM lParam)
1 2 3
case WM_CREATE:
OnCreate(uMsg, wParam, lParam);
break ;
should return 0:
If an application processes this message, it should return zero to continue creation of the window. If the application returns –1, the window is destroyed and the CreateWindowEx or CreateWindow function returns a NULL handle.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms632619%28v=vs.85%29.aspx
WM_CLOSE
If an application processes this message, it should return zero.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms632617%28v=vs.85%29.aspx
and more. Please refer to MSDN and READ EVERYTHING (especially Remarks)
also:
delete this; in destructor is not needed. Same in main:
1 2 3
WCustomerManager customerManager = WCustomerManager( // this is copying
[...]
delete &customerManager; // this is not needed
is out of place. It should be:
1 2 3
WCustomerManager * customerManager = new WCustomerManager(
[...]
delete customerManager;
Topic archived. No new replies allowed.