April 26th, 2006, 10:21 PM
ToolTip and owner draw CButtons
I have a rather confusing question that I hope someone can give me a clue. I have tried to add tool tips to a derived Groupbox from CButton class. It would be fine if I removed the owner draw flag, then the tooltip gets through, I would get the bulloon tip, but this becomes a problem when I tried to capture the screen, then the window would draw its version of the groupbox along with mine, so the text would be overlapped, not to mention the color is different. I removed BS_OWNERDRAW in the group box's PreSubclassWindow().
I have searched google and codeguru and now I have no clue. Or can I trap the capture screen msg from windows and prevent it from drawing the default group box?
April 27th, 2006, 03:33 PM
Re: ToolTip and owner draw CButtons
Still searching for potential workarounds.
I essentially have 3 questions:
1. Button with owner draw flag set, has anyone gotten tooltip to work with them?
2. How to prevent window from doing its default drawing of the group box? i.e. what msg to trap?
3. I could get tooltip to work with owner draw buttons, however, these don't always get notfied and the tooltip is the default type, not the one with the balloon. When I said it doesn't get notified, I mean placing the tooltip.activate(TRUE) OnInitDialog() doesn't work, but if I do a button click, then it would, However, even if it does, it is not the balloon style. Very strange for me.
Click Here to Expand Forum to Full Width