Jump to content
  • Advertisement
Sign in to follow this  
Sir Sapo

Windows Message Box

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

Is there anyway I can bring up a Message box that doesn't have a button to press, keep it up for a little, then close it on my command? I was going to have a message box come up that said loading while my game was (guess what...) loading, and then have it go away after the loading is complete but I couldn't find any information. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
You'll have to create your own dialog/window. Create a dialog resource, add it to your project, then call CreateDialog(...), ShowWindow(...) and DestroyWindow(...) when your game is finished loading.

Edit: example code

BOOL CALLBACK LoadDlgProc(HWND dlg, UINT message, WPARAM w, LPARAM l)
{
//No special processing required
return FALSE;
}

void LoadGame()
{
HWND dlg = CreateDialog(GetModuleHandle(NULL),MAKEINTRESOURCE(IDD_LOADDLG),<optional parent window handle>,LoadDlgProc);
ShowWindow(dlg,SW_SHOWNORMAL);

//Load game here

DestroyWindow(dlg);
}

Share this post


Link to post
Share on other sites
Sign in to follow this  

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