HWND txt color

Hello,
I'm trying to give a color for 1 single HWND in my win32 api..
So far I managed to give color for txt/background but that's for all the static HWNDs i have as follow: sorry i can't put it in a quote or code for some reason

HWND txtview1
HWND txtview2
HDC hdcStatic = (HDC)wParam;
case WM_CTLCOLORSTATIC:
SetTextColor(hdcStatic, RGB(0, 0, 150));
SetBkColor(hdcStatic, RGB(0, 230, 0));
return (INT_PTR)CreateSolidBrush(RGB(255, 0255, 255));
break;

--
I know it gets applied to wParam which is the whole thing..
But I want to apply it to 1 single HWND called (txtview1) not to txtview2 too
I tried:
HDC hdcStatic = GetDC(txtview1)
but it doesn't take affect, any help is much appreciated
thank you in advance.
The lParam contains the HWND of the your textview. Thus you can do something like this:
1
2
3
4
5
6
if(((HWND) lParam)==txtview1)
{
SetTextColor(hdcStatic, RGB(0, 0, 150));
SetBkColor(hdcStatic, RGB(0, 230, 0));
...
}
Topic archived. No new replies allowed.