Changing the colour of static text.
Hey, i'm trying to create a function that will change the colour of a string of static text by passing its resource ID. So far the function i have doesn't seem to be working but everything compiles fine with no errors:
void SetStaticTextColour(HWND hwnd, WPARAM wParam, int ID, unsigned short r, unsigned short g, unsigned short b)
HDC hdcStatic = (HDC)wParam;
PostMessage(hwnd, WM_CTLCOLORSTATIC, (WPARAM)hdcStatic, (LPARAM)MAKEINTRESOURCE(ID));
SetTextColor(hdcStatic, RGB(r, g, b));