X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2bda0e173844e8e0f8acf4e8ad8b5c26e5c6fe5d..02e8b2f9fbdfcd25080c42082d637da257c20094:/src/msw/bmpbuttn.cpp diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp index 7d9c245c29..af8a1e72fe 100644 --- a/src/msw/bmpbuttn.cpp +++ b/src/msw/bmpbuttn.cpp @@ -32,9 +32,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton) #define BUTTON_HEIGHT_FACTOR (EDIT_CONTROL_FACTOR * 1.1) -bool wxBitmapButton::Create(wxWindow *parent, const wxWindowID id, const wxBitmap& bitmap, +bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos, - const wxSize& size, const long style, + const wxSize& size, long style, const wxValidator& validator, const wxString& name) { @@ -82,9 +82,7 @@ bool wxBitmapButton::Create(wxWindow *parent, const wxWindowID id, const wxBitma // Subclass again for purposes of dialog editing mode SubclassWin((WXHWND)wx_button); - // TODO? If in future we have a facility for having a label as well - // as a bitmap, set the font. -// SetFont(parent->GetFont()) ; + SetFont(* parent->GetFont()) ; SetSize(x, y, width, height); ShowWindow(wx_button, SW_SHOW); @@ -130,7 +128,7 @@ bool wxBitmapButton::MSWOnDraw(WXDRAWITEMSTRUCT *item) HDC hDC = lpDIS->hDC; HDC memDC = ::CreateCompatibleDC(hDC); - HBITMAP old = ::SelectObject(memDC, (HBITMAP) bitmap->GetHBITMAP()); + HBITMAP old = (HBITMAP) ::SelectObject(memDC, (HBITMAP) bitmap->GetHBITMAP()); if (!old) return FALSE; @@ -194,8 +192,8 @@ void wxBitmapButton::DrawFace( WXHDC dc, int left, int top, int right, int botto ms_color = GetSysColor(COLOR_BTNFACE) ; brushFace = CreateSolidBrush(ms_color) ; - oldp = SelectObject( (HDC) dc, GetStockObject( NULL_PEN ) ) ; - oldb = SelectObject( (HDC) dc, brushFace ) ; + oldp = (HPEN) SelectObject( (HDC) dc, GetStockObject( NULL_PEN ) ) ; + oldb = (HBRUSH) SelectObject( (HDC) dc, brushFace ) ; Rectangle( (HDC) dc, left, top, right, bottom ) ; SelectObject( (HDC) dc, penBorder) ; MoveToEx((HDC) dc,left+1,top,NULL);LineTo((HDC) dc,right-1,top); @@ -252,7 +250,7 @@ void wxBitmapButton::DrawButtonFocus( WXHDC dc, int left, int top, int right, in extern HBRUSH wxDisableButtonBrush; void wxBitmapButton::DrawButtonDisable( WXHDC dc, int left, int top, int right, int bottom, bool with_marg ) { - HBRUSH old = SelectObject( (HDC) dc, wxDisableButtonBrush ) ; + HBRUSH old = (HBRUSH) SelectObject( (HDC) dc, wxDisableButtonBrush ) ; if ( with_marg ) ::PatBlt( (HDC) dc, left + m_marginX, top + m_marginY,