0 Replies Latest reply on Sep 13, 2006 5:59 AM by rdinatale

    ExitHelpMode() & company

    rdinatale
      I'm using htmlhelp since long time into my c++ application that has got special links (like html links) to other windows of the same application. I note a strange situation when I open html help and soon I click to my links. So I decide to comment the typical block of code:

      if (IsFrameWnd())
      {
      // CFrameWnd windows should be allowed to exit help mode first
      CFrameWnd* pFrameWnd = (CFrameWnd*)this;
      pFrameWnd->ExitHelpMode();
      }
      // cancel any tracking modes
      SendMessage(WM_CANCELMODE);
      SendMessageToDescendants(WM_CANCELMODE, 0, 0, TRUE, TRUE);
      // need to use top level parent (for the case where m_hWnd is in DLL)
      CWnd* pWnd = GetTopLevelParent();
      pWnd->SendMessage(WM_CANCELMODE);
      pWnd->SendMessageToDescendants(WM_CANCELMODE, 0, 0, TRUE, TRUE);
      // attempt to cancel capture
      HWND hWndCapture = ::GetCapture();
      if (hWndCapture != NULL)
      ::SendMessage(hWndCapture, WM_CANCELMODE, 0, 0);

      the result is that the problems I've found before with the link internal to the application disappear. My question is: - what does really do this block of code?

      Thanks