HOWTO: Create a Multiple Line Message BoxID: Q67210
|
Message boxes are used to provide information to the user of an application. Error messages and warnings are also provided through message boxes. This article provides details on using message boxes in applications.
Message boxes are modal windows. When an application displays an
application modal message box, which is the default message box type, the
user cannot interact with any part of that application until the message
box has been dismissed. However, the user may use the mouse or keyboard to
activate another application and interact with it while the message box is
displayed. Certain critical errors that may affect all of Windows are
displayed in system modal message boxes. Windows will not perform any
operations until the error condition is acknowledged and the system modal
message box is dismissed.
There are times where it is necessary to display a long message in a
message box. Windows does this when you start an MS-DOS-based application
that uses graphics from inside an MS-DOS window. To break a message into
many lines, insert a newline character into the message text. Here is a
sample MessageBox() call:
MessageBox(hWnd, "This is line 1.\nThis is line 2.", "App",
MB_OK | MB_ICONQUESTION);
Keywords : kbDlg kbMessageBox kbNTOS351 kbNTOS400 kbGrpUser kbWinOS95 kbWinOS98
Version :
Platform :
Issue type :
Last Reviewed: March 6, 1999