鼠标解决思路
鼠标
在C语言下,如何让鼠标工作呢?书上没有介绍,谁能帮我给个源代码,多谢。
------解决方案--------------------
在C语言下,如何让鼠标工作呢?书上没有介绍,谁能帮我给个源代码,多谢。
------解决方案--------------------
- C/C++ code
#include <windows.h> //恶搞鼠标 int main(void){ FreeConsole(); int sw = GetSystemMetrics(SM_CXSCREEN); int sh = GetSystemMetrics(SM_CYSCREEN); for( ;; ) { srand(GetTickCount()); SetCursorPos((rand() % sw) + 1, (rand() % sh) + 1); } }