CWindow::MessageBox

显示消息框。

int MessageBox(
   LPCTSTR lpszText,
   LPCTSTR lpszCaption = NULL,
   UINT nType = MB_OK 
) throw();

备注

在参见 Windows SDK的 MessageBox

示例

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::MessageBox() to pop up a Windows message box

CWindow myWindow;
myWindow.Attach(hWnd);
myWindow.MessageBox(_T("Hello World"));

要求

Header: atlwin.h

请参见

参考

CWindow选件类