Removing a Tooltips
-
Saturday, February 13, 2010 12:27 PMDear all,
I have created a tooltips dynamically using the method highlighted below:
http://msdn.microsoft.com/en-us/library/bb760252(VS.85).aspx
The link above highlighted many ways to create different kind of tooltips.
But it never says how to remove / modify the tooltip itself.
Curretnly, when I wanted to delete a tooltip, I just call:
::DestroyWindow(<the tooltip hwnd created in the CreateWindowEx>);
Question now is, am I doing it correctly? Because there is a TTM_DELTOOL, but I can't really get it to work :(
Thanks in advance.
All Replies
-
Tuesday, February 16, 2010 7:38 AMModerator
Instead of distroying a tooltip, you can just deactive/disable it by sending it a TTM_ACTIVATE message:
http://msdn.microsoft.com/en-us/library/bb760326(VS.85).aspx
As regarding to modifying the text of a tooltip, you can code as follows:
SetWindowText (hwndBtn, TEXT("~~New ToolTip text"));
For more information please read the following page:
Creating a ToolTip Control
http://msdn.microsoft.com/en-us/library/ms926239.aspx
Please mark the post that helps you, and unmark that does not. This benefits our community.- Marked As Answer by warrentangModerator Friday, February 19, 2010 3:19 AM

