Hi
I have a little problem with my program.
I am creating an EDIT-box with this line:
Code:
HWND hA = CreateWindowEx(0, "EDIT", "", WS_CHILD|WS_TABSTOP|WS_VISIBLE|WS_BORDER, 5, 22, 165, 20, hwnd, (HMENU)IDC_US, GetModuleHandle(NULL), NULL);
After the user presses “ok” I send:
Code:
SendMessage(hA, EM_SETREADONLY, (WPARAM) TRUE, 0);
to make the box “readonly”.
Then the box color chance to gray, but I want it to be white.
To do so I use this in my WindowProcedure:
Code:
case WM_CTLCOLORSTATIC: {
switch(GetDlgCtrlID((HWND) lParam)) {
case IDC_US:
#define WHITE 0x0FFFFFFF
CreateSolidBrush(WHITE);
break;
default: return DefWindowProc (hwnd, message, wParam, lParam);
}
}
It works fine, but the problem is that the border around the box goes bigger?
Why? Can I block or chance it?
____Pic:
LINK
Sorry for my bad eng =)