Synchronize up to trunk's revision r57784.
[reactos.git] / base / applications / charmap / precomp.h
1 #ifndef __CHARMAP_PRECOMP_H
2 #define __CHARMAP_PRECOMP_H
3
4 #define WIN32_LEAN_AND_MEAN
5 #include <windows.h>
6 #include <windowsx.h>
7 #include <tchar.h>
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include <commctrl.h>
11 #include <richedit.h>
12 #include "resource.h"
13
14 #define SIZEOF(_v) (sizeof(_v) / sizeof(*_v))
15
16 #define XCELLS 20
17 #define YCELLS 10
18 #define XLARGE 45
19 #define YLARGE 25
20
21 #define FM_SETFONT (WM_USER + 1)
22 #define FM_GETCHAR (WM_USER + 2)
23 #define FM_SETCHAR (WM_USER + 3)
24 #define FM_GETHFONT (WM_USER + 4)
25
26 extern HINSTANCE hInstance;
27
28 typedef struct _CELL
29 {
30 RECT CellExt;
31 RECT CellInt;
32 BOOL bActive;
33 BOOL bLarge;
34 WCHAR ch;
35 } CELL, *PCELL;
36
37 typedef struct _MAP
38 {
39 HWND hMapWnd;
40 HWND hParent;
41 HWND hLrgWnd;
42 SIZE ClientSize;
43 SIZE CellSize;
44 CELL Cells[YCELLS][XCELLS];
45 PCELL pActiveCell;
46 HFONT hFont;
47 LOGFONTW CurrentFont;
48 INT iYStart;
49 } MAP, *PMAP;
50
51 typedef struct {
52 NMHDR hdr;
53 WCHAR ch;
54 } MAPNOTIFY, *LPMAPNOTIFY;
55
56 typedef struct {
57 BOOL IsAdvancedView;
58 } SETTINGS;
59
60 extern SETTINGS Settings;
61 extern HWND hCharmapDlg;
62
63 LRESULT CALLBACK LrgCellWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
64
65 VOID ShowAboutDlg(HWND hWndParent);
66
67 BOOL RegisterMapClasses(HINSTANCE hInstance);
68 VOID UnregisterMapClasses(HINSTANCE hInstance);
69
70 /* charmap.c */
71 extern VOID ChangeMapFont(HWND hDlg);
72
73 /* settings.c */
74 extern void LoadSettings(void);
75 extern void SaveSettings(void);
76
77 #endif /* __CHARMAP_PRECOMP_H */