ReactOS 0.4.16-dev-297-gc569aee
precomp.h File Reference
#include <windows.h>
#include <windowsx.h>
#include <commctrl.h>
#include <strsafe.h>
#include "resource.h"
#include "customwndclasses.h"
#include "raw.h"
#include "cpi.h"
#include "psf.h"
Include dependency graph for precomp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _VGAFONT
 
struct  _MAIN_WND_INFO
 
struct  _FONT_OPEN_INFO
 
struct  _FONT_WND_INFO
 
struct  _EDIT_GLYPH_INFO
 

Macros

#define ID_MDI_FIRSTCHILD   50000
 
#define CHARACTER_INFO_BOX_WIDTH   55
 
#define CHARACTER_INFO_BOX_HEIGHT   16
 
#define CHARACTER_BITMAP_BOX_HEIGHT   14
 
#define CHARACTER_BOX_WIDTH   (CHARACTER_INFO_BOX_WIDTH)
 
#define CHARACTER_BOX_HEIGHT   (CHARACTER_INFO_BOX_HEIGHT + CHARACTER_BITMAP_BOX_HEIGHT)
 
#define CHARACTER_BOX_PADDING   5
 
#define FONT_BOXES_WND_WIDTH   (CHARACTER_BOX_WIDTH * 16 + CHARACTER_BOX_PADDING * 15)
 
#define FONT_BOXES_WND_HEIGHT   (CHARACTER_BOX_HEIGHT * 16 + CHARACTER_BOX_PADDING * 15)
 
#define FONT_WND_MIN_WIDTH   (FONT_BOXES_WND_WIDTH + 25)
 
#define FONT_WND_MIN_HEIGHT   (FONT_BOXES_WND_HEIGHT + GetSystemMetrics(SM_CYCAPTION) + 25)
 
#define HITTEST_SEPARATOR   -1
 
#define WM_USER_APPCLOSE   (WM_USER + 1)
 
#define TOOLBAR_EDIT_GLYPH   0
 
#define TOOLBOX_PEN   0
 

Typedefs

typedef struct _VGAFONT VGAFONT
 
typedef struct _VGAFONTPVGAFONT
 
typedef struct _FONT_WND_INFO FONT_WND_INFO
 
typedef struct _FONT_WND_INFOPFONT_WND_INFO
 
typedef struct _EDIT_GLYPH_INFO EDIT_GLYPH_INFO
 
typedef struct _EDIT_GLYPH_INFOPEDIT_GLYPH_INFO
 
typedef struct _MAIN_WND_INFO MAIN_WND_INFO
 
typedef struct _MAIN_WND_INFOPMAIN_WND_INFO
 
typedef struct _FONT_OPEN_INFO FONT_OPEN_INFO
 
typedef struct _FONT_OPEN_INFOPFONT_OPEN_INFO
 

Enumerations

enum  VGAFONT_TYPE { RAW , CPI , PSF }
 

Functions

INT_PTR CALLBACK AboutDlgProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK EditGlyphDlgProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
BOOL InitEditGlyphWndClasses (VOID)
 
VOID UnInitEditGlyphWndClasses (VOID)
 
VOID CreateFontBoxesWindow (PFONT_WND_INFO FontWndInfo)
 
BOOL InitFontBoxesWndClass (VOID)
 
VOID UnInitFontBoxesWndClass (VOID)
 
VOID GetCharacterRect (IN UINT uFontRow, IN UINT uFontColumn, OUT LPRECT CharacterRect)
 
VOID EditCurrentGlyph (PFONT_WND_INFO FontWndInfo)
 
static __inline VOID GetCharacterPosition (IN UINT uCharacter, OUT PUINT uFontRow, OUT PUINT uFontColumn)
 
BOOL CreateFontWindow (PMAIN_WND_INFO MainWndInfo, PFONT_OPEN_INFO OpenInfo)
 
BOOL InitFontWndClass (VOID)
 
VOID UnInitFontWndClass (VOID)
 
BOOL CreateMainWindow (IN INT nCmdShow, OUT PMAIN_WND_INFO *Info)
 
BOOL InitMainWndClass (VOID)
 
VOID UnInitMainWndClass (VOID)
 
