dqs111
驱动牛犊
驱动牛犊
  • 注册日期2008-07-09
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分7分
  • 威望24点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:2779回复:1

求助:鼠标驱动MOUSE_INPUT_DATA结构,LastX坐标转换问题

楼主#
更多 发布于:2009-04-23 16:58
怎么把像素坐标,比如(1024,768),转换为LastX坐标中要求的绝对坐标,或者反过来转换。
dqs111
驱动牛犊
驱动牛犊
  • 注册日期2008-07-09
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分7分
  • 威望24点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于: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;
游客

返回顶部