I'm sorta lost this is what I did and nothing happened.
Code:
SendMessage(hParentWindow, WM_CTLCOLOREDIT, (WPARAM)hDC, iEditControlID);
The edit control is created as follows.
Code:
bool CEditControl::Create(DWORD dwStyleEx, DWORD dwStyle, int iX, int iY,
int iWidth, int iHeight, HWND hParentWindow,
HINSTANCE hInstance)
{
g_hEdit = CreateWindowEx(
dwStyleEx,
"EDIT",
NULL,
dwStyle,
iX,
iY,
iWidth,
iHeight,
hParentWindow,
(HMENU)g_iEditControlID,
hInstance,
NULL
);
if(!g_hEdit)
{
MessageBox(hParentWindow, "Can't create edit control!", "Error!",
MB_ICONEXCLAMATION | MB_OK);
return false;
}
SendMessage(g_hEdit, WM_SETFONT,
(WPARAM)GetStockObject(DEFAULT_GUI_FONT),
MAKELPARAM(TRUE, 0));
return true && g_hEdit && g_iEditControlID;
}
Here is the call to Font.Change
Code:
Font.Change(hwnd, g_hDC, EditControl.g_iEditControlID);