Jump to content
  • Advertisement

Archived

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

chris1234

Multiple Dialog windows

This topic is 6198 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

I''m making an application which needs to be able to have more then 1 dialog window open at the sametime. I started the project under visual c++ 6.0 as an win32 application. I do not want to use the MFC AppWizzard mainly ''cause I''ll later on I want 1 window (non-dialog) to display OpenGL...but now I just want more then 1 dialog open at once...I made my main dialog window but when I try to open an other one, just a simple messagebox the entire application closes I open the messagebox in my Dialogprocedure when I press a button as you can see below in part of MainDlgProc(); INT_PTR CALLBACK MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam ) { switch( msg ) { case WM_INITDIALOG: break; case WM_COMMAND: switch( LOWORD(wParam) ) { case IDC_DIALOG: MessageBox(hwnd2, "test", "test1", MB_OK | MB_ICONEXCLAMATION); break; } break; case WM_DESTROY: PostQuitMessage(0); break; } return FALSE; // Message not handled } can anyone tell me what I''m doing wrong? how do I open another dialog from within another...and is it a lot different to open an window for displaying openGL then opening a 2nd dialog window? Chris

Share this post


Link to post
Share on other sites
Advertisement
Look up modeless dialogs.

try MSDN at Microsoft.

I can''t remember any specifics at this moment, sorry. It has been some time since I have used modeless dialogs, involves stuff like message pumps and the like.

Good luck.


D.V.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!