LRESULT CALLBACK WindowProcedure HWND hwnd UINT message WPARAM wParam

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_CREATE:
hFont = CreateFont(-11, 0, 0, 0, FW_NORMAL, FALSE, FALSE,
0, ANSI_CHARSET, OUT_DEFAULT_PRECIS,
CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
DEFAULT_PITCH | FF_SWISS, L"Tahoma");
hText = CreateWindow(L"STATIC", L"Статик контрол",
WS_CHILD | WS_VISIBLE | SS_LEFT,
10, 10, 200, 15,
hwnd, NULL, NULL, NULL);
SendMessage(hText, WM_SETFONT, (WPARAM)hFont, 0);
break;
case WM_DESTROY:
PostQuitMessage (0);
break;
default:
return DefWindowProc (hwnd, message, wParam, lParam);
}
return 0;
}