#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{
int result;
int flag = 1;
while (flag)
{
result = MessageBox(NULL, TEXT("你是猪吗?"), TEXT("提醒"), MB_YESNO);
if (result == IDYES)
{
result = MessageBox(NULL, TEXT("嗯,知道就好!"), TEXT("提醒"), MB_OK);
result = MessageBox(NULL, TEXT("重试吗?"), TEXT("提醒"), MB_RETRYCANCEL);
if (result == IDRETRY) flag = 1;
else flag = 0;
}
else
result = MessageBox(NULL, TEXT("你睁大眼睛瞧瞧,你就是只猪啊!"), TEXT("提醒"), MB_OK);
}
return 0;
}
Windows程序设计--制作简易消息框
最新推荐文章于 2021-02-15 22:54:33 发布