VOID DoFileSave (IN PMAIN_WND_INFO Info, IN BOOL bSaveAs)
 
VOID SetToolbarFileButtonState (IN PMAIN_WND_INFO Info, BOOL bEnabled)
 
VOID SetPasteButtonState (IN PMAIN_WND_INFO Info)
 
INT AllocAndLoadString (OUT PWSTR *lpTarget, IN UINT uID)
 
DWORD LoadAndFormatString (IN UINT uID, OUT PWSTR *lpTarget,...)
 
VOID LocalizedError (IN UINT uID,...)
 
VOID FileInitialize (HWND hwnd)
 
BOOL DoOpenFile (OUT PWSTR pszFileName)
 
BOOL DoSaveFile (IN PWSTR pszFileName)
 

Variables

PWSTR szAppName
 
HINSTANCE hInstance
 
HANDLE hProcessHeap
 
UINT uCharacterClipboardFormat
 

Macro Definition Documentation

◆ CHARACTER_BITMAP_BOX_HEIGHT

#define CHARACTER_BITMAP_BOX_HEIGHT   14

Definition at line 102 of file precomp.h.

◆ CHARACTER_BOX_HEIGHT

Definition at line 104 of file precomp.h.

◆ CHARACTER_BOX_PADDING

#define CHARACTER_BOX_PADDING   5

Definition at line 105 of file precomp.h.

◆ CHARACTER_BOX_WIDTH

#define CHARACTER_BOX_WIDTH   (CHARACTER_INFO_BOX_WIDTH)

Definition at line 103 of file precomp.h.

◆ CHARACTER_INFO_BOX_HEIGHT

#define CHARACTER_INFO_BOX_HEIGHT   16

Definition at line 101 of file precomp.h.

◆ CHARACTER_INFO_BOX_WIDTH

#define CHARACTER_INFO_BOX_WIDTH   55

Definition at line 100 of file precomp.h.

◆ FONT_BOXES_WND_HEIGHT

#define FONT_BOXES_WND_HEIGHT   (CHARACTER_BOX_HEIGHT * 16 + CHARACTER_BOX_PADDING * 15)

Definition at line 107 of file precomp.h.

◆ FONT_BOXES_WND_WIDTH

#define FONT_BOXES_WND_WIDTH   (CHARACTER_BOX_WIDTH * 16 + CHARACTER_BOX_PADDING * 15)

Definition at line 106 of file precomp.h.

◆ FONT_WND_MIN_HEIGHT

#define FONT_WND_MIN_HEIGHT   (FONT_BOXES_WND_HEIGHT + GetSystemMetrics(SM_CYCAPTION) + 25)

Definition at line 109 of file precomp.h.

◆ FONT_WND_MIN_WIDTH

#define FONT_WND_MIN_WIDTH   (FONT_BOXES_WND_WIDTH + 25)

Definition at line 108 of file precomp.h.

◆ HITTEST_SEPARATOR

#define HITTEST_SEPARATOR   -1

Definition at line 112 of file precomp.h.

◆ ID_MDI_FIRSTCHILD

#define ID_MDI_FIRSTCHILD   50000

Definition at line 97 of file precomp.h.

◆ TOOLBAR_EDIT_GLYPH

#define TOOLBAR_EDIT_GLYPH   0

Definition at line 118 of file precomp.h.

◆ TOOLBOX_PEN

#define TOOLBOX_PEN   0

Definition at line 119 of file precomp.h.

◆ WM_USER_APPCLOSE

#define WM_USER_APPCLOSE   (WM_USER + 1)

Definition at line 115 of file precomp.h.

Typedef Documentation

◆ EDIT_GLYPH_INFO

Definition at line 37 of file precomp.h.

◆ FONT_OPEN_INFO

◆ FONT_WND_INFO

Definition at line 36 of file precomp.h.

◆ MAIN_WND_INFO

◆ PEDIT_GLYPH_INFO

Definition at line 37 of file precomp.h.

◆ PFONT_OPEN_INFO

◆ PFONT_WND_INFO

Definition at line 36 of file precomp.h.

◆ PMAIN_WND_INFO

◆ PVGAFONT

◆ VGAFONT

Enumeration Type Documentation

◆ VGAFONT_TYPE

Enumerator
RAW 
CPI 
PSF 

