+// ---------------------------------------------------------------------------
+// implementation helpers
+// ---------------------------------------------------------------------------
+
+// create the tooltip ctrl for our parent frame if it doesn't exist yet
+WXHWND wxToolTip::GetToolTipCtrl()
+{
+ if ( !ms_hwndTT )
+ {
+ ms_hwndTT = (WXHWND)::CreateWindow(TOOLTIPS_CLASS,
+ (LPSTR)NULL,
+ TTS_ALWAYSTIP,
+ CW_USEDEFAULT, CW_USEDEFAULT,
+ CW_USEDEFAULT, CW_USEDEFAULT,
+ NULL, (HMENU)NULL,
+ wxGetInstance(),
+ NULL);
+ if ( ms_hwndTT )
+ {
+ HWND hwnd = (HWND)ms_hwndTT;
+ SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0,
+ SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
+
+#if wxUSE_TTM_WINDOWFROMPOINT
+ // subclass the newly created control
+ gs_wndprocToolTip = (WNDPROC)::GetWindowLong(hwnd, GWL_WNDPROC);
+ ::SetWindowLong(hwnd, GWL_WNDPROC, (long)wxToolTipWndProc);
+#endif // wxUSE_TTM_WINDOWFROMPOINT
+ }
+ }
+
+ return ms_hwndTT;
+}
+
+void wxToolTip::RelayEvent(WXMSG *msg)