C/C++ >> MessageBox
Posted by cpprogrammer2003 on 00:17:00 07-10-2003
How do I make a message box for my program? I want the Caption to say "ERROR" and the message to say "ENTER CORRECT PASSWORD" then I want it to have a OK, and a CANCEL. THANKX!
Posted by Smerdyakov on 00:42:00 07-10-2003
This question is not answerable when you don't say what GUI API you are using.
Posted by dxprog on 00:42:00 07-10-2003
Goes something like this:

MessageBox(hWnd, "Please enter the correct password!", "Password Error", MB_OKCANCEL);

The arguments are as follows (left to right):
Window handle (hWnd)
Message ("Please enter the correct password!")
Title ("Password Error")
Flags (MB_OKCANCEL)

http://www.functionx.com/bcb/functions/msgbox.htm This page has a little more info on the flags. Hope this helps. [addsig]