CWnd::ScreenToClient
void ScreenToClient( LPPOINT lpPoint ) const;void ScreenToClient( LPRECT lpRect ) const;ParameterslpPointPoints to a CPoint object or POINT structure that contains the screen coordinates to be converted.lpRectPoints to a CRect object or RECT structure that contains the screen coordinates to be converted.ResConverts the screen coordinates of a given point or rectangle on the display to client coordinates. The ScreenToClient member function replaces the screen coordinates given in lpPoint or lpRect with client coordinates. The new coordinates are relative to the upper-left corner of the CWnd client area.
void ScreenToClient( LPPOINT lpPoint ) const;void ScreenToClient( LPRECT lpRect ) const;ParameterslpPointPoints to a CPoint object or POINT structure that contains the screen coordinates to be converted.lpRectPoints to a CRect object or RECT structure that contains the screen coordinates to be converted.ResConverts the screen coordinates of a given point or rectangle on the display to client coordinates. The ScreenToClient member function replaces the screen coordinates given in lpPoint or lpRect with client coordinates. The new coordinates are relative to the upper-left corner of the CWnd client area.
解决方案 »
- 大家一起来讨论下,VC程序在XP下没问题,WIN8下出现的问题及解决方案 ,汇总下,分享下
- MFC 的ICON怎么引用 啊?
- 请教做过东进语音卡开发的同志
- 没有找到MFC80UD.DLL,因此这个程序未能启动
- 关于读对话框中Edit 空间中数据的问题,请高手指点!!!谢谢!!
- 工程的繁体与简体的问题???
- 请教:MFC关于多个视图的问题,执行这个视时,另外一个视的定时器仍然执行,怎么写代码呢?
- 怎么改变另一个进程的窗口标题
- CFtpFileFind::FileFind为什么不好用呢?50大洋送上,还不断加分~~~~~~
- 很菜很菜的问题
- --------100分挑战SDK高手-----关于Rebar控件的使用
- 如何在Label控件中用某种颜色FillRect之后,还能看见Label中的文字??
CRect rect;
ScreenToClient(rect);
ClientToScreen(rect);
变就行了