I have a static control:
HWND hLabelControl=CreateWindowEx(WS_EX_CLIENTEDGE,"STATIC","",
WS_TABSTOP|WS_VISIBLE|WS_CHILD|SS_CENTER,0,0,24,24,
hwnd,(HMENU)hS1,GetModuleHandle(NULL),NULL);
I want the button to click the color of the text on the static label to, for example, go to red.
How can i do this?
I know that there is
SetTextColor(
_In_ HDC hdc,
_In_ COLORREF crColor
);
but I can’t figure out how to get HDC static control.
Thanks in advance.
EDIT:
This does not work:
HDC hDC=GetDC(hLabelControl);
SetTextColor(hDC,RGB(255,0,0));
source
share