工控编程吧
标题: 上位机MFC如何弹出消息对话框 [打印本页]
作者: qq263946146 时间: 2019-7-22 12:50
标题: 上位机MFC如何弹出消息对话框
弹出消息对话框,从CWnd派生的类都自带有一个函数CWnd::MessageBox也就是说我们窗口类里都可以调用此函数来显示提示文本。
int MessageBox( LPCTSTR lpszText, LPCTSTR lpszCaption = NULL, UINT nType = MB_OK );
Return Value
Specifies the outcome of the function. It is 0 if there is not enough memory to create the message box.
Parameters
lpszText
Points to a CString object or null-terminated string containing the message to be displayed.
lpszCaption
Points to a CString object or null-terminated string to be used for the message-box caption. If lpszCaption is NULL, the default caption “Error” is used.
nType
Specifies the contents and behavior of the message box.
MSDN内有详细介绍
欢迎光临 工控编程吧 (https://www.gkbc8.com/) |
Powered by Discuz! X3.4 |