就像scrach那样,一道鼠标位置,怎么办/?(T_T)要用c++来完成,不用图形库
2条回答 默认 最新
真的小白啊 2021-09-21 14:17关注WM_MOUSEMOVE message (Winuser.h) - Win32 apps | Microsoft Docs Posted to a window when the cursor moves. If the mouse is not captured, the message is posted to the window that contains the cursor. Otherwise, the message is posted to the window that has captured the mouse. https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-mousemoveGetCursorPos function (winuser.h) - Win32 apps | Microsoft Docs Retrieves the position of the mouse cursor, in screen coordinates. https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getcursorposSetWindowPos function (winuser.h) - Win32 apps | Microsoft Docs Changes the size, position, and Z order of a child, pop-up, or top-level window. These windows are ordered according to their appearance on the screen. The topmost window receives the highest rank and is the first window in the Z order. https://docs.microsoft.com/zh-cn/windows/win32/api/winuser/nf-winuser-setwindowpos本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报