reverted patch 598016 (removed MSWCreateControl() visible parameter)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -92,15 +92,12 @@ protected:
|
|||||||
|
|
||||||
virtual wxSize DoGetBestSize() const;
|
virtual wxSize DoGetBestSize() const;
|
||||||
|
|
||||||
|
|
||||||
// create the control of the given Window class
|
// create the control of the given Window class
|
||||||
bool MSWCreateControl(const wxChar *classname,
|
bool MSWCreateControl(const wxChar *classname,
|
||||||
const wxString& label,
|
const wxString& label,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
long style,
|
long style);
|
||||||
bool visible = true);
|
|
||||||
|
|
||||||
|
|
||||||
// NB: the method below is deprecated now, with MSWGetStyle() the method
|
// NB: the method below is deprecated now, with MSWGetStyle() the method
|
||||||
// above should be used instead! Once all the controls are updated to
|
// above should be used instead! Once all the controls are updated to
|
||||||
@@ -120,8 +117,7 @@ protected:
|
|||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
const wxString& label = wxEmptyString,
|
const wxString& label = wxEmptyString,
|
||||||
WXDWORD exstyle = (WXDWORD)-1,
|
WXDWORD exstyle = (WXDWORD)-1);
|
||||||
bool visible = true);
|
|
||||||
|
|
||||||
// default style for the control include WS_TABSTOP if it AcceptsFocus()
|
// default style for the control include WS_TABSTOP if it AcceptsFocus()
|
||||||
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
||||||
|
@@ -326,7 +326,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
|
|
||||||
// and now create the MSW control
|
// and now create the MSW control
|
||||||
if ( !MSWCreateControl(_T("COMBOBOX"), msStyle, pos, size, wxEmptyString, (WXDWORD)-1, false) )
|
if ( !MSWCreateControl(_T("COMBOBOX"), msStyle) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
// A choice/combobox normally has a white background (or other, depending
|
// A choice/combobox normally has a white background (or other, depending
|
||||||
@@ -360,9 +360,6 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// finally, show the combo box
|
|
||||||
Show(true);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -79,13 +79,12 @@ bool wxControl::MSWCreateControl(const wxChar *classname,
|
|||||||
const wxString& label,
|
const wxString& label,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
long style,
|
long style)
|
||||||
bool visible)
|
|
||||||
{
|
{
|
||||||
WXDWORD exstyle;
|
WXDWORD exstyle;
|
||||||
WXDWORD msStyle = MSWGetStyle(style, &exstyle);
|
WXDWORD msStyle = MSWGetStyle(style, &exstyle);
|
||||||
|
|
||||||
return MSWCreateControl(classname, msStyle, pos, size, label, exstyle, visible);
|
return MSWCreateControl(classname, msStyle, pos, size, label, exstyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxControl::MSWCreateControl(const wxChar *classname,
|
bool wxControl::MSWCreateControl(const wxChar *classname,
|
||||||
@@ -93,8 +92,7 @@ bool wxControl::MSWCreateControl(const wxChar *classname,
|
|||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
const wxString& label,
|
const wxString& label,
|
||||||
WXDWORD exstyle,
|
WXDWORD exstyle)
|
||||||
bool visible)
|
|
||||||
{
|
{
|
||||||
// want3D tells us whether or not the style specified a 3D border.
|
// want3D tells us whether or not the style specified a 3D border.
|
||||||
// If so, under WIN16 we can use Ctl3D to give it an appropriate style.
|
// If so, under WIN16 we can use Ctl3D to give it an appropriate style.
|
||||||
@@ -110,18 +108,7 @@ bool wxControl::MSWCreateControl(const wxChar *classname,
|
|||||||
|
|
||||||
// all controls should have these styles (wxWindows creates all controls
|
// all controls should have these styles (wxWindows creates all controls
|
||||||
// visible by default)
|
// visible by default)
|
||||||
style |= WS_CHILD;
|
style |= WS_CHILD | WS_VISIBLE;
|
||||||
|
|
||||||
// sometimes, controls will defer showing the window until
|
|
||||||
// all configuration, sizing, and positioning is completed
|
|
||||||
if (!visible)
|
|
||||||
{
|
|
||||||
m_isShown = FALSE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
style |= WS_VISIBLE;
|
|
||||||
}
|
|
||||||
|
|
||||||
int x = pos.x == -1 ? 0 : pos.x,
|
int x = pos.x == -1 ? 0 : pos.x,
|
||||||
y = pos.y == -1 ? 0 : pos.y,
|
y = pos.y == -1 ? 0 : pos.y,
|
||||||
|
Reference in New Issue
Block a user