case WM_CREATE:
GetClientRect (hWnd, &Rc);
InflateRect (&Rc, -10, -10);
StatusArea = DisplayArea = Rc;
StatusArea.top = StatusArea.bottom - 32;
DisplayArea.top += 32;
DisplayArea.bottom = StatusArea.top - 10;
EditWnd = CreateWindowEx (WS_EX_STATICEDGE | WS_EX_CLIENTEDGE, "EDITCTL", NULL,
WS_VISIBLE | WS_CHILD | ES_AUTOHSCROLL,
Rc.left, Rc.top, Rc.right -
Rc.left, 22,
hWnd, (HMENU) IDC_EDIT, hInst, NULL);
SendMessage (EditWnd, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG (8, 8));
SendMessage (EditWnd, WM_SETFONT,
int (GetStockObject (DEFAULT_GUI_FONT)),
MAKELPARAM (false, 0));
DisplayFont = <strong>CreateFont (-12, 0, 0, 0, FW_DONTCARE, false, false, false, OEM_CHARSET,</strong>
<strong> OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,</strong>
<strong> DEFAULT_PITCH | FF_DONTCARE, "Arial");</strong>
SetFocus (EditWnd);
break;
and then to use
HDC Dc = GetDC (MainWnd);
<strong>SelectObject (Dc, DisplayFont);</strong>
SetBkMode (Dc, TRANSPARENT);
There is a utility provided with VC++ 6.0 called FontView. It allows you to visually see what all the setting will do and then you need just duplicate them in CreateFont