1. disabled WS_EX_CONTROLPARENT as I don't know how to work around it otherwise

2. corrected assignments to non-const references


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-04-26 20:53:19 +00:00
parent a5b3c8eaae
commit 63e26a7756
7 changed files with 13 additions and 19 deletions

View File

@@ -356,7 +356,7 @@ WXHBRUSH wxChoice::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
else
SetBkMode(hdc, OPAQUE);
wxColour& colBack = GetBackgroundColour();
wxColour colBack = GetBackgroundColour();
if (!IsEnabled())
colBack = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE);

View File

@@ -158,7 +158,7 @@ WXHBRUSH wxComboBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
else
SetBkMode(hdc, OPAQUE);
wxColour& colBack = GetBackgroundColour();
wxColour colBack = GetBackgroundColour();
if (!IsEnabled())
colBack = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE);

View File

@@ -239,7 +239,7 @@ WXHBRUSH wxControl::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
else
SetBkMode(hdc, OPAQUE);
wxColour& colBack = GetBackgroundColour();
wxColour colBack = GetBackgroundColour();
::SetBkColor(hdc, wxColourToRGB(colBack));
::SetTextColor(hdc, wxColourToRGB(GetForegroundColour()));

View File

@@ -792,7 +792,7 @@ WXHBRUSH wxRadioBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
else
SetBkMode(hdc, OPAQUE);
wxColour& colBack = GetBackgroundColour();
wxColour colBack = GetBackgroundColour();
if (!IsEnabled())
colBack = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE);

View File

@@ -182,7 +182,7 @@ WXHBRUSH wxRadioButton::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
else
SetBkMode(hdc, OPAQUE);
wxColour& colBack = GetBackgroundColour();
wxColour colBack = GetBackgroundColour();
if (!IsEnabled())
colBack = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE);

View File

@@ -526,17 +526,8 @@ bool wxTextCtrl::CanPaste() const
void wxTextCtrl::SetEditable(bool editable)
{
bool isEditable = IsEditable();
HWND hWnd = GetHwnd();
SendMessage(hWnd, EM_SETREADONLY, (WPARAM)!editable, (LPARAM)0L);
/*
if (editable != isEditable)
{
SetupColours();
Refresh();
}
*/
}
void wxTextCtrl::SetInsertionPoint(long pos)
@@ -982,7 +973,7 @@ WXHBRUSH wxTextCtrl::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
else
SetBkMode(hdc, OPAQUE);
wxColour& colBack = GetBackgroundColour();
wxColour colBack = GetBackgroundColour();
if (!IsEnabled() && (GetWindowStyle() & wxTE_MULTILINE) == 0)
colBack = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE);

View File

@@ -2302,16 +2302,19 @@ bool wxWindow::MSWCreate(int id,
if ( width > -1 ) width1 = width;
if ( height > -1 ) height1 = height;
// Unfortunately this won't work in WIN16. Unless perhaps
// we define WS_EX_CONTROLPARENT ourselves?
#ifndef __WIN16__
// unfortunately, setting WS_EX_CONTROLPARENT only for some windows in the
// hierarchy with several embedded panels (and not all of them) causes the
// program to hang during the next call to IsDialogMessage() due to the bug
// in this function (at least in Windows NT 4.0, it seems to work ok in
// Win2K)
#if 0
// if we have wxTAB_TRAVERSAL style, we want WS_EX_CONTROLPARENT or
// IsDialogMessage() won't work for us
if ( GetWindowStyleFlag() & wxTAB_TRAVERSAL )
{
extendedStyle |= WS_EX_CONTROLPARENT;
}
#endif
#endif // 0
HWND hParent = (HWND)NULL;
if ( parent )