Click here to Skip to main content
15,844,498 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In the non-client area of a standard win32 window, there would be three little buttons like maximize, minimize,close. When you put your cursor in these areas for some seconds, there would be a tooltip explaining the area for the area which your cursor was hovering right now.
tooltip img[^]

What I have tried:

I have rewrite the WM_NCHITTEST and WM_NCPAINT to add several customized areas and they work well. I want to use the tooltip of the window which already applied on the maximizing/minimizing/closing areas.I want the same tooltip pops up and explain the meaning of my new-adding areas.
By searching on the msdn I did not figure out how to capture the tooltip of a window.
What should I do ?
Updated 20-Nov-22 23:55pm

1 solution

Share this answer
Yount_0701 21-Nov-22 6:24am    
Msdn shows the operation on tooltip control. What makes me confused was, the standard main window should have a tooltip control, How can I get the HWND of this tooltip ?
Msdn code creates a brand new tooltip control, using a global variable to record the HWND of the tooltip, But The original tooltip for the Non-client maximizing/minimizing/closing areas , where is it ? How to use it ?
Richard MacCutchan 21-Nov-22 6:27am    
Sorry, I do not know. You need to look at all the Tooltip documentation to see which messages can be used to find this information.
Yount_0701 21-Nov-22 22:44pm    
So far from what I know tooltip control messages have nothing to do with what I concern. They are internal messages for the tooltip control itself. By checking the structure of TOOLINFO, this kind of control has internal structure which stores the connect between itself and the owner window ( specified areas or sub controls).So I check the WM_NOTIFY message of the frame window. After some coding tests , nothing about tooltip come into WM_NOTIFY at all. Tooltip control has a TOP_MOST style to display the tooltip info and also it should be a window , so I use spy++ to enumerate all the windows with TOP_MOST style , from what I expected , some one may have the same value with frame window's instance or something else. After I tried several times , nothing found yet.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900