wxWidgets: change wxRGBToColour to not use the macro (fix small type warning)

This commit is contained in:
zilmar 2013-04-11 11:32:07 +10:00
parent 688cdf6f10
commit e399273dbd
1 changed files with 4 additions and 1 deletions

View File

@ -251,7 +251,10 @@ inline COLORREF wxColourToPalRGB(const wxColour& c)
inline wxColour wxRGBToColour(COLORREF rgb)
{
return wxColour(GetRValue(rgb), GetGValue(rgb), GetBValue(rgb));
unsigned char red = (unsigned char)((rgb >> 16) & 0xFF);
unsigned char green = (unsigned char)(((rgb & 0xFFFF) >> 8) & 0xFF);
unsigned char blue = (unsigned char)(rgb & 0xFF) ;
return wxColour(red, green, blue);
}
inline void wxRGBToColour(wxColour& c, COLORREF rgb)