MessageBOX函数有几个参数,分别作用是什么?

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/03 19:15:37

MessageBOX函数有几个参数,分别作用是什么?
MessageBOX函数有几个参数,分别作用是什么?

MessageBOX函数有几个参数,分别作用是什么?
MFC的MessageBox封装在CWnd类中,原型
int CWnd::MessageBox( LPCTSTR lpszText,LPCTSTR lpszCaption = NULL,UINT nType = MB_OK );
只有一个必须的参数lpszText.
你自己写的MessageBox默认调用Win32 API,原型
int MessageBox(
HWND hWnd,// handle to owner window
LPCTSTR lpText,// text in message box
LPCTSTR lpCaption,// message box title
UINT uType // message box style
);
需要四个参数.