1 #ifndef __CHARMAP_PRECOMP_H 2 #define __CHARMAP_PRECOMP_H 3 4 #include <stdarg.h> 5 #include <windef.h> 6 #include <winbase.h> 7 #include <winuser.h> 8 #include <wingdi.h> 9 10 11 #include "resource.h" 12 13 #define SIZEOF(_v) (sizeof(_v) / sizeof(*_v)) 14 15 #define MAX_GLYPHS 65536 16 17 #define XCELLS 20 18 #define YCELLS 10 19 #define XLARGE 45 20 #define YLARGE 25 21 22 #define FM_SETFONT (WM_USER + 1) 23 #define FM_GETCHAR (WM_USER + 2) 24 #define FM_SETCHAR (WM_USER + 3) 25 #define FM_GETHFONT (WM_USER + 4) 26 27 extern HINSTANCE hInstance; 28 29 typedef struct _CELL 30 { 31 RECT CellExt; 32 RECT CellInt; 33 BOOL bActive; 34 BOOL bLarge; 35 WCHAR ch; 36 } CELL, *PCELL; 37 38 typedef struct _MAP 39 { 40 HWND hMapWnd; 41 HWND hParent; 42 HWND hLrgWnd; 43 SIZE ClientSize; 44 SIZE CellSize; 45 CELL Cells[YCELLS][XCELLS]; 46 PCELL pActiveCell; 47 HFONT hFont; 48 LOGFONTW CurrentFont; 49 INT iYStart; 50 INT NumRows; 51 52 USHORT ValidGlyphs[MAX_GLYPHS]; 53 USHORT NumValidGlyphs; 54 55 } MAP, *PMAP; 56 57 typedef struct { 58 NMHDR hdr; 59 WCHAR ch; 60 } MAPNOTIFY, *LPMAPNOTIFY; 61 62 typedef struct { 63 BOOL IsAdvancedView; 64 } SETTINGS; 65 66 extern SETTINGS Settings; 67 extern HWND hCharmapDlg; 68 69 LRESULT CALLBACK LrgCellWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); 70 71 VOID ShowAboutDlg(HWND hWndParent); 72 73 BOOL RegisterMapClasses(HINSTANCE hInstance); 74 VOID UnregisterMapClasses(HINSTANCE hInstance); 75 76 int WINAPI GetUName(IN WORD wCharCode, OUT LPWSTR lpBuf); 77 78 /* charmap.c */ 79 VOID UpdateStatusBar(WCHAR wch); 80 extern VOID ChangeMapFont(HWND hDlg); 81 82 /* settings.c */ 83 extern void LoadSettings(void); 84 extern void SaveSettings(void); 85 86 #endif /* __CHARMAP_PRECOMP_H */ 87