+void wxToolTip::Add(WXHWND hWnd)
+{
+ HWND hwnd = (HWND)hWnd;
+
+ wxToolInfo ti(hwnd);
+
+ // as we store our text anyhow, it seems useless to waste system memory
+ // by asking the tooltip ctrl to remember it too - instead it will send
+ // us TTN_NEEDTEXT (via WM_NOTIFY) when it is about to be shown
+ ti.hwnd = hwnd;
+ ti.lpszText = LPSTR_TEXTCALLBACK;
+ // instead of: ti.lpszText = (char *)m_text.c_str();
+
+ if ( !SendTooltipMessage(GetToolTipCtrl(), TTM_ADDTOOL, 0, &ti) )
+ {
+ wxLogSysError(_("Failed to create the tooltip '%s'"),
+ m_text.c_str());
+ }
+}
+