Here's a thought
#define RGB_GETBLUE(rgb) (((rgb) >> 16) & 0xff)
#define RGB_GETGREEN(rgb) (((rgb) >> 8) & 0xff)
#define RGB_GETRED(rgb) ((rgb) & 0xff)
COLORREF pix = ::GetPixel(hDC, x, y);
int red = RGB_GETRED(pix);
int green = RGB_GETGREEN(pix);
int blue = RGB_GETBLUE(pix);
float shadowEffect = 0.5f;
red = static_cast<int>(red * shadowEffect);
green = static_cast<int>(green * shadowEffect);
blue = static_cast<int>(blue * shadowEffect);
::SetPixel(hDC, x, y, RGB(red, green, blue));