请问为什么这里左键按下没有反应,不会改变值而退出呢?菜鸟急求答案,谢谢谢谢!!!!!
#include<Windows.h>
#include<graphics.h>
#include<cstdio>
#include <conio.h>
int flag = 1;
void welcome()
{
initgraph(350, 450);
HWND hwnd = GetHWnd();
SetWindowText(hwnd, L"俄罗斯方块");
settextstyle(30, 0, L"楷体");
settextcolor(RGB(248, 147, 29));
outtextxy(100, 150, L"俄罗斯方块!");
rectangle(90, 190, 240, 240);
settextstyle(30, 0, L"楷体");
outtextxy(105, 200, L"开始游戏");
}
void welcome2()
{
HWND hwnd = GetHWnd();
SetWindowText(hwnd, L"俄罗斯方块");
settextstyle(30, 0, L"楷体");
settextcolor(RGB(248, 147, 29));
outtextxy(100, 150, L"chenggong!");
rectangle(90, 190, 240, 240);
settextstyle(30, 0, L"楷体");
outtextxy(105, 200, L"开始游戏");
}
int main()
{
initgraph(350, 450);
while (flag)
{
welcome();
MOUSEMSG m = GetMouseMsg();
m = GetMouseMsg();
if (m.uMsg == WM_LBUTTONDOWN)
{
flag = 0;
break;
}
system("pause");
}
closegraph();
return 0;
}