[wx] Hack wxRGBToColour to hide VS size check

This commit is contained in:
zilmar 2016-01-25 17:58:33 +11:00
parent f0f8f76cfc
commit ffc6c41201
1 changed files with 4 additions and 1 deletions

View File

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