Bi0Mutati0n
February 21st, 2005, 07:00 PM
I was changing the background and text colors for my controls and when I place the code for changing the color of text in a multiline edit control, the text gets all screwed up when I scroll up or down.
This code works fine on all the other controls just not the multiline edit controls:
case WM_CTLCOLORSTATIC: {
if((HWND)lParam == hChanName) {
SetTextColor((HDC)wParam, RGB(255, 255, 255));
SetBkMode((HDC)wParam, TRANSPARENT);
return (LONG)g_hbrBackground;
}
if((HWND)lParam == hEdit) { // Read only multiline edit control
SetTextColor((HDC)wParam, RGB(255, 255, 255));
SetBkMode((HDC)wParam, TRANSPARENT);
return (LONG)g_hbrBackground;
}
} break;
What should I do to fix this?
This code works fine on all the other controls just not the multiline edit controls:
case WM_CTLCOLORSTATIC: {
if((HWND)lParam == hChanName) {
SetTextColor((HDC)wParam, RGB(255, 255, 255));
SetBkMode((HDC)wParam, TRANSPARENT);
return (LONG)g_hbrBackground;
}
if((HWND)lParam == hEdit) { // Read only multiline edit control
SetTextColor((HDC)wParam, RGB(255, 255, 255));
SetBkMode((HDC)wParam, TRANSPARENT);
return (LONG)g_hbrBackground;
}
} break;
What should I do to fix this?