X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/90c1530adf4014047991d04edf1f097808a88027..52750c2e106113bc8d1c46289474adfd405d5ade:/include/wx/msw/private.h diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index 67bf32de92..23aaba1766 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -207,6 +207,11 @@ inline COLORREF wxColourToRGB(const wxColour& c) return PALETTERGB(c.Red(), c.Green(), c.Blue()); } +inline wxColour wxRGBToColour(COLORREF rgb) +{ + return wxColour(GetRValue(rgb), GetGValue(rgb), GetBValue(rgb)); +} + inline void wxRGBToColour(wxColour& c, COLORREF rgb) { c.Set(GetRValue(rgb), GetGValue(rgb), GetBValue(rgb)); @@ -391,7 +396,7 @@ private: #define GetHfontOf(font) ((HFONT)(font).GetHFONT()) #define GetHpalette() ((HPALETTE)GetHPALETTE()) -#define GetHpaletteOf(pal) ((HPALETTE)(pal)->GetHPALETTE()) +#define GetHpaletteOf(pal) ((HPALETTE)(pal).GetHPALETTE()) #define GetHrgn() ((HRGN)GetHRGN()) #define GetHrgnOf(rgn) ((HRGN)(rgn).GetHRGN())