From 340196c001690cd784e7e3f2fc54cd449324f914 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 5 Dec 1999 10:07:00 +0000 Subject: [PATCH] wxChoice/wxComboBox background colour change (to get back to where we were); and .dsp file updates git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/texpr.tex | 8 ++++---- src/msw/bitmap.cpp | 1 + src/msw/choice.cpp | 4 ++++ src/msw/combobox.cpp | 7 ++++++- src/wxvc.dsp | 4 ++++ src/wxvc_dll.dsp | 4 ++++ 6 files changed, 23 insertions(+), 5 deletions(-) diff --git a/docs/latex/wx/texpr.tex b/docs/latex/wx/texpr.tex index 0cf364f452..70a01967b0 100644 --- a/docs/latex/wx/texpr.tex +++ b/docs/latex/wx/texpr.tex @@ -130,10 +130,10 @@ depending on what the version of FLEX expects. See the bottom of parser.y, and if necessary edit it to make it compile in the opposite way to the current compilation. -To test out wxExpr compile the test program (samples/wxexpr/wxexpr.exe), -and try loading test.exp into the test -program. Then save it to another file. If the second is identical to the -first, wxExpr is in a working state. +%To test out wxExpr compile the test program (samples/wxexpr/wxexpr.exe), +%and try loading test.exp into the test +%program. Then save it to another file. If the second is identical to the +%first, wxExpr is in a working state. \subsection{Bugs} diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index fe11b93585..3dddc4177e 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -71,6 +71,7 @@ wxBitmapRefData::wxBitmapRefData() m_selectedInto = NULL; m_numColors = 0; m_bitmapMask = NULL; + m_hBitmap = (WXHBITMAP) NULL; } void wxBitmapRefData::Free() diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp index 90714d1e5a..56f2be52f1 100644 --- a/src/msw/choice.cpp +++ b/src/msw/choice.cpp @@ -60,6 +60,10 @@ bool wxChoice::Create(wxWindow *parent, if ( !CreateControl(parent, id, pos, size, style, validator, name) ) return FALSE; + // A choice/combobox normally has a white background (or other, depending + // on global settings) rather than inheriting the parent's background colour. + SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW)); + long msStyle = WS_CHILD | CBS_DROPDOWNLIST | WS_TABSTOP | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL; if ( style & wxCB_SORT ) msStyle |= CBS_SORT; diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index 0593b9342e..93e9b8a731 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -74,7 +74,12 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, SetName(name); SetValidator(validator); if (parent) parent->AddChild(this); - SetBackgroundColour(parent->GetBackgroundColour()) ; +// SetBackgroundColour(parent->GetBackgroundColour()) ; + + // A choice/combobox normally has a white background (or other, depending + // on global settings) rather than inheriting the parent's background colour. + SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW)); + SetForegroundColour(parent->GetForegroundColour()) ; m_windowStyle = style; diff --git a/src/wxvc.dsp b/src/wxvc.dsp index 65c35a3200..6118357c8f 100644 --- a/src/wxvc.dsp +++ b/src/wxvc.dsp @@ -808,6 +808,10 @@ SOURCE=.\msw\gaugemsw.cpp # End Source File # Begin Source File +SOURCE=.\msw\gdiimage.cpp +# End Source File +# Begin Source File + SOURCE=.\msw\gdiobj.cpp # End Source File # Begin Source File diff --git a/src/wxvc_dll.dsp b/src/wxvc_dll.dsp index cc4edd0404..fb824f58fa 100644 --- a/src/wxvc_dll.dsp +++ b/src/wxvc_dll.dsp @@ -806,6 +806,10 @@ SOURCE=.\msw\gaugemsw.cpp # End Source File # Begin Source File +SOURCE=.\msw\gdiimage.cpp +# End Source File +# Begin Source File + SOURCE=.\msw\gdiobj.cpp # End Source File # Begin Source File -- 2.45.2