2

I'm trying to catch CEdit EM_SHOWBALLOONTIP message within PreTranslateMessage function. Can somebody tell me how to do this ? thank you

BOOL CTestDlg::PreTranslateMessage(MSG* pMsg)
{
    if (pMsg->hwnd == m_edit1.GetSafeHwnd())
    {
        if (pMsg->message == EM_HIDEBALLOONTIP)
        {
        }
        
    }
    return CDialogEx::PreTranslateMessage(pMsg);
}
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
lupin218
  • 23
  • 1
  • 1
  • 4

1 Answers1

2

PreTranslateMessage is nested inside the message loop. Consequently, it is called for queued messages only. EM_SHOWBALLOONTIP is a sent message, and never winds up in the message queue.

In other words: You cannot observe EM_SHOWBALLOONTIP in a PreTranslateMessage implementation.

Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
IInspectable
  • 46,945
  • 8
  • 85
  • 181