case WM_CREATE:
{
HWND hEdit;
hEdit = CreateWindow( //edit控件
L"edit",
L"create",
WS_VISIBLE | WS_CHILD | WS_BORDER/*|DT_CENTER*/ | DT_VCENTER,
100, 70, 100, 25,
hWnd,
NULL,
NULL,
NULL);
HFONT hFont = CreateFont(20, 0, 0, 0, 0, FALSE, FALSE, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_SWISS, L"微软雅黑");//创建字体
::SendMessage(hEdit, WM_SETFONT, (WPARAM)hFont, 1); //设置控件字体
}
该段代码创建了一个最基本的win32文本框