Print Page | Close Window

Tooltip problem in floating pane

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=5903
Printed Date: 11 November 2025 at 8:39pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Tooltip problem in floating pane
Posted By: yoavo
Subject: Tooltip problem in floating pane
Date 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).
 
Yoav. http://forum.codejock.com/uploads/20061224_045258_ThemeTest.zip - uploads/20061224_045258_ThemeTest.zip



Replies:
Posted By: mgampi
Date 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


Posted By: Oleg
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net