From b07664068bc48173d08e3146ca05dceac275aa6a Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 16 May 2001 11:14:37 +0000 Subject: [PATCH] Applied patch #420395 (adding wxCLIP_SIBBLINGS capability -- but not by default) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/dlgcmn.cpp | 22 +++++++++++----------- src/msw/bmpbuttn.cpp | 3 +++ src/msw/button.cpp | 3 +++ src/msw/checkbox.cpp | 3 +++ src/msw/choice.cpp | 4 ++++ src/msw/combobox.cpp | 4 ++++ src/msw/gauge95.cpp | 4 ++++ src/msw/gaugemsw.cpp | 3 +++ src/msw/listbox.cpp | 2 ++ src/msw/listctrl.cpp | 4 ++++ src/msw/mdi.cpp | 4 +++- src/msw/notebook.cpp | 2 ++ src/msw/radiobut.cpp | 4 ++++ src/msw/scrolbar.cpp | 7 ++++++- src/msw/slider95.cpp | 22 ++++++++++++++++++---- src/msw/slidrmsw.cpp | 13 +++++++++++-- src/msw/spinbutt.cpp | 2 ++ src/msw/spinctrl.cpp | 4 ++++ src/msw/statbmp.cpp | 4 ++++ src/msw/statbr95.cpp | 6 +++++- src/msw/statline.cpp | 9 +++++++-- src/msw/stattext.cpp | 5 ++++- src/msw/tbar95.cpp | 3 +++ src/msw/textctrl.cpp | 6 +++++- src/msw/tglbtn.cpp | 4 ++++ src/msw/treectrl.cpp | 5 ++++- src/msw/window.cpp | 7 +++---- 27 files changed, 130 insertions(+), 29 deletions(-) diff --git a/src/common/dlgcmn.cpp b/src/common/dlgcmn.cpp index d16c32fd0f..235f5416da 100644 --- a/src/common/dlgcmn.cpp +++ b/src/common/dlgcmn.cpp @@ -106,46 +106,46 @@ wxSizer *wxDialogBase::CreateButtonSizer( long flags ) if (flags & wxYES_NO) { - yes = new wxButton( this, wxID_YES, _("Yes") ); + yes = new wxButton( this, wxID_YES, _("Yes"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ); box->Add( yes, 0, wxLEFT|wxRIGHT, margin ); - no = new wxButton( this, wxID_NO, _("No") ); + no = new wxButton( this, wxID_NO, _("No") ,wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS); box->Add( no, 0, wxLEFT|wxRIGHT, margin ); } else if (flags & wxYES) { - yes = new wxButton( this, wxID_YES, _("Yes") ); + yes = new wxButton( this, wxID_YES, _("Yes"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ); box->Add( yes, 0, wxLEFT|wxRIGHT, margin ); } else if (flags & wxNO) { - no = new wxButton( this, wxID_NO, _("No") ); + no = new wxButton( this, wxID_NO, _("No"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ); box->Add( no, 0, wxLEFT|wxRIGHT, margin ); } if (flags & wxOK) { - ok = new wxButton( this, wxID_OK, _("OK") ); + ok = new wxButton( this, wxID_OK, _("OK"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ); box->Add( ok, 0, wxLEFT|wxRIGHT, margin ); } if (flags & wxFORWARD) - box->Add( new wxButton( this, wxID_FORWARD, _("Forward") ), 0, wxLEFT|wxRIGHT, margin ); + box->Add( new wxButton( this, wxID_FORWARD, _("Forward"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ), 0, wxLEFT|wxRIGHT, margin ); if (flags & wxBACKWARD) - box->Add( new wxButton( this, wxID_BACKWARD, _("Backward") ), 0, wxLEFT|wxRIGHT, margin ); + box->Add( new wxButton( this, wxID_BACKWARD, _("Backward"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ), 0, wxLEFT|wxRIGHT, margin ); if (flags & wxSETUP) - box->Add( new wxButton( this, wxID_SETUP, _("Setup") ), 0, wxLEFT|wxRIGHT, margin ); + box->Add( new wxButton( this, wxID_SETUP, _("Setup"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ), 0, wxLEFT|wxRIGHT, margin ); if (flags & wxMORE) - box->Add( new wxButton( this, wxID_MORE, _("More...") ), 0, wxLEFT|wxRIGHT, margin ); + box->Add( new wxButton( this, wxID_MORE, _("More..."),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ), 0, wxLEFT|wxRIGHT, margin ); if (flags & wxHELP) - box->Add( new wxButton( this, wxID_HELP, _("Help") ), 0, wxLEFT|wxRIGHT, margin ); + box->Add( new wxButton( this, wxID_HELP, _("Help"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ), 0, wxLEFT|wxRIGHT, margin ); if (flags & wxCANCEL) { - cancel = new wxButton( this, wxID_CANCEL, _("Cancel") ); + cancel = new wxButton( this, wxID_CANCEL, _("Cancel"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ); box->Add( cancel, 0, wxLEFT|wxRIGHT, margin ); } diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp index 0e3fd2ebe2..32d792972a 100644 --- a/src/msw/bmpbuttn.cpp +++ b/src/msw/bmpbuttn.cpp @@ -77,6 +77,9 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit long msStyle = WS_VISIBLE | WS_TABSTOP | WS_CHILD | BS_OWNERDRAW ; + if ( m_windowStyle & wxCLIP_SIBLINGS ) + msStyle |= WS_CLIPSIBLINGS; + #ifdef __WIN32__ if(m_windowStyle & wxBU_LEFT) msStyle |= BS_LEFT; diff --git a/src/msw/button.cpp b/src/msw/button.cpp index 72e64675f7..e5423b1ffb 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -76,6 +76,9 @@ bool wxButton::Create(wxWindow *parent, long msStyle = WS_VISIBLE | WS_TABSTOP | WS_CHILD /* | WS_CLIPSIBLINGS */ ; + if ( m_windowStyle & wxCLIP_SIBLINGS ) + msStyle |= WS_CLIPSIBLINGS; + #ifdef __WIN32__ if(m_windowStyle & wxBU_LEFT) msStyle |= BS_LEFT; diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp index 1a19d1383a..24a3e7ce5b 100644 --- a/src/msw/checkbox.cpp +++ b/src/msw/checkbox.cpp @@ -104,6 +104,9 @@ bool wxCheckBox::Create(wxWindow *parent, if ( style & wxALIGN_RIGHT ) msStyle |= BS_LEFTTEXT; + if ( style & wxCLIP_SIBLINGS ) + msStyle |= WS_CLIPSIBLINGS; + // We perhaps have different concepts of 3D here - a 3D border, // versus a 3D button. // So we only wish to give a border if this is specified diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp index 50612f6153..41e23a5ece 100644 --- a/src/msw/choice.cpp +++ b/src/msw/choice.cpp @@ -64,6 +64,10 @@ bool wxChoice::Create(wxWindow *parent, if ( style & wxCB_SORT ) msStyle |= CBS_SORT; + if ( style & wxCLIP_SIBLINGS ) + msStyle |= WS_CLIPSIBLINGS; + + // Experience shows that wxChoice vs. wxComboBox distinction confuses // quite a few people - try to help them wxASSERT_MSG( !(style & wxCB_DROPDOWN) && diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index 557eab8975..c66b9eb906 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -290,6 +290,10 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, if ( style & wxCB_SORT ) msStyle |= CBS_SORT; + if ( style & wxCLIP_SIBLINGS ) + msStyle |= WS_CLIPSIBLINGS; + + // and now create the MSW control if ( !MSWCreateControl(_T("COMBOBOX"), msStyle) ) return FALSE; diff --git a/src/msw/gauge95.cpp b/src/msw/gauge95.cpp index 8b4bfbeb90..e171056ef1 100644 --- a/src/msw/gauge95.cpp +++ b/src/msw/gauge95.cpp @@ -103,6 +103,10 @@ bool wxGauge95::Create(wxWindow *parent, wxWindowID id, long msFlags = WS_CHILD | WS_VISIBLE /* | WS_CLIPSIBLINGS */; + if ( m_windowStyle & wxCLIP_SIBLINGS ) + msFlags |= WS_CLIPSIBLINGS; + + if (m_windowStyle & wxGA_VERTICAL) msFlags |= PBS_VERTICAL; diff --git a/src/msw/gaugemsw.cpp b/src/msw/gaugemsw.cpp index 278fbfce57..ee41a2ac0e 100644 --- a/src/msw/gaugemsw.cpp +++ b/src/msw/gaugemsw.cpp @@ -109,6 +109,9 @@ bool wxGaugeMSW::Create(wxWindow *parent, wxWindowID id, if (want3D) msFlags |= ZYZGS_3D; + if ( m_windowStyle & wxCLIP_SIBLINGS ) + msFlags |= WS_CLIPSIBLINGS; + HWND wx_button = CreateWindowEx(MakeExtendedStyle(m_windowStyle), wxT("zYzGauge"), NULL, msFlags, 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId, diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index 408344a7b9..462c26bb82 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -160,6 +160,8 @@ bool wxListBox::Create(wxWindow *parent, wxASSERT_MSG( !(style & wxLB_MULTIPLE) || !(style & wxLB_EXTENDED), _T("only one of listbox selection modes can be specified") ); + if ( m_windowStyle & wxCLIP_SIBLINGS ) + wstyle |= WS_CLIPSIBLINGS; if (m_windowStyle & wxLB_MULTIPLE) wstyle |= LBS_MULTIPLESEL; diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 633cc77ce8..9aab81658d 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -190,6 +190,10 @@ bool wxListCtrl::Create(wxWindow *parent, DWORD wstyle = WS_VISIBLE | WS_CHILD | WS_TABSTOP | LVS_SHAREIMAGELISTS | LVS_SHOWSELALWAYS; + + if ( m_windowStyle & wxCLIP_SIBLINGS ) + wstyle |= WS_CLIPSIBLINGS; + if ( wxStyleHasBorder(m_windowStyle) ) wstyle |= WS_BORDER; m_baseStyle = wstyle; diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index 2bd4fa48d5..b0ede88e4e 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -1146,7 +1146,9 @@ bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style) ccs.hWindowMenu = (HMENU) parent->GetWindowMenu()->GetHMenu(); ccs.idFirstChild = wxFIRST_MDI_CHILD; - DWORD msStyle = /* MDIS_ALLCHILDSTYLES | */ WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN; + DWORD msStyle = MDIS_ALLCHILDSTYLES | WS_VISIBLE | WS_CHILD | + WS_CLIPCHILDREN | WS_CLIPSIBLINGS; + if ( style & wxHSCROLL ) msStyle |= WS_HSCROLL; if ( style & wxVSCROLL ) diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index 426b8af2a0..952ad27333 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -153,6 +153,8 @@ bool wxNotebook::Create(wxWindow *parent, long tabStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | TCS_TABS; + if ( m_windowStyle & wxCLIP_SIBLINGS ) + tabStyle |= WS_CLIPSIBLINGS; if (m_windowStyle & wxCLIP_CHILDREN) tabStyle |= WS_CLIPCHILDREN; if ( m_windowStyle & wxTC_MULTILINE ) diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp index d41d744284..fe08f6318a 100644 --- a/src/msw/radiobut.cpp +++ b/src/msw/radiobut.cpp @@ -82,6 +82,10 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, // long msStyle = groupStyle | RADIO_FLAGS; long msStyle = groupStyle | BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE /* | WS_CLIPSIBLINGS */; + if ( m_windowStyle & wxCLIP_SIBLINGS ) + msStyle |= WS_CLIPSIBLINGS; + + bool want3D; WXDWORD exStyle = Determine3DEffects(0, &want3D) ; diff --git a/src/msw/scrolbar.cpp b/src/msw/scrolbar.cpp index 607c116a1e..de8ae01ae0 100644 --- a/src/msw/scrolbar.cpp +++ b/src/msw/scrolbar.cpp @@ -81,11 +81,16 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, height = 14; } + DWORD wstyle = WS_VISIBLE | WS_CHILD; + + if ( m_windowStyle & wxCLIP_SIBLINGS ) + wstyle |= WS_CLIPSIBLINGS; + // Now create scrollbar DWORD _direction = (style & wxHORIZONTAL) ? SBS_HORZ: SBS_VERT; HWND scroll_bar = CreateWindowEx(MakeExtendedStyle(style), wxT("SCROLLBAR"), wxT("scrollbar"), - _direction | WS_CHILD | WS_VISIBLE, + _direction | wstyle, 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId, wxGetInstance(), NULL); diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp index 77cf291c9f..67d7bc1a57 100644 --- a/src/msw/slider95.cpp +++ b/src/msw/slider95.cpp @@ -84,11 +84,15 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id, int width = size.x; int height = size.y; - long msStyle ; + long msStyle=0 ; + long wstyle=0 ; + + if ( m_windowStyle & wxCLIP_SIBLINGS ) + msStyle |= WS_CLIPSIBLINGS; if ( m_windowStyle & wxSL_LABELS ) { - msStyle = WS_CHILD | WS_VISIBLE | WS_BORDER | SS_CENTER; + msStyle |= WS_CHILD | WS_VISIBLE | WS_BORDER | SS_CENTER; bool want3D; WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D) ; @@ -100,13 +104,20 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id, // Now create min static control wxSprintf(wxBuffer, wxT("%d"), minValue); + wstyle = STATIC_FLAGS; + if ( m_windowStyle & wxCLIP_SIBLINGS ) + msStyle |= WS_CLIPSIBLINGS; m_staticMin = (WXHWND) CreateWindowEx(0, wxT("STATIC"), wxBuffer, - STATIC_FLAGS, + wstyle, 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)NewControlId(), wxGetInstance(), NULL); } msStyle = 0; + + if ( m_windowStyle & wxCLIP_SIBLINGS ) + msStyle |= WS_CLIPSIBLINGS; + if (m_windowStyle & wxSL_VERTICAL) msStyle = TBS_VERT | WS_CHILD | WS_VISIBLE | WS_TABSTOP ; else @@ -157,8 +168,11 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id, { // Finally, create max value static item wxSprintf(wxBuffer, wxT("%d"), maxValue); + wstyle = STATIC_FLAGS; + if ( m_windowStyle & wxCLIP_SIBLINGS ) + msStyle |= WS_CLIPSIBLINGS; m_staticMax = (WXHWND) CreateWindowEx(0, wxT("STATIC"), wxBuffer, - STATIC_FLAGS, + wstyle, 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)NewControlId(), wxGetInstance(), NULL); diff --git a/src/msw/slidrmsw.cpp b/src/msw/slidrmsw.cpp index 4050e2c1a4..2f27084534 100644 --- a/src/msw/slidrmsw.cpp +++ b/src/msw/slidrmsw.cpp @@ -82,6 +82,9 @@ bool wxSliderMSW::Create(wxWindow *parent, wxWindowID id, long msStyle = WS_CHILD | WS_VISIBLE | WS_BORDER | SS_CENTER; + if ( m_windowStyle & wxCLIP_SIBLINGS ) + msStyle |= WS_CLIPSIBLINGS; + bool want3D; WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D) ; @@ -92,8 +95,11 @@ bool wxSliderMSW::Create(wxWindow *parent, wxWindowID id, // Now create min static control wxSprintf(wxBuffer, wxT("%d"), minValue); + DWORD wstyle = STATIC_FLAGS; + if ( m_windowStyle & wxCLIP_SIBLINGS ) + wstyle |= WS_CLIPSIBLINGS; m_staticMin = (WXHWND) CreateWindowEx(0, wxT("STATIC"), wxBuffer, - STATIC_FLAGS, + wstyle, 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)NewControlId(), wxGetInstance(), NULL); @@ -123,8 +129,11 @@ bool wxSliderMSW::Create(wxWindow *parent, wxWindowID id, // Finally, create max value static item wxSprintf(wxBuffer, wxT("%d"), maxValue); + wstyle = STATIC_FLAGS; + if ( m_windowStyle & wxCLIP_SIBLINGS ) + wstyle |= WS_CLIPSIBLINGS; m_staticMax = (WXHWND) CreateWindowEx(0, wxT("STATIC"), wxBuffer, - STATIC_FLAGS, + wstyle, 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)NewControlId(), wxGetInstance(), NULL); diff --git a/src/msw/spinbutt.cpp b/src/msw/spinbutt.cpp index 67331d98f5..81734c8ee7 100644 --- a/src/msw/spinbutt.cpp +++ b/src/msw/spinbutt.cpp @@ -110,6 +110,8 @@ bool wxSpinButton::Create(wxWindow *parent, UDS_NOTHOUSANDS | // never useful, sometimes harmful UDS_SETBUDDYINT; // it doesn't harm if we don't have buddy + if ( m_windowStyle & wxCLIP_SIBLINGS ) + wstyle |= WS_CLIPSIBLINGS; if ( m_windowStyle & wxSP_HORIZONTAL ) wstyle |= UDS_HORZ; if ( m_windowStyle & wxSP_ARROW_KEYS ) diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp index f41eb5d32d..2438d11b72 100644 --- a/src/msw/spinctrl.cpp +++ b/src/msw/spinctrl.cpp @@ -245,6 +245,10 @@ bool wxSpinCtrl::Create(wxWindow *parent, if ( want3D || wxStyleHasBorder(style) ) msStyle |= WS_BORDER; + if ( style & wxCLIP_SIBLINGS ) + msStyle |= WS_CLIPSIBLINGS; + + // create the text window m_hwndBuddy = (WXHWND)::CreateWindowEx ( diff --git a/src/msw/statbmp.cpp b/src/msw/statbmp.cpp index fd9dd5db30..11b4cd0791 100644 --- a/src/msw/statbmp.cpp +++ b/src/msw/statbmp.cpp @@ -115,6 +115,10 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id, int winstyle = BS_OWNERDRAW; #endif // Win32 + if ( m_windowStyle & wxCLIP_SIBLINGS ) + winstyle |= WS_CLIPSIBLINGS; + + m_hWnd = (WXHWND)::CreateWindow ( classname, diff --git a/src/msw/statbr95.cpp b/src/msw/statbr95.cpp index 85d27e5191..c1c3c4706f 100644 --- a/src/msw/statbr95.cpp +++ b/src/msw/statbr95.cpp @@ -122,7 +122,11 @@ bool wxStatusBar95::Create(wxWindow *parent, m_windowId = id == -1 ? NewControlId() : id; - DWORD wstyle = WS_CHILD | WS_VISIBLE /* | WS_CLIPSIBLINGS */ ; + DWORD wstyle = WS_CHILD | WS_VISIBLE; + + if ( style & wxCLIP_SIBLINGS ) + wstyle |= WS_CLIPSIBLINGS; + // setting SBARS_SIZEGRIP is perfectly useless: it's always on by default // (at least in the version of comctl32.dll I'm using), and the only way to diff --git a/src/msw/statline.cpp b/src/msw/statline.cpp index 605153f40d..2bf14042af 100644 --- a/src/msw/statline.cpp +++ b/src/msw/statline.cpp @@ -66,12 +66,17 @@ bool wxStaticLine::Create( wxWindow *parent, wxSize sizeReal = AdjustSize(size); + DWORD wstyle = WS_CHILD | WS_VISIBLE | SS_GRAYRECT | SS_SUNKEN | SS_NOTIFY; + + if ( style & wxCLIP_SIBLINGS ) + wstyle |= WS_CLIPSIBLINGS; + + m_hWnd = (WXHWND)::CreateWindow ( wxT("STATIC"), wxT(""), - WS_VISIBLE | WS_CHILD /* | WS_CLIPSIBLINGS */ | - SS_GRAYRECT | SS_SUNKEN | SS_NOTIFY, + wstyle, pos.x, pos.y, sizeReal.x, sizeReal.y, GetWinHwnd(parent), (HMENU)m_windowId, diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp index c4a61fd113..8c39245ce4 100644 --- a/src/msw/stattext.cpp +++ b/src/msw/stattext.cpp @@ -57,7 +57,10 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id, m_windowStyle = style; - long msStyle = WS_CHILD | WS_VISIBLE /* | WS_CLIPSIBLINGS */ ; + long msStyle = WS_CHILD | WS_VISIBLE; + + if ( m_windowStyle & wxCLIP_SIBLINGS ) + msStyle |= WS_CLIPSIBLINGS; if (m_windowStyle & wxALIGN_CENTRE) msStyle |= SS_CENTER; else if (m_windowStyle & wxALIGN_RIGHT) diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index dfaccbbdc9..2f534d533d 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -214,6 +214,9 @@ bool wxToolBar::Create(wxWindow *parent, if (style & wxBORDER) msflags |= WS_BORDER; + if ( style & wxCLIP_SIBLINGS ) + msflags |= WS_CLIPSIBLINGS; + #ifdef TBSTYLE_TOOLTIPS msflags |= TBSTYLE_TOOLTIPS; #endif diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 83c92f0d9b..ec254dfb85 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -159,7 +159,11 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, // translate wxWin style flags to MSW ones, checking for consistency while // doing it - long msStyle = ES_LEFT | WS_VISIBLE | WS_CHILD | WS_TABSTOP /* | WS_CLIPSIBLINGS */ ; + long msStyle = ES_LEFT | WS_VISIBLE | WS_CHILD | WS_TABSTOP; + + if ( m_windowStyle & wxCLIP_SIBLINGS ) + msStyle |= WS_CLIPSIBLINGS; + if ( m_windowStyle & wxTE_MULTILINE ) { wxASSERT_MSG( !(m_windowStyle & wxTE_PROCESS_ENTER), diff --git a/src/msw/tglbtn.cpp b/src/msw/tglbtn.cpp index f428a631fe..58889e0fb9 100644 --- a/src/msw/tglbtn.cpp +++ b/src/msw/tglbtn.cpp @@ -86,6 +86,10 @@ bool wxToggleButton::Create(wxWindow *parent, wxWindowID id, #endif long msStyle = BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP | WS_CHILD | WS_VISIBLE; + + if ( m_windowStyle & wxCLIP_SIBLINGS ) + msStyle |= WS_CLIPSIBLINGS; + #ifdef __WIN32__ if(m_windowStyle & wxBU_LEFT) msStyle |= BS_LEFT; diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 7f4fc40a5c..f42d35f685 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -527,7 +527,10 @@ bool wxTreeCtrl::Create(wxWindow *parent, return FALSE; DWORD wstyle = WS_VISIBLE | WS_CHILD | WS_TABSTOP | - TVS_SHOWSELALWAYS /* | WS_CLIPSIBLINGS */; + TVS_SHOWSELALWAYS; + + if ( m_windowStyle & wxCLIP_SIBLINGS ) + wstyle |= WS_CLIPSIBLINGS; if ((m_windowStyle & wxTR_NO_LINES) == 0) wstyle |= TVS_HASLINES; diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 67b1e4d321..b4073d6d24 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -2483,11 +2483,10 @@ bool wxWindow::MSWCreate(int id, { int controlId = 0; if ( style & WS_CHILD ) - { controlId = id; - // all child windows should clip their siblings - // style |= /* WS_CLIPSIBLINGS */ ; - } + + if ( GetWindowStyleFlag() & wxCLIP_SIBLINGS ) + style |= WS_CLIPSIBLINGS; wxString className(wclass); if ( GetWindowStyleFlag() & wxNO_FULL_REPAINT_ON_RESIZE ) -- 2.47.2