no changes, just removed unnecessary #ifdef __WIN32__

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-07-29 13:16:32 +00:00
parent 141fad6334
commit c4e1d0fc47

View File

@@ -161,15 +161,13 @@ bool wxButton::Create(wxWindow *parent,
wxString label(lbl); wxString label(lbl);
if (label.empty() && wxIsStockID(id)) if (label.empty() && wxIsStockID(id))
{ {
// On Windows, some buttons aren't supposed to have // On Windows, some buttons aren't supposed to have mnemonics
// mnemonics, so strip them out. label = wxGetStockLabel
(
label = wxGetStockLabel(id id,
#if defined(__WXMSW__) || defined(__WXWINCE__) id == wxID_OK || id == wxID_CANCEL || id == wxID_CLOSE
, ( id != wxID_OK && ? wxSTOCK_NOFLAGS
id != wxID_CANCEL && : wxSTOCK_WITH_MNEMONIC
id != wxID_CLOSE )
#endif
); );
} }
@@ -179,7 +177,6 @@ bool wxButton::Create(wxWindow *parent,
WXDWORD exstyle; WXDWORD exstyle;
WXDWORD msStyle = MSWGetStyle(style, &exstyle); WXDWORD msStyle = MSWGetStyle(style, &exstyle);
#ifdef __WIN32__
// if the label contains several lines we must explicitly tell the button // if the label contains several lines we must explicitly tell the button
// about it or it wouldn't draw it correctly ("\n"s would just appear as // about it or it wouldn't draw it correctly ("\n"s would just appear as
// black boxes) // black boxes)
@@ -191,7 +188,6 @@ bool wxButton::Create(wxWindow *parent,
{ {
msStyle |= BS_MULTILINE; msStyle |= BS_MULTILINE;
} }
#endif // __WIN32__
return MSWCreateControl(_T("BUTTON"), msStyle, pos, size, label, exstyle); return MSWCreateControl(_T("BUTTON"), msStyle, pos, size, label, exstyle);
} }
@@ -222,7 +218,6 @@ WXDWORD wxButton::MSWGetStyle(long style, WXDWORD *exstyle) const
// the bottom // the bottom
msStyle |= WS_CLIPSIBLINGS; msStyle |= WS_CLIPSIBLINGS;
#ifdef __WIN32__
// don't use "else if" here: weird as it is, but you may combine wxBU_LEFT // don't use "else if" here: weird as it is, but you may combine wxBU_LEFT
// and wxBU_RIGHT to get BS_CENTER! // and wxBU_RIGHT to get BS_CENTER!
if ( style & wxBU_LEFT ) if ( style & wxBU_LEFT )
@@ -238,7 +233,6 @@ WXDWORD wxButton::MSWGetStyle(long style, WXDWORD *exstyle) const
if ( style & wxNO_BORDER ) if ( style & wxNO_BORDER )
msStyle |= BS_FLAT; msStyle |= BS_FLAT;
#endif // __WXWINCE__ #endif // __WXWINCE__
#endif // __WIN32__
return msStyle; return msStyle;
} }
@@ -553,8 +547,6 @@ WXLRESULT wxButton::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
// owner-drawn buttons support // owner-drawn buttons support
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#ifdef __WIN32__
// drawing helpers // drawing helpers
static void DrawButtonText(HDC hdc, static void DrawButtonText(HDC hdc,
@@ -877,6 +869,4 @@ bool wxButton::MSWOnDraw(WXDRAWITEMSTRUCT *wxdis)
return true; return true;
} }
#endif // __WIN32__
#endif // wxUSE_BUTTON #endif // wxUSE_BUTTON