Sign in to follow this  
Sir Sapo

Windows Message Box

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this