作业帮 > 综合 > 作业

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

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/24 01:31:24
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
);
需要四个参数.