![]() |
Tooltip problem in floating pane |
Post Reply
|
| Author | |
yoavo
Senior Member
Joined: 29 February 2004 Location: Israel Status: Offline Points: 140 |
Post Options
Thanks(0)
Quote Reply
Topic: Tooltip problem in floating panePosted: 24 December 2006 at 4:53am |
|
Hi,
I have a dockable pane which a dialog box attach to it. The dialog contains a button which has a tooltip. The problem is that when the pane is floating, the tooltip appears behind the pane.
I attached a small sample to demonstrate the problem (Float the left pane and see the behaviour of the tooltips).
|
|
![]() |
|
mgampi
Senior Member
Joined: 14 July 2003 Status: Offline Points: 1210 |
Post Options
Thanks(0)
Quote Reply
Posted: 24 December 2006 at 8:07am |
|
Hi, If you haven't set the WS_EX_TOPMOST style of the tooltip this could occure. // it will appear behind any popup windows....
::SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
I hope this helps
|
|
|
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 24 December 2006 at 9:23am |
|
Common solution for this tooltip problem is:
BOOL CMasterDialog::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) { NMHDR* pNMHDR = (NMHDR*)lParam; switch (pNMHDR->code){ case TTN_SHOW:{ if (m_TT.GetSafeHwnd()){ // make sure the tooltip is at the top of the "Z" order, otherwise // it will appear behind popup windows....::SetWindowPos(m_TT, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); } } break;} return CDialog::OnNotify(wParam, lParam, pResult);} |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
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 |