此处不应该使用IDOK,应该使用IDYES或IDNO
if (IDYES == AfxMessageBox("是否关闭?" , MB_YESNO) )
PostQuitMessage(0);
//
#define IDOK 1
#define IDCANCEL 2
#define IDABORT 3
#define IDRETRY 4
#define IDIGNORE 5
#define IDYES 6
#define IDNO 7
需要判断函数的返回值啊
if (IDOK == AfxMessageBox("是否关闭?" , MB_YESNO) )
PostQuitMessage(0);
if (IDOK == AfxMessageBox("是否关闭?" , MB_YESNO) )
PostQuitMessage(0);
LZ应该去补一补C++基础语法