I'm trying to change the background color in a edit control. The help files say catch the WM_CTLCOLOREDIT message which gives you the HWND in the lParam and HDC in the wParam. The message call appears to be right. However, neither SetBkColor or SetTextColor work in this context.
case WM_CTLCOLOREDIT:
[tab]SetBkColor((HDC)wParam, RGB(0,0,0)); // doesn't work
[tab]GetClientRect(ghEdit, &cr);
[tab]FillRect((HDC)wParam, &cr, CreateSolidBrush(RGB(255,66,00)));// works but only proves the hdc is valid
[tab]break;
--Will Duty
wduty@radicalfringe.com
case WM_CTLCOLOREDIT:
[tab]SetBkColor((HDC)wParam, RGB(0,0,0)); // doesn't work
[tab]GetClientRect(ghEdit, &cr);
[tab]FillRect((HDC)wParam, &cr, CreateSolidBrush(RGB(255,66,00)));// works but only proves the hdc is valid
[tab]break;
--Will Duty
wduty@radicalfringe.com