]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/tooltip.cpp
VTK wrapper of vtkRenderWindow for wxPython. Tested on MSW so far.
[wxWidgets.git] / src / msw / tooltip.cpp
index b7106c38ad6a73fe812cbf6e5ec67c200bea5c56..ebf490177d85aa6c3f8b657192bfb94f0075a236 100644 (file)
 #include <commctrl.h>
 #endif
 
 #include <commctrl.h>
 #endif
 
-WXHWND wxToolTip::hwndTT = NULL;
+// ----------------------------------------------------------------------------
+// global variables
+// ----------------------------------------------------------------------------
+
+// the tooltip parent window
+WXHWND wxToolTip::hwndTT = (WXHWND)NULL;
 
 // ----------------------------------------------------------------------------
 // private classes
 // ----------------------------------------------------------------------------
 
 
 // ----------------------------------------------------------------------------
 // private classes
 // ----------------------------------------------------------------------------
 
-
 // a simple wrapper around TOOLINFO Win32 structure
 // a simple wrapper around TOOLINFO Win32 structure
-#pragma warning( disable : 4097 )
+#ifdef __VISUALC__
+    #pragma warning( disable : 4097 ) // we inherit from a typedef - so what?
+#endif
 class wxToolInfo : public TOOLINFO
 {
 public:
     wxToolInfo(wxWindow *win)
     {
         // initialize all members
 class wxToolInfo : public TOOLINFO
 {
 public:
     wxToolInfo(wxWindow *win)
     {
         // initialize all members
-#if __GNUWIN32__ && !defined(wxUSE_NORLANDER_HEADERS)
-        memset(this, 0, sizeof(TOOLINFO));
-#else
         ::ZeroMemory(this, sizeof(TOOLINFO));
         ::ZeroMemory(this, sizeof(TOOLINFO));
-#endif
 
         cbSize = sizeof(TOOLINFO);
         uFlags = TTF_IDISHWND;
         uId = (UINT)win->GetHWND();
     }
 };
 
         cbSize = sizeof(TOOLINFO);
         uFlags = TTF_IDISHWND;
         uId = (UINT)win->GetHWND();
     }
 };
-#pragma warning( default : 4097 )
+#ifdef __VISUALC__
+    #pragma warning( default : 4097 )
+#endif
 
 // ----------------------------------------------------------------------------
 // private functions
 
 // ----------------------------------------------------------------------------
 // private functions
@@ -125,6 +129,12 @@ WXHWND wxToolTip::GetToolTipCtrl()
                                 NULL, (HMENU)NULL,
                                 wxGetInstance(),
                                 NULL);
                                 NULL, (HMENU)NULL,
                                 wxGetInstance(),
                                 NULL);
+       if ( hwndTT )
+       {
+           SetWindowPos((HWND)hwndTT, HWND_TOPMOST, 0, 0, 0, 0,
+                        SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
+       }
+
     }
 
     return (WXHWND)hwndTT;
     }
 
     return (WXHWND)hwndTT;