class CToolTipDlg : public CDialog
{
// Construction
public:
CToolTipDlg(CWnd* pParent = NULL); // standard constructor
CToolTipCtrl m_ctrlTT;
// Dialog Data
//{{AFX_DATA(CToolTipDlg)
enum { IDD = IDD_TOOLTIP_DIALOG };
CEdit m_ctrlEdit;
..
//}}AFX_DATA
..
};
BOOL CToolTipDlg::OnInitDialog()
{
..
SetIcon(m_hIcon, FALSE); // Set small icon
m_ctrlTT.Create(this);
m_ctrlTT.AddTool(&m_ctrlEdit, _T(".."));
..
}
..
BOOL CToolTipDlg::PreTranslateMessage(MSG* pMsg)
{
m_ctrlTT.RelayEvent(pMsg);
return CDialog::PreTranslateMessage(pMsg);
}