Definition at line 22 of file precomp.h.

23{
24 RAW,
25 CPI,
26 PSF
VGAFONT_TYPE
Definition: precomp.h:23
@ CPI
Definition: precomp.h:25
@ PSF
Definition: precomp.h:26
@ RAW
Definition: precomp.h:24

Function Documentation

◆ AboutDlgProc()

INT_PTR CALLBACK AboutDlgProc ( HWND  hwnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 11 of file aboutdlg.c.

12{
14
15 switch(uMsg)
16 {
17 case WM_COMMAND:
18 if( LOWORD(wParam) == IDCANCEL )
19 {
20 EndDialog(hwnd, 0);
21 return TRUE;
22 }
23 break;
24
25 case WM_INITDIALOG:
26 return TRUE;
27 }
28
29 return FALSE;
30}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:325
#define LOWORD(l)
Definition: pedump.c:82
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
#define IDCANCEL
Definition: winuser.h:834
#define WM_COMMAND
Definition: winuser.h:1743
#define WM_INITDIALOG
Definition: winuser.h:1742
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)

◆ AllocAndLoadString()

INT AllocAndLoadString ( OUT PWSTR lpTarget,
IN UINT  uID 
)

◆ CreateFontBoxesWindow()

VOID CreateFontBoxesWindow ( PFONT_WND_INFO  FontWndInfo)

◆ CreateFontWindow()

BOOL CreateFontWindow ( PMAIN_WND_INFO  MainWndInfo,
PFONT_OPEN_INFO  OpenInfo 
)

◆ CreateMainWindow()

BOOL CreateMainWindow ( IN INT  nCmdShow,
OUT PMAIN_WND_INFO Info 
)

Definition at line 608 of file mainwnd.c.

609{
611
613
614 if(*Info)
615 {
616 (*Info)->nCmdShow = nCmdShow;
617
620 szAppName,
626 NULL,
628 hInstance,
629 *Info);
630
631 if(hMainWnd)
632 return TRUE;
633 else
635 }
636
637 return FALSE;
638}
static const WCHAR szMainWndClass[]
Definition: mainwnd.c:15
struct _MAIN_WND_INFO * PMAIN_WND_INFO
#define IDM_MAINMENU
Definition: resources.h:3
HINSTANCE hInstance
Definition: charmap.c:19
#define NULL
Definition: types.h:112
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
HANDLE hProcessHeap
Definition: kbswitch.c:37
HWND hMainWnd
Definition: magnifier.c:32
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_CLIPCHILDREN
Definition: pedump.c:619
TCHAR szAppName[128]
Definition: solitaire.cpp:18
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
#define CW_USEDEFAULT
Definition: winuser.h:225
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
HMENU WINAPI LoadMenuW(_In_opt_ HINSTANCE, _In_ LPCWSTR)

◆ DoFileSave()

VOID DoFileSave ( IN PMAIN_WND_INFO  Info,
IN BOOL  bSaveAs 
)

Definition at line 289 of file mainwnd.c.

