Поделиться через


CComControl::MessageBox

Call this method to create, display, and operate a message box.

int MessageBox(
   LPCTSTR lpszText,
   LPCTSTR lpszCaption = _T(""),
   UINT nType = MB_OK
);

Параметры

  • lpszText
    The text to be displayed in the message box.

  • lpszCaption
    The dialog box title. If NULL (the default), the title "Error" is used.

  • nType
    Specifies the contents and behavior of the dialog box. See the MessageBox entry in the Windows SDK documentation for a list of the different message boxes available. The default provides a simple OK button.

Возвращаемое значение

Returns an integer value specifying one of the menu-item values listed under MessageBox in the Windows SDK documentation.

Заметки

MessageBox is useful both during development and as an easy way to display an error or warning message to the user.

Требования

Header: atlctl.h

См. также

Основные понятия

CComControl Class

CComControl Members