hey dude, you hav captioned ur topics as tooltiptext without mfc and you hav all used the whole program in MFC only... toooooooooooo bad.......... plz specify how to set a tooltip text in pure VC++ not MFC
All this can be done with the standard Tooltip ctrl, search in MSDN for article "Tiptoe Through the ToolTips", this article explains the use of tooltips very well.
However, I still appreciate your contribution and respect everyone who shares their code or findings here. I don't understand people who make negative statements without helping in any way others...pointless
problem with compex data
Posted by DieterHammer
on 07/12/2005 04:02am
The MSDN article is very fine, for my application it has only one problem. It needs a hittest for every MouseMove. If I have a very complex CAD document, this speeds down the mouse. I have to create my own event "Mouse doesn't move" and only then check hittest.
Thanks a lot for your help... i hate Windows, but i shall have to program a bit more for this platform... everything is damn upside down ... can't believe i have spent 4 hours fixing a tool tip control that is to be built from scratch, since the CToolTip wrapper can't do most of the things i need.. talk about extendability...
Well, anyway your code saved me :)
I know how to make it 2) smaller (no members :), and 2) faster (about 20 - 30%)
here it goes:
remove the CPaintDC dc(this) initialisation in OnPaint since you don't need it anyway (you perform all the drawing in the DisplayToolTip function).
use the CS_OWNDC class style to have an exclusive device context (you won't need to release it, and the tool tips are so small Windows won't mind have an exclusive device context to your tooltips, and since there can be only one at a time, CS_OWNDC is perfect for the job.
The tool tip that is displayed only appears at the first point that the mousemove supplies. On subsequent mouse moves it does not update the tool tip, it does not disapear and just stays displayed at the first point.
What modifications need to be made to make it be displayed under the cursor as it moves?
I could've used this earlier... at least the idea. I went through major contortions to get the UI's tooltip control to do this and it still doesn't work quite right. I don't have access to MFC or even C++ right now so I may hack it up...