Windows程序设计--制作简易消息框

来源:互联网 发布:什么行业需要网络推广 编辑:程序博客网 时间:2024/05/17 08:19
#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;}elseresult = MessageBox(NULL, TEXT("你睁大眼睛瞧瞧,你就是只猪啊!"), TEXT("提醒"), MB_OK);}return 0;}

0 0