- BOOL CtestDlg::PreTranslateMessage(MSG* pMsg)
- {
- // TODO: Add your specialized code here and/or call the base class
- if(pMsg->message == WM_MOUSEMOVE&& pMsg->hwnd != m_hWnd)
- {
- CPoint pt;
- pt = pMsg->pt; //这个pmsg->pt就是鼠标在控件内的坐标
- FromHandle(pMsg->hwnd)->ScreenToClient(&pt);
- }
判断鼠标控件是否在某个控件之内
最新推荐文章于 2024-09-04 11:50:55 发布