Skip to main content
GameDev.net gamedev.net
🔒 Locked

show message box in an opengl app?

Started by pag Jan 6, 2003 at 7:59 AM 6 replies 2.9k views
Original Post
pag
pag
I can''t seem to show a message box in my opengl application, it''s there but i can''t see it. I know this because the application stops, but when i hit enter it goes back to normal again. I also disable the render context before showing it, but still it wont work. The app looks in a simplified(extremely ) form like this:> render(); while(GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); if(IsOpenGLActive()) SwapBuffers(hDC); } // in proc LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM) { switch(msg) { case WM_CHAR: DeActivateOpenGL(); if((TCHAR)wParam == ''4'') MessageBox(parms...); return 0; } return defwindowproc(blaha); } Any ideas?
I am a signature virus. Please add me to your signature so that I may multiply.
python_regious
python_regious
Try using the desktop hwnd... ( HWND_DESKTOP I think... Might be DESKTOP_HWND, something similar anyway ).

Death of one is a tragedy, death of a million is just a statistic.
If at first you don't succeed, redefine success.
pag
pag
that didnt work
I am a signature virus. Please add me to your signature so that I may multiply.
ShlomiSteinberg
ShlomiSteinberg
Try this:


MessageBox(NULL,"...","...",MB_OK);
Member of the Shove Pouya Off A Cliff club, SPOAC. (If you wish to join, add this line to your signature.)Member of "Un-Ban nes8bit" association, UNA (to join put this in your sig)
Mihail121
Mihail121
I think that the OpenGL window(for which was a OpenGL system initialized) is covering the message box.So use the following:

MessageBox(GetFocus(),...);

The PAIN is coming...this summer!!!In cinemas everywhere.
stone421
stone421
is there a correct answer?
Gl_Terminator
Gl_Terminator
hey men you are ninja-coding why don't you try to show a message by opengl. Try to use glut
Brother Bob
Brother Bob
[quote name='stone421' timestamp='1314077252' post='4852655']
is there a correct answer?
[/quote]
Yes, there is a correct answer: don't bring back an eight and a half year old thread.


Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.