• Advertisement

Archived

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

unknown problem with the creation of A window!

This topic is 5317 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
Is "Form1" a valid HWND?
Is "OpenGL" a registered window class?
How do you handle WM_NCCREATE and WM_CREATE messages?

Share this post


Link to post
Share on other sites
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]

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
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

Share this post


Link to post
Share on other sites

  • Advertisement