X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8d854fa93f8f5a48e383395060063a7931bf0207..73bb565476333d8446e556cc39fa22a778075585:/src/os2/brush.cpp diff --git a/src/os2/brush.cpp b/src/os2/brush.cpp index ed7e7e1554..45fadb451a 100644 --- a/src/os2/brush.cpp +++ b/src/os2/brush.cpp @@ -19,6 +19,7 @@ #include "wx/utils.h" #include "wx/app.h" #include "wx/brush.h" +#include "wx/log.h" #endif #include "wx/os2/private.h" @@ -101,9 +102,9 @@ wxBrush::wxBrush( bool wxBrush::RealizeResource() { - BOOL bOk; - ERRORID vError; - wxString sError; + bool bOk; + ERRORID vError; + wxString sError; if (M_BRUSHDATA && M_BRUSHDATA->m_hBrush == 0L) { @@ -137,13 +138,13 @@ bool wxBrush::RealizeResource() { vError = ::WinGetLastError(vHabmain); sError = wxPMErrorToStr(vError); - wxLogError("Unable to set current color table to RGB mode. Error: %s\n", sError); + wxLogError(_T("Unable to set current color table to RGB mode. Error: %s\n"), sError.c_str()); return FALSE; } if (M_BRUSHDATA->m_nStyle==wxTRANSPARENT) { - return TRUE; + return true; } COLORREF vPmColour = 0L; @@ -208,18 +209,18 @@ bool wxBrush::RealizeResource() M_BRUSHDATA->m_vBundle.usMixMode = FM_OVERPAINT; M_BRUSHDATA->m_vBundle.usBackMixMode = BM_OVERPAINT; - bOk = ::GpiSetAttrs( M_BRUSHDATA->m_hBrush - ,PRIM_AREA - ,ABB_COLOR | ABB_BACK_COLOR | ABB_MIX_MODE | ABB_BACK_MIX_MODE | - ABB_SET | ABB_SYMBOL - ,ABB_REF_POINT - ,&M_BRUSHDATA->m_vBundle - ); + bOk = (bool)::GpiSetAttrs( M_BRUSHDATA->m_hBrush + ,PRIM_AREA + ,ABB_COLOR | ABB_BACK_COLOR | ABB_MIX_MODE | ABB_BACK_MIX_MODE | + ABB_SET | ABB_SYMBOL + ,ABB_REF_POINT + ,&M_BRUSHDATA->m_vBundle + ); if (!bOk) { vError = ::WinGetLastError(vHabmain); sError = wxPMErrorToStr(vError); - wxLogError("Can't set Gpi attributes for an AREABUNDLE. Error: %s\n", sError); + wxLogError(_T("Can't set Gpi attributes for an AREABUNDLE. Error: %s\n"), sError.c_str()); } return bOk; } @@ -233,14 +234,12 @@ WXHANDLE wxBrush::GetResourceHandle() return (WXHANDLE)M_BRUSHDATA->m_hBrush; } // end of wxBrush::GetResourceHandle -bool wxBrush::FreeResource( - bool WXUNUSED(bForce) -) +bool wxBrush::FreeResource( bool WXUNUSED(bForce) ) { if (M_BRUSHDATA && (M_BRUSHDATA->m_hBrush != 0)) { M_BRUSHDATA->m_hBrush = 0; - return TRUE; + return true; } else return FALSE; } // end of wxBrush::FreeResource @@ -318,4 +317,3 @@ void wxBrush::SetPS( M_BRUSHDATA->m_hBrush = hPS; RealizeResource(); } // end of WxWinGdi_CPen::SetPS -