The following example shows how to move the mouse over the form to a specified position (in different rectangle boxes) to display different prompts.
1. Define the global variable in the class: ctooltipctrl m_tipctrl;
2. initialize the variable in oninitdialog, the form initialization function:
Enabletooltip (true); // make the control available
M_tipctrl.create (this); // Initialization
M_tipctrl.activate (true); // activate
M_tipctrl.addtool (this); // Add a tool
3. Add prompt information
Crect rect, rect2;
Int Pos = 100000;
Rect. setrect (0, 0, 10, 10 );
Rect.2setrect (100,100,200,200); // you can add any more. If you need to add multiple available loops
M_tipctrl.addtool (this, "rect1", & rect, POS ++ );
M_tipctrl.addtool (this, "rect2", & rect2, POS ++ );
4. Respond to mouse movement information
Add a message ing pretranslatemessage () for the form class ();
Add:
M_tipctrl.relayevent (PMSG); // display the control