windows程序设计作业二的代码
#include <windows.h>int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPreInstance, LPSTR szCmdLine, int iCmdShow){
bool flag1 = true;
while(flag1){
TCHAR szContent1[] = TEXT("你看见消息框了吗?");
TCHAR szTitle1[] = TEXT("消息框1");
//MessageBox(NULL,szContent1, szTitle1, MB_YESNO);
if((MessageBox(NULL,szContent1, szTitle1, MB_YESNO)) == IDNO){
TCHAR szContent2[] = TEXT("你看清楚,我就是消息框!");
TCHAR szTitle2[] = TEXT("消息框2");
MessageBox(NULL,szContent2, szTitle2, MB_OK);
continue;
}
TCHAR szContent3[] = TEXT("看见就好。");
TCHAR szTitle3[] = TEXT("消息框3");
MessageBox(NULL, szContent3, szTitle3, MB_OK);
TCHAR szContent4[] = TEXT("重试吗?");
TCHAR szTitle4[] = TEXT("消息框4");
//MessageBox(NULL, szContent4, szTitle4,MB_YESNO);
if((MessageBox(NULL, szContent4, szTitle4,MB_YESNO)) == IDNO){
break;
}
}
return 0;
}
页:
[1]