Archived

This topic is now archived and is closed to further replies.

Alim Doener

unknown problem with the creation of A window!

Recommended Posts

Can somebody tell me why the Error-Message will be shown when I execute this source in my C++Builder 6! if(!(hWnd = CreateWindowEx(WS_EX_APPWINDOW | WS_EX_WINDOWEDGE, "OpenGL", "OpenGL-Fenster", WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, 0, 0, 100, 100, Form1, NULL, hInstance, NULL))); { MessageBox(NULL,"Konnte Fenster nicht initialisieren","ERROR",MB_OK|MB_ICONEXCLAMATION); }

Share this post


Link to post
Share on other sites
Remove that ; at the end of the function call!
Like this:

if(!(hWnd = CreateWindowEx(WS_EX_APPWINDOW | WS_EX_WINDOWEDGE,
"OpenGL",
"OpenGL-Fenster",
WS_OVERLAPPEDWINDOW |
WS_CLIPSIBLINGS |
WS_CLIPCHILDREN,
0, 0,
100,
100,
Form1,
NULL,
hInstance,
NULL)))

{
MessageBox(NULL,"Konnte Fenster nicht initialisieren","ERROR",MB_OK|MB_ICONEXCLAMATION);

}

My game: Swift blocks

[edited by - JohanOfverstedt on July 3, 2003 8:50:05 AM]

Share this post


Link to post
Share on other sites