I have a window application (Win32 API) in Visual C ++, in which I have to add device tips to the control button. Can anyone help me in getting the above mentioned work? thank you in advanced.
See if you do not use the MFC class
here's a < Code> CToolTipCtrl is an example using the class,
// log in a tooltip window m_ToolTipCtrl = New CToolTipCtrl; M_ToolTipCtrl- & gt; Create (this); // 'this', usually a cdialog window m_ToolTipCtrl- & gt; SetMapsTipWidth (300); // If you need multiline messages then m_ToolTipCtrl- & gt; Settep beaker roller (0x000000); M_ToolTipCtrl- & gt; Settep Reader (0xe0e0d0); // A CListBox control attached (we can attach many controls) m_ToolTipCtrl- & gt; AddTool (plstbox, "hey, I'm a tooltip message!"); To use Touloges (MFC 4.0 and later), // ... // (*) we have to use the following BOOL MyDialog :: PreTranslateMessage (MSG * pMsg) {if (NULL! = M_ToolTipCtrl) m_ToolTipCtrl- & Gt; RelayEvent (PMSG); // & lt; - Listen mouse message! Return CDialog :: PreTranslateMessage (pMsg); }
No comments:
Post a Comment