]> git.saurik.com Git - wxWidgets.git/commitdiff
added another, more convenient, wxRGBToColour() overload
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 28 Jan 2002 01:40:24 +0000 (01:40 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 28 Jan 2002 01:40:24 +0000 (01:40 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13871 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/private.h

index 67bf32de92d5c9069bf642ac266d0876c6eaa7d6..14f3b2a2eaa23277a3f84ce6ae20e162a5eafbb1 100644 (file)
@@ -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));