See the sample in MSDN article "CWnd::EnableToolTips"