]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/event.cpp
wxStdButtonSizer Finalise --> Realize
[wxWidgets.git] / src / common / event.cpp
index 5c65c985af7471359ef3d7d083927eb7e496390a..bab410244b6e3799296b279321e431cab39fec1b 100644 (file)
@@ -381,6 +381,11 @@ wxEvent::wxEvent(const wxEvent &src)
  *
  */
 
+#ifdef __VISUALC__
+    // 'this' : used in base member initializer list (for m_commandString)
+    #pragma warning(disable:4355)
+#endif
+
 wxCommandEvent::wxCommandEvent(wxEventType commandType, int theId)
               : wxEvent(theId, commandType)
 #if WXWIN_COMPATIBILITY_2_4
@@ -397,16 +402,22 @@ wxCommandEvent::wxCommandEvent(wxEventType commandType, int theId)
     m_propagationLevel = wxEVENT_PROPAGATE_MAX;
 }
 
+#ifdef __VISUALC__
+    #pragma warning(default:4355)
+#endif
+
 wxString wxCommandEvent::GetString() const
 {
     if(m_eventType != wxEVT_COMMAND_TEXT_UPDATED || !m_eventObject)
         return m_cmdString;
     else
     {
+#if wxUSE_TEXTCTRL
         wxTextCtrl *txt = wxDynamicCast(m_eventObject, wxTextCtrl);
         if(txt)
             return txt->GetValue();
         else
+#endif // wxUSE_TEXTCTRL
             return m_cmdString;
     }
 }