]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
Uses src/iodbc headers rather than windows headers to hopefully standardize across...
[wxWidgets.git] / src / common / wincmn.cpp
index 25925b61339c43d19f3a9e06dcaffb76b3219587..f0970096304840a22b2196a8988b147224219728 100644 (file)
@@ -118,7 +118,9 @@ void wxWindowBase::InitBase()
     wxSystemSettings settings;
 
     m_backgroundColour = settings.GetSystemColour(wxSYS_COLOUR_BTNFACE);
-    m_foregroundColour = *wxBLACK;  // TODO take this from sys settings too?
+    // m_foregroundColour = *wxBLACK;  // TODO take this from sys settings too?
+    m_foregroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOWTEXT);
+
 #if !defined(__WXMAC__) && !defined(__WXGTK__)
     m_font = *wxSWISS_FONT;         //      and this?
 #else
@@ -1276,7 +1278,9 @@ void wxWindowBase::DoSetClientObject( wxClientData *data )
 
 wxClientData *wxWindowBase::DoGetClientObject() const
 {
-    wxASSERT_MSG( m_clientDataType == ClientData_Object,
+    // it's not an error to call GetClientObject() on a window which doesn't
+    // have client data at all - NULL will be returned
+    wxASSERT_MSG( m_clientDataType != ClientData_Void,
                   wxT("this window doesn't have object client data") );
 
     return m_clientObject;
@@ -1293,7 +1297,9 @@ void wxWindowBase::DoSetClientData( void *data )
 
 void *wxWindowBase::DoGetClientData() const
 {
-    wxASSERT_MSG( m_clientDataType == ClientData_Void,
+    // it's not an error to call GetClientData() on a window which doesn't have
+    // client data at all - NULL will be returned
+    wxASSERT_MSG( m_clientDataType != ClientData_Object,
                   wxT("this window doesn't have void client data") );
 
     return m_clientData;