From: Vadim Zeitlin Date: Mon, 28 Jan 2002 01:40:24 +0000 (+0000) Subject: added another, more convenient, wxRGBToColour() overload X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d23c8ba2470dfc756964dc03d88b18840b055d73 added another, more convenient, wxRGBToColour() overload git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13871 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index 67bf32de92..14f3b2a2ea 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));