Click to See Complete Forum and Search --> : MessageBox problem


fab
April 15th, 1999, 02:55 AM
I have a problem with MessageBox function.
If I call this function in a window function (not of main window)
in this mode: MessageBox(NULL,"message","message",MB_OK)
it is always obscured by the window .
If I put MB_SETFOREGROUND (instead of MB_OK) I have always the same problem .
I want that the MessageBox window appears in foreground, can you help me ?
Thanks for persons that reply to this mail.

Ashutosh Sant
April 15th, 1999, 07:01 AM
Hi,

Try using MB_TASKMODAL flag. i.e.
MessageBox(NULL, "Message", "Caption", MB_TASKMODAL|MB_OK);
This should help you.

Thanx,
Ashutosh

Joe Klebau
April 15th, 1999, 08:11 AM
Actually, using MB_OK | MB_SYSTEMMODAL forces the message box to the top. MB_TASKMODAL may not. But, the user must click the OK button in the message box before they can do other work.

- jmk...