鼠标移动到浮动窗口上就出错??????????????? 鼠标移动对话框文档 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我把问题简化了说一下吧,MDI程序为主程序,将MDI的一个视图窗口指针传进DLL中,在DLL中创建模态对话框父窗口指定为传进来的主程序视图窗口指针,在DLL的对话框上建立单文档(包括 框架,视图,文档),在框架上创建有属性页的浮动窗口,但是当鼠标移动到浮动窗口上就出错,将对话框改为非模态的就没问题,但是我要实现模态的效果。断定断在_AFXWIN_INLINE void CWnd::GetWindowRect(LPRECT lpRect) const { ASSERT(::IsWindow(m_hWnd)); ::GetWindowRect(m_hWnd, lpRect); }调用堆栈的上一步是void CMFCPropertyGridCtrl::TrackToolTip(CPoint point){ if (m_bTracking || m_bTrackingDescr) { return; } CPoint ptScreen = point; ClientToScreen(&ptScreen); CRect rectTT; m_IPToolTip.GetWindowRect(&rectTT); if (rectTT.PtInRect(ptScreen) && m_IPToolTip.IsWindowVisible()) { return; }在向上是BOOL CMFCPropertyGridCtrl::PreTranslateMessage(MSG* pMsg){ switch (pMsg->message) { case WM_KEYDOWN: case WM_SYSKEYDOWN: case WM_LBUTTONDOWN: case WM_RBUTTONDOWN: case WM_MBUTTONDOWN: case WM_LBUTTONUP: case WM_RBUTTONUP: case WM_MBUTTONUP: case WM_NCLBUTTONDOWN: case WM_NCRBUTTONDOWN: case WM_NCMBUTTONDOWN: case WM_NCLBUTTONUP: case WM_NCRBUTTONUP: case WM_NCMBUTTONUP: m_ToolTip.RelayEvent(pMsg); m_IPToolTip.Hide(); break; case WM_MOUSEMOVE: m_ToolTip.RelayEvent(pMsg); if (pMsg->wParam == 0) // No buttons pressed { CPoint ptCursor; ::GetCursorPos(&ptCursor); ScreenToClient(&ptCursor); TrackToolTip(ptCursor); } break; } if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_TAB && m_pSel != NULL && m_pSel->OnActivateByTab()) { return TRUE; }再向上BOOL PASCAL CWnd::WalkPreTranslateTree(HWND hWndStop, MSG* pMsg){ ASSERT(hWndStop == NULL || ::IsWindow(hWndStop)); ASSERT(pMsg != NULL); // walk from the target window up to the hWndStop window checking // if any window wants to translate this message for (HWND hWnd = pMsg->hwnd; hWnd != NULL; hWnd = ::GetParent(hWnd)) { CWnd* pWnd = CWnd::FromHandlePermanent(hWnd); if (pWnd != NULL) { // target window is a C++ window if (pWnd->PreTranslateMessage(pMsg))//这个箭头知道这不知都是上面哪一行跳的 return TRUE; // trapped by target window (eg: accelerators) } // got to hWndStop window without interest if (hWnd == hWndStop) break;m_IPToolTip.GetWindowRect(&rectTT);中m_IPToolTip的句柄为0. 可以试试EnableWindow(FALSE);其他窗口 可以试试EnableWindow(FALSE);其他窗口万分感谢,问题EnableWindow(FALSE);可以实现 关于LPCTSTR的问题 link dll error:unresolved external symbol __imp__dr_GetFrame@8 vc++ 调用matlab com 组件的问题!!!!! 关于Lib极为简单的问题 哪里可以下载Intel JPEG Library库 透明文字 求:用C/C++写的数字金额转中文大写的原码 IDA反汇编一段程序,请高手解析一下。 我有一个项目想找人做! 真衰!关于字体的问题! 怎么把一幅Gdiplus::Bitmap,把中间的一个矩形挖空?变成透明? 做位图按钮时怎么使按钮适应图片的大小
_AFXWIN_INLINE void CWnd::GetWindowRect(LPRECT lpRect) const
{ ASSERT(::IsWindow(m_hWnd)); ::GetWindowRect(m_hWnd, lpRect); }
调用堆栈的上一步是void CMFCPropertyGridCtrl::TrackToolTip(CPoint point)
{
if (m_bTracking || m_bTrackingDescr)
{
return;
} CPoint ptScreen = point;
ClientToScreen(&ptScreen); CRect rectTT;
m_IPToolTip.GetWindowRect(&rectTT); if (rectTT.PtInRect(ptScreen) && m_IPToolTip.IsWindowVisible())
{
return;
}
在向上是BOOL CMFCPropertyGridCtrl::PreTranslateMessage(MSG* pMsg)
{
switch (pMsg->message)
{
case WM_KEYDOWN:
case WM_SYSKEYDOWN:
case WM_LBUTTONDOWN:
case WM_RBUTTONDOWN:
case WM_MBUTTONDOWN:
case WM_LBUTTONUP:
case WM_RBUTTONUP:
case WM_MBUTTONUP:
case WM_NCLBUTTONDOWN:
case WM_NCRBUTTONDOWN:
case WM_NCMBUTTONDOWN:
case WM_NCLBUTTONUP:
case WM_NCRBUTTONUP:
case WM_NCMBUTTONUP:
m_ToolTip.RelayEvent(pMsg);
m_IPToolTip.Hide();
break; case WM_MOUSEMOVE:
m_ToolTip.RelayEvent(pMsg); if (pMsg->wParam == 0) // No buttons pressed
{
CPoint ptCursor;
::GetCursorPos(&ptCursor);
ScreenToClient(&ptCursor); TrackToolTip(ptCursor);
}
break;
} if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_TAB && m_pSel != NULL && m_pSel->OnActivateByTab())
{
return TRUE;
}再向上BOOL PASCAL CWnd::WalkPreTranslateTree(HWND hWndStop, MSG* pMsg)
{
ASSERT(hWndStop == NULL || ::IsWindow(hWndStop));
ASSERT(pMsg != NULL); // walk from the target window up to the hWndStop window checking
// if any window wants to translate this message for (HWND hWnd = pMsg->hwnd; hWnd != NULL; hWnd = ::GetParent(hWnd))
{
CWnd* pWnd = CWnd::FromHandlePermanent(hWnd);
if (pWnd != NULL)
{
// target window is a C++ window
if (pWnd->PreTranslateMessage(pMsg))//这个箭头知道这不知都是上面哪一行跳的
return TRUE; // trapped by target window (eg: accelerators)
} // got to hWndStop window without interest
if (hWnd == hWndStop)
break;
m_IPToolTip.GetWindowRect(&rectTT);中m_IPToolTip的句柄为0.
万分感谢,问题EnableWindow(FALSE);可以实现