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 );
}
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;
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;
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
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) &&
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;
long msFlags = WS_CHILD | WS_VISIBLE /* | WS_CLIPSIBLINGS */;
+ if ( m_windowStyle & wxCLIP_SIBLINGS )
+ msFlags |= WS_CLIPSIBLINGS;
+
+
if (m_windowStyle & wxGA_VERTICAL)
msFlags |= PBS_VERTICAL;
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,
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;
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;
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 )
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 )
// 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) ;
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);
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) ;
// 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
{
// 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);
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) ;
// 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);
// 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);
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 )
if ( want3D || wxStyleHasBorder(style) )
msStyle |= WS_BORDER;
+ if ( style & wxCLIP_SIBLINGS )
+ msStyle |= WS_CLIPSIBLINGS;
+
+
// create the text window
m_hwndBuddy = (WXHWND)::CreateWindowEx
(
int winstyle = BS_OWNERDRAW;
#endif // Win32
+ if ( m_windowStyle & wxCLIP_SIBLINGS )
+ winstyle |= WS_CLIPSIBLINGS;
+
+
m_hWnd = (WXHWND)::CreateWindow
(
classname,
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
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,
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)
if (style & wxBORDER)
msflags |= WS_BORDER;
+ if ( style & wxCLIP_SIBLINGS )
+ msflags |= WS_CLIPSIBLINGS;
+
#ifdef TBSTYLE_TOOLTIPS
msflags |= TBSTYLE_TOOLTIPS;
#endif
// 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),
#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;
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;
{
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 )