mirror of
https://github.com/reactos/reactos.git
synced 2025-01-12 01:00:06 +00:00
c424146e2c
svn path=/branches/cmake-bringup/; revision=48236
56 lines
1.1 KiB
C
56 lines
1.1 KiB
C
/*
|
|
* PROJECT: ReactOS Console Configuration DLL
|
|
* LICENSE: GPL - See COPYING in the top level directory
|
|
* FILE: dll/win32/console/font.c
|
|
* PURPOSE: displays font dialog
|
|
* PROGRAMMERS: Johannes Anderwald (johannes.anderwald@student.tugraz.at)
|
|
*/
|
|
|
|
|
|
#include "console.h"
|
|
|
|
INT_PTR
|
|
CALLBACK
|
|
FontProc(
|
|
HWND hwndDlg,
|
|
UINT uMsg,
|
|
WPARAM wParam,
|
|
LPARAM lParam
|
|
)
|
|
{
|
|
LPDRAWITEMSTRUCT drawItem;
|
|
PConsoleInfo pConInfo = (PConsoleInfo)GetWindowLongPtr(hwndDlg, DWLP_USER);
|
|
|
|
UNREFERENCED_PARAMETER(hwndDlg);
|
|
UNREFERENCED_PARAMETER(wParam);
|
|
|
|
|
|
switch(uMsg)
|
|
{
|
|
case WM_INITDIALOG:
|
|
{
|
|
pConInfo = (PConsoleInfo) ((LPPROPSHEETPAGE)lParam)->lParam;
|
|
SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pConInfo);
|
|
return TRUE;
|
|
}
|
|
case WM_DRAWITEM:
|
|
{
|
|
drawItem = (LPDRAWITEMSTRUCT)lParam;
|
|
if (drawItem->CtlID == IDC_STATIC_FONT_WINDOW_PREVIEW)
|
|
{
|
|
PaintConsole(drawItem, pConInfo);
|
|
}
|
|
else if (drawItem->CtlID == IDC_STATIC_SELECT_FONT_PREVIEW)
|
|
{
|
|
PaintText(drawItem, pConInfo);
|
|
}
|
|
return TRUE;
|
|
}
|
|
default:
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
|
|
return FALSE;
|
|
}
|