CreateWindow fails

steve.lustbader at philips.com steve.lustbader at philips.com
Fri Nov 15 15:42:35 CST 2002


My app calls CreateWindow like this:

WNDCLASSEX wcex;
wcex.cbSize        = sizeof(WNDCLASSEX);
wcex.style         = 0;
wcex.lpfnWndProc   = (WNDPROC)MyWndProc;
wcex.cbClsExtra    = 0;
wcex.cbWndExtra    = 0;
wcex.hInstance     = hInstance; // from argument to DllMain
wcex.hIcon         = NULL;
wcex.hCursor       = NULL;
wcex.hbrBackground = NULL;
wcex.lpszMenuName  = NULL;
wcex.lpszClassName = TEXT("foo");
wcex.hIconSm       = NULL;
RegisterClassEx(&wcex);
g_hTarget = CreateWindow(TEXT("foo"), TEXT(""),
        WS_POPUP, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
ASSERT( NULL != g_hTarget );


It fails the final assertion in Wine but not in Windows.  Any idea
why CreateWindow would be returning NULL here?  What debug output
could I provide that could be helpful here?

-Steve




More information about the wine-devel mailing list