Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I am trying to create tooltips for the panes of a reasonably standard CMFCStatusBar. I would like Balloon tooltips, but the rectangular ones will do if "push comes to shove". My biggest problem is trying to find a decent explanation for the override arguments. Microsoft marks a lot of the class members:

"This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.'

Frankly, I did not buy the product so that I have to spend the time reverse engineering Microsoft's sketchy at best examples. It is not like Microsoft is so cash poor as to not be able to do a complete job! Rant over!

I do have a valid pointer to the Status Bar.

A good example of the frustration is with CMFCToolTipCtrl::OnDrawDescription. I understand what p_DC is and where it comes from however, CRect rect is still a mystery. I am assuming that it is the rectangle containing the text, but do I specify the rectangle size that I want, or does the class do or a little of both? Who or what positions the text block in the overall tool tip when drawing takes place?

BOOL bCalcOnly is another mystery. I have figured out that OnDrawDescription is called twice, once with bCalcOnly == TRUE and once with it == FALSE. I also figured out that bCalcOnly == TRUE draws the text; == FALSE doesn't. Do I have to do something else?

The arguments are marked [in]; is that supposed to mean that I must supply something?

If anyone out there knows of a link that has a decent example, or an article that has a better detail of the class members, it would be greatly appreciated.

Thanks,

Barry
Posted

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