There is a problem. I'm not using MFC to use GetSafeHwnd().
Second: I'm not called CreateWindow. Code look's like this:
...
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
MSG msg;
First();
OnHook();
while( GetMessage( &msg, NULL, 0, 0 ) ) {
TranslateMessage( &msg );
DispatchMessage( &msg );
}
return 0;
}
...
It's just bare skeleton. but in next to this function i have to get hwnd.