解决方案 »

  1.   

    我把问题简化了说一下吧,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.
      

  2.   

    可以试试EnableWindow(FALSE);其他窗口
      

  3.   

    可以试试EnableWindow(FALSE);其他窗口
    万分感谢,问题EnableWindow(FALSE);可以实现