bool wxBrush::RealizeResource()
{
- BOOL bOk;
- ERRORID vError;
- wxString sError;
+ bool bOk;
+ ERRORID vError;
+ wxString sError;
if (M_BRUSHDATA && M_BRUSHDATA->m_hBrush == 0L)
{
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
- wxLogError("Unable to set current color table to RGB mode. Error: %s\n", sError.c_str());
+ 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;
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.c_str());
+ wxLogError(_T("Can't set Gpi attributes for an AREABUNDLE. Error: %s\n"), sError.c_str());
}
return bOk;
}
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
M_BRUSHDATA->m_hBrush = hPS;
RealizeResource();
} // end of WxWinGdi_CPen::SetPS
-