首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

请教怎么的到对话框位置坐标

2013-03-21 
请问如何的到对话框位置坐标?用户用鼠标拖着对话框移动. 请问如何随时的到当前对话框在窗口上的位置坐标?

请问如何的到对话框位置坐标?
用户用鼠标拖着对话框移动. 请问如何随时的到当前对话框在窗口上的位置坐标? 位置
[解决办法]
先由GetWindowRect获取屏幕坐标,再换算成窗口坐标即可。
见MSDN对GetWindowRect的解释:
The GetWindowRect function retrieves the dimensions of the bounding rectangle of the specified window. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen. 

热点排行