Thursday, December 20, 2007

Window Creation problem with WM_NCCREATE message

I registered the class in win32 SDK application.
I created the window using CreateWindow() fn.CreateWindow() fn returns NULL.
if I checked the GetLastError(), it returns 0( SUCCESS).window creation is failed but
GetLastError() also not returns valid Error information.
I handled the WM_NCCREATE message within a Window Procedure.


solution :

within the WindowProc() fn , I handled the WM_NCCREATE fn as follows :

case WM_NCCREATE :

break;



This is the reason for window creation failure. if we handled this WM_NCCREATE fn,
we must return TRUE. then only window creation will succeeds.

No comments: