X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b07664068bc48173d08e3146ca05dceac275aa6a..b5435dccd098ae153c3b7b3b8fca8dd0d763986c:/src/msw/tglbtn.cpp diff --git a/src/msw/tglbtn.cpp b/src/msw/tglbtn.cpp index 58889e0fb9..b73b9aa4eb 100644 --- a/src/msw/tglbtn.cpp +++ b/src/msw/tglbtn.cpp @@ -73,6 +73,12 @@ bool wxToggleButton::Create(wxWindow *parent, wxWindowID id, const wxValidator& validator, const wxString& name) { + // default border for this control is none + if ( (style & wxBORDER_MASK) == wxBORDER_DEFAULT ) + { + style |= wxBORDER_NONE; + } + if (!CreateBase(parent, id, pos, size, style, validator, name)) return FALSE; @@ -85,10 +91,10 @@ bool wxToggleButton::Create(wxWindow *parent, wxWindowID id, #define BS_PUSHLIKE 0x00001000L #endif - long msStyle = BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP | WS_CHILD | WS_VISIBLE; + WXDWORD exStyle = 0; + long msStyle = MSWGetStyle(style, & exStyle) ; - if ( m_windowStyle & wxCLIP_SIBLINGS ) - msStyle |= WS_CLIPSIBLINGS; + msStyle |= BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP ; #ifdef __WIN32__ if(m_windowStyle & wxBU_LEFT) @@ -101,7 +107,7 @@ bool wxToggleButton::Create(wxWindow *parent, wxWindowID id, msStyle |= BS_BOTTOM; #endif - m_hWnd = (WXHWND)CreateWindowEx(MakeExtendedStyle(m_windowStyle), + m_hWnd = (WXHWND)CreateWindowEx(exStyle, wxT("BUTTON"), label, msStyle, 0, 0, 0, 0, (HWND)parent->GetHWND(),