c++有鼠标宏吗
c++有鼠标宏吗?或是一些可以让运行窗口与鼠标互动的函数吗?
win的API
程序代码:
#include <stdlib.h> #include <windows.h> #define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1 : 0) int main() { int n = 0; for (;;) { if (KEY_DOWN(MOUSE_MOVED)) { system("color 97"); } else if (KEY_DOWN(MOUSE_EVENT)) { system("color A7"); } else if (KEY_DOWN(MOUSE_WHEELED)) { system("color 17"); } else { system("color 07"); } } return 0; }