阅读:2864回复:1
求助:鼠标驱动MOUSE_INPUT_DATA结构,LastX坐标转换问题
怎么把像素坐标,比如(1024,768),转换为LastX坐标中要求的绝对坐标,或者反过来转换。
|
|
沙发#
发布于:2009-04-23 17:27
If MOUSEEVENTF_ABSOLUTE value is specified, dx and dy contain normalized absolute coordinates between 0 and 65,535. The event procedure maps these coordinates onto the display surface. Coordinate (0,0) maps onto the upper-left corner of the display surface, and (65535,65535) maps onto the lower-right corner.
屏幕坐标要如下转换: dx = point.x * 65535 / ScreenWidth; dy = point.y * 65535 / ScreenHeight; |
|