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:
Any ideas?Code: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)); SetBkMode(hdcStatic, TRANSPARENT); SetTextColor(hdcStatic, RGB(r, g, b)); }



LinkBack URL
About LinkBacks


