XiaoHui
管理员
  
UID 2
精华
1
积分 4861
帖子 4851
阅读权限 200
注册 2001-1-23 来自 猎户星座
状态 离线
|
查看MSDN帮助, 有详细说明.
要得到返回值, 则调用时, 获取其值:
int t_iRet = AfxMassageBox(...) 第二个参数指定按纽的类型. 你按了指定的哪个按纽, 则返回相应的按纽ID.
例如:
int t_iRet = AfxMessageBox( _T("test string"), MB_YESNO ); 如果用户下了 YES, 则 t_iRet 的值为 IDYES
QUOTE: Displays a message box on the screen.
int AfxMessageBox(
LPCTSTR lpszText,
UINT nType = MB_OK,
UINT nIDHelp = 0
);
int AFXAPI AfxMessageBox(
UINT nIDPrompt,
UINT nType = MB_OK,
UINT nIDHelp = (UINT
) -1
);
Parameters
lpszText
Points to a CString object or null-terminated string containing the message to be displayed in the message box.
nType
The style of the message box. Apply any of the message-box styles to the box.
nIDHelp
The Help context ID for the message; 0 indicates the application's default Help context will be used.
nIDPrompt
A unique ID used to reference a string in the string table.
Return Value
Zero if there is not enough memory to display the message box; otherwise, one of the following values is returned:
IDABORT The Abort button was selected.
IDCANCEL The Cancel button was selected.
IDIGNORE The Ignore button was selected.
IDNO The No button was selected.
IDOK The OK button was selected.
IDRETRY The Retry button was selected.
IDYES The Yes button was selected.
|  飞往猎户星座.... |
|