Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Tooltip problem in floating pane
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Tooltip problem in floating pane

 Post Reply Post Reply
Author
Message
yoavo View Drop Down
Senior Member
Senior Member


Joined: 29 February 2004
Location: Israel
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote yoavo Quote  Post ReplyReply Direct Link To This Post Topic: Tooltip problem in floating pane
    Posted: 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).
 
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1210
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 24 December 2006 at 8:07am

Hi,

If you haven't set the WS_EX_TOPMOST style of the tooltip this could occure.
Another solution - in the TTN_SHOW handler (OnNotify) bring the tooltip to from by calling

// make sure the tooltip is at the top of the "Z" order, otherwise

// 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
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.