This is probably not the correct interpretation of this error.
The Win32 error above is more likely to indicate the actual problem.
Flags
Severity
Success
This code indicates success, rather than an error.
This may not be the correct interpretation of this code,
or possibly the program is handling errors incorrectly.
I am getting waring "Warning: Window creation failed: GetLastError returns 0x00000579" when using below code CWnd* m_pWndStatic = new CWnd; m_pWndStatic->CreateEx(0, _T("STATIC"), _T("Hi"), WS_CHILD | WS_VISIBLE | WS_POPUP, CRect(0, 0, 20, 20), this, 1234); It works fine if i call it without PopUp i.e. WS_POPUP. I am using VS2010. read more