Advertisement

unknown problem with the creation of A window!

Started by July 03, 2003 05:42 AM
4 comments, last by Alim Doener 21 years, 8 months ago
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); }
BTBB
Is "Form1" a valid HWND?
Is "OpenGL" a registered window class?
How do you handle WM_NCCREATE and WM_CREATE messages?

Kippesoep
Advertisement
I've uploaded the whole project on my webspace.

Please check it under:
http://www.djs4life.de/HelloOGL.zip

[edited by - Alim Doener on July 3, 2003 8:46:59 AM]
BTBB
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]
DISCLAIMER: If any of the above statements are incorrect, feel free to deliver me a good hard slap!My games: DracMan | Swift blocks
No it doesn''t work cause there''s another problem with this function, which I don''t know cuase i''m a newbie in OpenGL!

Please watch:
http://www.djs4life.de/HelloOGL.zip
BTBB
Check out Nehe''s site.
A good example of setting up a window with OpenGL.

Good luck!

My game: Swift blocks
DISCLAIMER: If any of the above statements are incorrect, feel free to deliver me a good hard slap!My games: DracMan | Swift blocks

This topic is closed to new replies.

Advertisement