2

我正在尝试在函数中捕获CEdit EM_SHOWBALLOONTIP消息。PreTranslateMessage有人可以告诉我该怎么做吗?谢谢你

BOOL CTestDlg::PreTranslateMessage(MSG* pMsg)
{
    if (pMsg->hwnd == m_edit1.GetSafeHwnd())
    {
        if (pMsg->message == EM_HIDEBALLOONTIP)
        {
        }
        
    }
    return CDialogEx::PreTranslateMessage(pMsg);
}
4

1 回答 1

2

PreTranslateMessage嵌套在消息循环中。因此,仅对排队的消息调用它。EM_SHOWBALLOONTIP是已发送的消息,并且永远不会在消息队列中结束。

换句话说:您无法EM_SHOWBALLOONTIPPreTranslateMessage实现中观察。

于 2021-07-05T06:35:38.563 回答