]> git.saurik.com Git - wxWidgets.git/commitdiff
tooltips in controls in dialogs actually work now
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 17 Apr 1999 20:30:28 +0000 (20:30 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 17 Apr 1999 20:30:28 +0000 (20:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/dialog.cpp
src/msw/tooltip.cpp

index d2f6a22272386de1aa88a3726161bb154c6fee2b..199442210de7e29324c7d72b9444525abbbd64ef 100644 (file)
@@ -78,9 +78,13 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
                       long style,
                       const wxString& name)
 {
+#if wxUSE_TOOLTIPS
+    m_hwndToolTip = 0;
+#endif
+
     SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
     SetName(name);
-    
+
     if (!parent)
         wxTopLevelWindows.Append(this);
 
@@ -144,7 +148,7 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
     }
 
     SubclassWin(GetHWND());
-    
+
     SetWindowText(hwnd, title);
     SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
 
@@ -158,7 +162,7 @@ void wxDialog::SetModal(bool flag)
   else
     if ( m_windowStyle & wxDIALOG_MODAL )
         m_windowStyle -= wxDIALOG_MODAL ;
-  
+
   wxModelessWindows.DeleteObject(this);
   if (!flag)
     wxModelessWindows.Append(this);
@@ -318,7 +322,7 @@ bool wxDialog::Show(bool show)
         BringWindowToTop((HWND) GetHWND());
         return TRUE;
       }
-      
+
       m_modalShowing = TRUE;
       wxNode *node = wxModalDialogs.First();
       while (node)
@@ -581,12 +585,12 @@ void wxDialog::OnCloseWindow(wxCloseEvent& event)
     // The default OnCancel (above) simply ends a modal dialog, and hides a modeless dialog.
 
     static wxList closing;
-    
+
     if ( closing.Member(this) )
         return;
-    
+
     closing.Append(this);
-    
+
     wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
     cancelEvent.SetEventObject( this );
     GetEventHandler()->ProcessEvent(cancelEvent); // This may close the dialog
index 199c42a0a1a292fab7c3bab9324a6e2386886fde..f17e964b680b8b7fd803506f5df5f8ade7206ad4 100644 (file)
@@ -176,7 +176,7 @@ WXHWND wxToolTip::GetToolTipCtrl()
                  "can't create tooltip control outside a frame or a dialog" );
 
     HWND hwndTT = (HWND)(frame ? frame->GetToolTipCtrl()
-                                 : dialog->GetToolTipCtrl());
+                               : dialog->GetToolTipCtrl());
     if ( !hwndTT )
     {
         hwndTT = ::CreateWindow(TOOLTIPS_CLASS,
@@ -184,7 +184,7 @@ WXHWND wxToolTip::GetToolTipCtrl()
                                 TTS_ALWAYSTIP,
                                 CW_USEDEFAULT, CW_USEDEFAULT,
                                 CW_USEDEFAULT, CW_USEDEFAULT,
-                                (HWND)frame->GetHWND(), (HMENU)NULL,
+                                (HWND)parent->GetHWND(), (HMENU)NULL,
                                 wxGetInstance(), NULL);
 
         if ( hwndTT )