Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
因此,我试图在应用程序窗口上获取我的 mouseX/mouseY 变量的客户端坐标。我能够获得“屏幕坐标”,但现在我需要“客户端坐标”。
部分代码在图片中。我不确定调用什么方法来访问“客户端坐标”
非常感谢您的帮助。
尝试ScreenToClient
POINT pt; pt.x = pointerInfo.ptPixelLocation.x; pt.y = pointerInfo.ptPixelLocation.y; if (ScreenToClient(hTheWindowYouCareAbout, &pt)) { // Do something here... }