1 #include "stdafx.h" 2 3 int APIENTRY WinMain(HINSTANCE hInstance, 4 HINSTANCE hPrevInstance, 5 LPSTR lpCmdLine, 6 int nCmdShow) 7 { 8 // TODO: Place code here. 9 int ret; 10 ret=MessageBox(NULL,TEXT("你是好人吗?"),TEXT("询问对话框"),MB_YESNO|MB_ICONQUESTION); 11 if(IDYES==ret) 12 { 13 MessageBox(NULL,TEXT("你看你就不像好人,系统开始格式化!"),TEXT("鄙视你"), 14 MB_OK|MB_ICONEXCLAMATION ); 15 } 16 else 17 { 18 int ret2=MessageBox(NULL,TEXT("尝试把你变成好人失败,是否重试?"),TEXT("挽救你"), 19 MB_RETRYCANCEL); 20 if(IDRETRY==ret2) 21 { 22 MessageBox(NULL,TEXT("坏人就是换人,没法变成好人"),TEXT("没戏了"), 23 MB_OK|MB_ICONERROR); 24 } 25 } 26 return 0; 27 }