Original Post
I have a problem. In order for my lighting engine to work, I need to be able to convert a COLORREF to RGB. So, how could I write the following function (in C++):
void ColorrefToRGB(int *R, int *G, int *B, COLORREF clr)
{
// What to do! Oh, what to do! Argh!!!
}
Yeah, you get the point.
And for those who are wondering, my lighting engine uses HDC SetPixel and GetPixel so, that''s why I need to decode the COLORREF into RGB. it makes it easier.
MBDYProductions - Mike Brough - Programmer