290{
291 DWORD dwBytesWritten;
293
294 // Show the "Save" dialog
295 // - if "Save As" was clicked
296 // - if the file was not yet saved
297 // - if another format than the binary format was opened
298 if(bSaveAs || !Info->CurrentFontWnd->OpenInfo->bBinaryFileOpened)
299 {
300 if(!Info->CurrentFontWnd->OpenInfo->pszFileName)
301 {
302 Info->CurrentFontWnd->OpenInfo->pszFileName = (PWSTR) HeapAlloc(hProcessHeap, 0, MAX_PATH);
303 Info->CurrentFontWnd->OpenInfo->pszFileName[0] = 0;
304 }
305 else if(!Info->CurrentFontWnd->OpenInfo->bBinaryFileOpened)
306 {
307 // For a file in another format, the user has to enter a new file name as well
308 Info->CurrentFontWnd->OpenInfo->pszFileName[0] = 0;
309 }
310
311 if( !DoSaveFile(Info->CurrentFontWnd->OpenInfo->pszFileName) )
312 return;
313 }
314
315 // Save the binary font
316 hFile = CreateFileW(Info->CurrentFontWnd->OpenInfo->pszFileName, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
317
319 {
321 return;
322 }
323
324 if( !WriteFile(hFile, Info->CurrentFontWnd->Font, sizeof(BITMAP_FONT), &dwBytesWritten, NULL) )
326
328}
static BOOL DoSaveFile(HWND hWnd, PCONSOLE_CHILDFRM_WND pChildInfo)
Definition: console.c:208
#define CloseHandle
Definition: compat.h:739
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define MAX_PATH
Definition: compat.h:34
#define CreateFileW
Definition: compat.h:741
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
unsigned long DWORD
Definition: ntddk_ex.h:95
VOID LocalizedError(IN UINT uID,...)
Definition: misc.c:103
#define IDS_OPENERROR
Definition: resource.h:61
#define IDS_WRITEERROR
Definition: resource.h:63
#define OPEN_ALWAYS
Definition: disk.h:70
_In_ HANDLE hFile
Definition: mswsock.h:90
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define GENERIC_WRITE
Definition: nt_native.h:90
uint16_t * PWSTR
Definition: typedefs.h:56
DWORD WINAPI GetLastError(void)
Definition: except.c:1042

Referenced by FontWndProc(), and MenuCommand().

◆ DoOpenFile()

BOOL DoOpenFile ( OUT PWSTR  pszFileName)

Definition at line 36 of file opensave.c.

37{
38 BOOL bRet;
39 PWSTR pszFilter;
40
41 if( AllocAndLoadString(&pszFilter, IDS_OPENFILTER) )
42 {
43 PrepareFilter(pszFilter);
44 ofn.lpstrFilter = pszFilter;
47
48 bRet = GetOpenFileNameW(&ofn);
49 HeapFree(hProcessHeap, 0, pszFilter);
50
51 return bRet;
52 }
53
54 return FALSE;
55}
static __inline VOID PrepareFilter(IN PWSTR pszFilter)
Definition: opensave.c:23
static OPENFILENAMEW ofn
Definition: opensave.c:10
INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:59
#define OFN_EXPLORER
Definition: commdlg.h:104
#define OFN_FILEMUSTEXIST
Definition: commdlg.h:106
BOOL WINAPI GetOpenFileNameW(OPENFILENAMEW *ofn)
Definition: filedlg.c:4736
unsigned int BOOL
Definition: ntddk_ex.h:94
#define IDS_OPENFILTER
Definition: resource.h:59
DWORD Flags
Definition: commdlg.h:373
LPWSTR lpstrFile
Definition: commdlg.h:367
LPCWSTR lpstrFilter
Definition: commdlg.h:363
WORD WORD PSZ PSZ pszFileName
Definition: vdmdbg.h:44

◆ DoSaveFile()

BOOL DoSaveFile ( IN PWSTR  pszFileName)

◆ EditCurrentGlyph()

VOID EditCurrentGlyph ( PFONT_WND_INFO  FontWndInfo)

Definition at line 182 of file fontboxeswnd.c.

183{
184 PEDIT_GLYPH_INFO EditGlyphInfo;
185
186 // Has the window for this character already been opened?
187 EditGlyphInfo = FontWndInfo->FirstEditGlyphWnd;
188
189 while(EditGlyphInfo)
190 {
191 if(EditGlyphInfo->uCharacter == FontWndInfo->uSelectedCharacter)
192 {
193 // Yes, it has. Bring it to the front.
194 SetFocus(EditGlyphInfo->hSelf);
195 return;
196 }
197
198 EditGlyphInfo = EditGlyphInfo->NextEditGlyphWnd;
199 }
200
201 // No. Then create a new one
202 EditGlyphInfo = (PEDIT_GLYPH_INFO) HeapAlloc( hProcessHeap, 0, sizeof(EDIT_GLYPH_INFO) );
203 EditGlyphInfo->FontWndInfo = FontWndInfo;
204 EditGlyphInfo->uCharacter = FontWndInfo->uSelectedCharacter;
205 RtlCopyMemory( EditGlyphInfo->CharacterBits, FontWndInfo->Font->Bits + FontWndInfo->uSelectedCharacter * 8, sizeof(EditGlyphInfo->CharacterBits) );
206
207 // Add the new window to the linked list
208 EditGlyphInfo->PrevEditGlyphWnd = FontWndInfo->LastEditGlyphWnd;
209 EditGlyphInfo->NextEditGlyphWnd = NULL;
210
211 if(FontWndInfo->LastEditGlyphWnd)
212 FontWndInfo->LastEditGlyphWnd->NextEditGlyphWnd = EditGlyphInfo;
213 else
214 FontWndInfo->FirstEditGlyphWnd = EditGlyphInfo;
215
216 FontWndInfo->LastEditGlyphWnd = EditGlyphInfo;
217
218 // Open the window as a modeless dialog, so people can edit several characters at the same time.
219 EditGlyphInfo->hSelf = CreateDialogParamW(hInstance, MAKEINTRESOURCEW(IDD_EDITGLYPH), FontWndInfo->hSelf, EditGlyphDlgProc, (LPARAM)EditGlyphInfo);
220 ShowWindow(EditGlyphInfo->hSelf, SW_SHOW);
221}
INT_PTR CALLBACK EditGlyphDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: editglyphdlg.c:119
struct _EDIT_GLYPH_INFO * PEDIT_GLYPH_INFO
Definition: precomp.h:37
#define IDD_EDITGLYPH
Definition: resource.h:29
UCHAR Bits[2048]
Definition: raw.h:13
PFONT_WND_INFO FontWndInfo
Definition: precomp.h:83
PEDIT_GLYPH_INFO PrevEditGlyphWnd
Definition: precomp.h:93
PEDIT_GLYPH_INFO NextEditGlyphWnd
Definition: precomp.h:94
UINT uCharacter
Definition: precomp.h:85
UCHAR CharacterBits[8]
Definition: precomp.h:86
UINT uSelectedCharacter
Definition: precomp.h:72
PBITMAP_FONT Font
Definition: precomp.h:68
PEDIT_GLYPH_INFO FirstEditGlyphWnd
Definition: precomp.h:77
PEDIT_GLYPH_INFO LastEditGlyphWnd
Definition: precomp.h:78
HWND hSelf
Definition: precomp.h:70
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
LONG_PTR LPARAM
Definition: windef.h:208
HWND WINAPI CreateDialogParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
HWND WINAPI SetFocus(_In_opt_ HWND)
#define SW_SHOW
Definition: winuser.h:778

Referenced by FontBoxesWndProc(), and MenuCommand().

◆ EditGlyphDlgProc()

INT_PTR CALLBACK EditGlyphDlgProc ( HWND  hwnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 119 of file editglyphdlg.c.

120{
122
124
125 if(Info || uMsg == WM_INITDIALOG)
126 {
127 switch(uMsg)
128 {
129 case WM_COMMAND:
131
132 case WM_INITDIALOG:
134 Info->hSelf = hwnd;
137
141
143
144 return TRUE;
145 }
146 }
147
148 return FALSE;
149}
static VOID InitToolbox(IN PEDIT_GLYPH_INFO Info)
Definition: editglyphdlg.c:24
static BOOL EditGlyphCommand(IN INT idCommand, IN PEDIT_GLYPH_INFO Info)
Definition: editglyphdlg.c:71
#define IDC_EDIT_GLYPH_EDIT
Definition: resource.h:33
#define IDC_EDIT_GLYPH_PREVIEW
Definition: resource.h:34
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define GWLP_USERDATA
Definition: treelist.c:63
#define GetWindowLongPtrW
Definition: winuser.h:4832
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define SetWindowLongPtrW
Definition: winuser.h:5358

Referenced by EditCurrentGlyph().

◆ FileInitialize()

VOID FileInitialize ( HWND  hwnd)

Definition at line 8 of file opensave.c.

9{
10 ZeroMemory(&ofn, sizeof(ofn));
15 ofn.lpstrDefExt = _T("bmp");
16}
OPENFILENAMEA OPENFILENAME
Definition: commdlg.h:657
HWND hwndOwner
Definition: commdlg.h:361
DWORD nMaxFileTitle
Definition: commdlg.h:370
LPCWSTR lpstrDefExt
Definition: commdlg.h:376
DWORD lStructSize
Definition: commdlg.h:360
DWORD nMaxFile
Definition: commdlg.h:368
#define _T(x)
Definition: vfdio.h:22
#define ZeroMemory
Definition: winbase.h:1737

◆ GetCharacterPosition()

static __inline VOID GetCharacterPosition ( IN UINT  uCharacter,
OUT PUINT  uFontRow,
OUT PUINT  uFontColumn 
)
static

Definition at line 142 of file precomp.h.

143{
144 *uFontRow = uCharacter / 16;
145 *uFontColumn = uCharacter % 16;
146}

Referenced by EditGlyphCommand(), PasteIntoCurrentGlyph(), and SetSelectedCharacter().

◆ GetCharacterRect()

VOID GetCharacterRect ( IN UINT  uFontRow,
IN UINT  uFontColumn,
OUT LPRECT  CharacterRect 
)

Definition at line 25 of file fontboxeswnd.c.

26{
27 CharacterRect->left = uFontColumn * (CHARACTER_BOX_WIDTH + CHARACTER_BOX_PADDING);
28 CharacterRect->top = uFontRow * (CHARACTER_BOX_HEIGHT + CHARACTER_BOX_PADDING);
29 CharacterRect->right = CharacterRect->left + CHARACTER_BOX_WIDTH;
30 CharacterRect->bottom = CharacterRect->top + CHARACTER_BOX_HEIGHT;
31}
#define CHARACTER_BOX_PADDING
Definition: precomp.h:105
#define CHARACTER_BOX_WIDTH
Definition: precomp.h:103
#define CHARACTER_BOX_HEIGHT
Definition: precomp.h:104

Referenced by DrawProc(), EditGlyphCommand(), FontBoxesHitTest(), PasteIntoCurrentGlyph(), and SetSelectedCharacter().

◆ InitEditGlyphWndClasses()

BOOL InitEditGlyphWndClasses ( VOID  )

Definition at line 283 of file editglyphdlg.c.

284{
285 WNDCLASSW wc = {0,};
286
288 wc.hInstance = hInstance;
291
292 if( !RegisterClassW(&wc) )
293 return FALSE;
294
297
298 return RegisterClassW(&wc) != 0;
299}
#define EDIT_GLYPH_PREVIEW_CLASSW
#define EDIT_GLYPH_EDIT_CLASSW
static LRESULT CALLBACK EditGlyphPreviewWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: editglyphdlg.c:230
static LRESULT CALLBACK EditGlyphEditWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: editglyphdlg.c:152
LPCWSTR lpszClassName
Definition: winuser.h:3188
HINSTANCE hInstance
Definition: winuser.h:3183
WNDPROC lpfnWndProc
Definition: winuser.h:3180
HCURSOR hCursor
Definition: winuser.h:3185
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
#define IDC_ARROW
Definition: winuser.h:687
#define LoadCursor
Definition: winuser.h:5824

Referenced by wWinMain().

◆ InitFontBoxesWndClass()

BOOL InitFontBoxesWndClass ( VOID  )

Definition at line 330 of file fontboxeswnd.c.

331{
332 WNDCLASSW wc = {0,};
333
335 wc.hInstance = hInstance;
337 wc.hbrBackground = (HBRUSH)( COLOR_BTNFACE + 1 );
339 wc.style = CS_DBLCLKS;
340
341 return RegisterClassW(&wc) != 0;
342}
static const WCHAR szFontBoxesWndClass[]
Definition: fontboxeswnd.c:10
static LRESULT CALLBACK FontBoxesWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: fontboxeswnd.c:241
HBRUSH hbrBackground
Definition: winuser.h:3186
UINT style
Definition: winuser.h:3179
#define CS_DBLCLKS
Definition: winuser.h:651
#define COLOR_BTNFACE
Definition: winuser.h:931

Referenced by wWinMain().

◆ InitFontWndClass()

BOOL InitFontWndClass ( VOID  )

Definition at line 426 of file fontwnd.c.

427{
428 WNDCLASSW wc = {0,};
429
431 wc.hInstance = hInstance;
434 wc.hbrBackground = (HBRUSH)( COLOR_BTNFACE + 1 );
436
437 return RegisterClassW(&wc) != 0;
438}
static LRESULT CALLBACK FontWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: fontwnd.c:97
static const WCHAR szFontWndClass[]
Definition: fontwnd.c:10
#define IDI_DOC
Definition: resource.h:15
HICON hIcon
Definition: winuser.h:3184
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
Definition: cursoricon.c:2127

Referenced by wWinMain().

◆ InitMainWndClass()

BOOL InitMainWndClass ( VOID  )

Definition at line 641 of file mainwnd.c.

642{
643 WNDCLASSW wc = {0,};
644
646 wc.hInstance = hInstance;
649 wc.hbrBackground = (HBRUSH)( COLOR_BTNFACE + 1 );
651
652 return RegisterClassW(&wc) != 0;
653}
#define IDI_MAIN
Definition: resource.h:4
static LRESULT CALLBACK MainWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: mainwnd.c:639

Referenced by wWinMain().

◆ LoadAndFormatString()

DWORD LoadAndFormatString ( IN UINT  uID,
OUT PWSTR lpTarget,
  ... 
)

Definition at line 90 of file misc.c.

91{
92 DWORD Ret;
94
95 va_start(Args, lpTarget);
96 Ret = VarListLoadAndFormatString(uID, lpTarget, &Args);
97 va_end(Args);
98
99 return Ret;
100}
char ** Args
Definition: acdebug.h:353
char * va_list
Definition: acmsvcex.h:78
#define va_end(ap)
Definition: acmsvcex.h:90
#define va_start(ap, A)
Definition: acmsvcex.h:91
static DWORD VarListLoadAndFormatString(IN UINT uID, OUT PWSTR *lpTarget, IN va_list *Args)
Definition: misc.c:66

◆ LocalizedError()

VOID LocalizedError ( IN UINT  uID,
  ... 
)

Definition at line 103 of file misc.c.

104{
105 PWSTR pszError;
107
108 va_start(Args, uID);
109 VarListLoadAndFormatString(uID, &pszError, &Args);
110 va_end(Args);
111
113 HeapFree(hProcessHeap, 0, pszError);
114}
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
#define MB_ICONERROR
Definition: winuser.h:790

Referenced by DoFileSave(), and InitFont().

◆ SetPasteButtonState()

VOID SetPasteButtonState ( IN PMAIN_WND_INFO  Info)

Definition at line 389 of file mainwnd.c.

390{
394}
#define ID_EDIT_PASTE
Definition: resource.h:49
UINT uCharacterClipboardFormat
Definition: main.c:15
static VOID SetToolbarButtonState(IN PMAIN_WND_INFO Info, INT idCommand, BOOL bEnabled)
Definition: mainwnd.c:80
BOOL WINAPI IsClipboardFormatAvailable(_In_ UINT)

Referenced by FontWndProc(), InitMainWnd(), and MainWndProc().

◆ SetToolbarFileButtonState()

VOID SetToolbarFileButtonState ( IN PMAIN_WND_INFO  Info,
BOOL  bEnabled 
)

Definition at line 92 of file mainwnd.c.

93{
97}
#define ID_EDIT_COPY
Definition: resource.h:48
#define ID_FILE_SAVE
Definition: resource.h:42
#define ID_EDIT_GLYPH
Definition: resource.h:44

Referenced by FontWndProc(), and InitMainWnd().

◆ UnInitEditGlyphWndClasses()

VOID UnInitEditGlyphWndClasses ( VOID  )

Definition at line 302 of file editglyphdlg.c.

303{
306}
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)

Referenced by wWinMain().

◆ UnInitFontBoxesWndClass()

VOID UnInitFontBoxesWndClass ( VOID  )

Definition at line 345 of file fontboxeswnd.c.

Referenced by wWinMain().

◆ UnInitFontWndClass()

VOID UnInitFontWndClass ( VOID  )

Definition at line 441 of file fontwnd.c.

Referenced by wWinMain().

◆ UnInitMainWndClass()

VOID UnInitMainWndClass ( VOID  )

Definition at line 656 of file mainwnd.c.

Referenced by wWinMain().

Variable Documentation

◆ hInstance

HINSTANCE hInstance
extern

Definition at line 19 of file charmap.c.

◆ hProcessHeap

HANDLE hProcessHeap
extern

Definition at line 37 of file kbswitch.c.

◆ szAppName

PWSTR szAppName
extern

Definition at line 18 of file solitaire.cpp.

◆ uCharacterClipboardFormat

UINT uCharacterClipboardFormat
extern