Problem bei der Fenstererstellung
-
kann mir jemand verraten, warum
WNDCLASSEX wcex; memset( &wcex, 0, sizeof( wcex ) ); wcex.cbSize = sizeof( wcex ); wcex.lpszClassName = "gLSWindowClass"; wcex.lpfnWndProc = WindowProc; wcex.style = CS_HREDRAW | CS_VREDRAW; if( !RegisterClassEx( &wcex ) ) { LPVOID lpMsgBuf; FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL ); MessageBox( NULL, (LPCTSTR)lpMsgBuf, "Error while creating window class:", MB_OK | MB_ICONINFORMATION ); LocalFree( lpMsgBuf ); return 0; } HWND hWindow = CreateWindowEx( 0, "gLSWindowClass", "gLS", WS_OVERLAPPEDWINDOW | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL);nicht funktionieren sollte?
Die Registrierung der Fensterklasse funktioniert wie erwartet, aber nach CreateWindowEx bleibt hWindow == NULL und GetLastError() liefert
"Das System kann die angegebene Datei nicht finden.". Kann doch garnicht sein, oder?thxia : neox86
-
Oh, shit!
Wenn ich auf WM_NCCREATE false zurückgebe kann das nix werden...