想用AfxMessageBox通过不同按扭分别返回0,1,2三个值,不知道怎么做啊

解决方案 »

  1.   

    你可以自己建一个"MessageBox"来判断。
      

  2.   

    MSDN:AfxMessageBox 
    int AfxMessageBox( LPCTSTR lpszText, UINT nType = MB_OK, UINT nIDHelp = 0 );int AFXAPI AfxMessageBox( UINT nIDPrompt, UINT nType = MB_OK, UINT nIDHelp = (UINT) -1 );Return ValueZero 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. 
    If a message box has a Cancel button, the IDCANCEL value will be returned if either the ESC key is pressed or the Cancel button is selected. If the message box has no Cancel button, pressing the ESC key has no effect.
      

  3.   

    看看MSDN里它的参数不就明白了
      

  4.   

    请问返回的不是int型的么
    那“IDABORT   The Abort button was selected.”这个什么意思呢,难道返回的是“IDABORT”?
    不明白
      

  5.   

    那“IDABORT   The Abort button was selected.”这个什么意思呢,难道返回的是“IDABORT”?
    ========
    对,返回的就是IDABORT
      

  6.   

    IDABORT Abort button was selected. 
    IDCANCEL Cancel button was selected. 
    IDIGNORE Ignore button was selected. 
    IDNO No button was selected. 
    IDOK OK button was selected. 
    IDRETRY Retry button was selected. 
    IDYES Yes button was selected