|
-
April 24th, 1999, 08:28 AM
#1
Is it possible to assign tooltips to combo box items?
Hi, all!
Is it possible to use class CToolTipCtrl with combo box items? I want to show tip for each combo box item and I want those tips to have background and font set in my Windows settings. Does anybody know how to implement this?
-
April 24th, 1999, 09:53 AM
#2
Re: Is it possible to assign tooltips to combo box items?
I've never used the CToolTipCtrl, but it has a method called HitTest(), which seems to be the function that determines if a tool tip shows up, and if it does, what the text should be. Since combo box items are not individual windows, you can only assign the tool tip to the combo box window (I may be wrong, but that is what the CToolTipCtrl suggests).
If I'm right, and you can only assign the tool tip to the whole combo, you need to get HitTest() to work properly. Looking at CToolTipCtrl::HitTest(), I would think that the combo has to be owner draw. You will also have to know the height of the entries in the combo (so you can know the rectangle for the hit test), the size and position of the drop down list (again, to determine the rectangle for the hit test), and know the entry of the first item displayed in the combo (this is done easily by calling GetTopIndex() ).
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|