visual studio2022
运行时不报错,但按ESC键也不会实现功能,就一直在循环中。
哪里有错啊QAQ
#include<iostream>
using namespace std;
#include<easyx.h>
int main()
{
ExMessage m_msg;
while (true)
{
if (peekmessage(&m_msg, EM_KEY | EM_MOUSE))
{
switch (m_msg.message)
{
case WM_KEYDOWN:
//ESC键按下
if (m_msg.vkcode == VK_ESCAPE)
{
cout << "qqqq" << endl;
}
}
}
}
}