> Look for "private.h", and see what is the expansion of wxColourToRGB.

I find the following starting on line 109045

# 217 "H:/MinGW/msys/1.0/local/include/wx-2.8/wx/msw/private.h"
inline COLORREF wxColourToRGB(const wxColour& c)
{
    return RGB(c.Red(), c.Green(), c.Blue());
}

The various references #include wingdi.h lines are near line 26000.