![]() |
| | #1 | |
| Registered User Join Date: Sep 2007
Posts: 18
| Quote:
EDIT: I think I have found a way to do it now, de first time I did it wrong ^^ I hope someone can confirm that I am doing it right now: I set this to be global: Code: HBRUSH g_hbrBackground = CreateSolidBrush(RGB(255,255,255)); Code: case WM_CTLCOLORSTATIC: {
switch(GetDlgCtrlID((HWND) lParam)) {
case IDC_US: {
HDC hdcStatic = (HDC)wParam;
SetTextColor(hdcStatic, RGB(0, 0, 0));
SetBkMode(hdcStatic, TRANSPARENT);
return (LONG)g_hbrBackground;
break;
}
default: return DefWindowProc (hwnd, message, wParam, lParam);
}
}
Code: DeleteObject(g_hbrBackground); Last edited by Dampy; 05-17-2008 at 02:34 PM. Reason: Find a way | |
| Dampy is offline | |
| | #2 |
| Cat without Hat Join Date: Apr 2003
Posts: 8,439
| Moving to Windows forum.
__________________ All the buzzt! CornedBee"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code." - Flon's Law |
| CornedBee is offline | |
| | #3 |
| Registered User Join Date: Mar 2003
Posts: 3,844
| >> someone can confirm that I am doing it right now Looks correct. gg |
| Codeplug is offline | |
![]() |
| Tags |
| createsolidbrush, edit box, wm_ctlcolorstatic |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem aligning floating point numbers | esbo | C Programming | 4 | 01-05-2009 08:09 PM |
| creating new sets | axon | C++ Programming | 7 | 12-03-2003 06:37 PM |