This program describes a class CToooltipWnd similar to ctooltipCtrl to implement "Balloon" tool tips. The method of using this class is as follows: 1. Increase tooltipwnd.cpp to project files. 2. Add #include "tooltipwnd.h" in the header file. 3. Add: ctooltipWnd m_balloontooltip; 3. Add the following code in OnInitDialog (dialog) or OnInitialUpdate: m_balloontooltip.create (this); m_balloontooltip.addtool (Getdlgitem
),
[text color]); EG. m_balloontooltip.addtool (getdlgitem (idc_edit1), "tooltip", RGB (255, 0)); the third parameter is optional, default is RGB (0, 0, 0 ). Default text colors can be set with setDeftextColor. 4. Overload PretranslateMessage and add the following code: if (m_balloontooltip) m_balloontooltip.relayevent (pmsg);