![]() |
Tooltip on a window with no controls |
Post Reply ![]() |
Author | |
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Offline Points: 871 |
![]() ![]() ![]() ![]() ![]() Posted: 29 December 2008 at 1:05pm |
I have a window that simply displays a bitmap. It has no controls in it. I am asked to show a tooltip on the window. So I called EnableToolTips and overrode OnToolHitTest and when called I call FillInToolInfo.
I am doing the following in OnToolHitTest:
pTI->hwnd = m_hWnd; pTI->uId = (WPARAM)m_hWnd; pTI->uFlags |= TTF_IDISHWND; CRect rect; rect.SetRectEmpty(); GetClientRect( &rect ); CXTPToolTipContext::FillInToolInfo( pTI, pTI->hwnd, rect, pTI->uId, m_strTooltilDescription, m_strTooltipTitle, m_strTooltilDescription ); The tip appears just fine until the user moves the frame window or clicks on the command ribbon bar (in gray space). After that, my tip will not display. I have to click in some other window (say a docking pane) or as I have found I can move the mouse over a docking pane. Then I can move back over my window and get the tip to display.I have also tried not setting TTF_IDISHWND and always returning a unique uId (in this case tip flashes constantly or does not display).
I have stepped out of OnToolHitTest and thru the code after that call in FilterToolTipMessageHelper. Everything appears to be fine except the tip doesn't show up (I have stepped thru the code when the tip displays and when it will not and see no differences in code flow).
What am I doing wrong? |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |