- Update icons
[reactos.git] / reactos / dll / cpl / console / font.c
1 /* $Id: font.c 29690 2007-10-19 23:21:45Z dreimer $
2 *
3 * PROJECT: ReactOS Console Configuration DLL
4 * LICENSE: GPL - See COPYING in the top level directory
5 * FILE: dll/win32/console/font.c
6 * PURPOSE: displays font dialog
7 * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@student.tugraz.at)
8 */
9
10
11 #include "console.h"
12
13 INT_PTR
14 CALLBACK
15 FontProc(
16 HWND hwndDlg,
17 UINT uMsg,
18 WPARAM wParam,
19 LPARAM lParam
20 )
21 {
22 LPDRAWITEMSTRUCT drawItem;
23 PConsoleInfo pConInfo = (PConsoleInfo)GetWindowLongPtr(hwndDlg, DWLP_USER);
24
25 UNREFERENCED_PARAMETER(hwndDlg);
26 UNREFERENCED_PARAMETER(wParam);
27
28
29 switch(uMsg)
30 {
31 case WM_INITDIALOG:
32 {
33 pConInfo = (PConsoleInfo) ((LPPROPSHEETPAGE)lParam)->lParam;
34 SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pConInfo);
35 return TRUE;
36 }
37 case WM_DRAWITEM:
38 {
39 drawItem = (LPDRAWITEMSTRUCT)lParam;
40 if (drawItem->CtlID == IDC_STATIC_FONT_WINDOW_PREVIEW)
41 {
42 PaintConsole(drawItem, pConInfo);
43 }
44 else if (drawItem->CtlID == IDC_STATIC_SELECT_FONT_PREVIEW)
45 {
46 PaintText(drawItem, pConInfo);
47 }
48 return TRUE;
49 }
50 default:
51 {
52 break;
53 }
54 }
55
56 return FALSE;
57 }