ReactOS  0.4.12-dev-14-gd0c8636
charmap.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Character Map
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: base/applications/charmap/charmap.c
5  * PURPOSE: main dialog implementation
6  * COPYRIGHT: Copyright 2007 Ged Murphy <gedmurphy@reactos.org>
7  *
8  */
9 
10 #include "precomp.h"
11 
12 #include <commctrl.h>
13 #include <richedit.h>
14 #include <winnls.h>
15 
16 #define REMOVE_ADVANCED
17 
18 #define ID_ABOUT 0x1
19 
27 
28 /* Font-enumeration callback */
29 static
30 int
33  NEWTEXTMETRICEXW *lpntme,
34  DWORD FontType,
35  LPARAM lParam)
36 {
37  HWND hwndCombo = (HWND)lParam;
38  LPWSTR pszName = lpelfe->elfLogFont.lfFaceName;
39 
40  /* Skip rotated font */
41  if(pszName[0] == L'@') return 1;
42 
43  /* make sure font doesn't already exist in our list */
44  if(SendMessageW(hwndCombo,
46  0,
47  (LPARAM)pszName) == CB_ERR)
48  {
49  INT idx;
50  BOOL fFixed;
51  BOOL fTrueType;
52 
53  /* add the font */
54  idx = (INT)SendMessageW(hwndCombo,
56  0,
57  (LPARAM)pszName);
58 
59  /* record the font's attributes (Fixedwidth and Truetype) */
60  fFixed = (lpelfe->elfLogFont.lfPitchAndFamily & FIXED_PITCH) ? TRUE : FALSE;
61  fTrueType = (lpelfe->elfLogFont.lfOutPrecision == OUT_STROKE_PRECIS) ? TRUE : FALSE;
62 
63  /* store this information in the list-item's userdata area */
64  SendMessageW(hwndCombo,
66  idx,
67  MAKEWPARAM(fFixed, fTrueType));
68  }
69 
70  return 1;
71 }
72 
73 
74 /* Initialize the font-list by enumeration all system fonts */
75 static
76 VOID
78 {
79  HDC hdc;
80  LOGFONTW lf;
81 
82  /* FIXME: for fun, draw each font in its own style */
84  SendMessageW(hwndCombo,
85  WM_SETFONT,
86  (WPARAM)hFont,
87  0);
88 
89  ZeroMemory(&lf, sizeof(lf));
91 
92  hdc = GetDC(hwndCombo);
93 
94  /* store the list of fonts in the combo */
96  &lf,
98  (LPARAM)hwndCombo,
99  0);
100 
101  ReleaseDC(hwndCombo,
102  hdc);
103 
104  SendMessageW(hwndCombo,
105  CB_SETCURSEL,
106  0,
107  0);
108 }
109 
110 
111 extern
112 VOID
114 {
115  HWND hCombo;
116  HWND hMap;
117  LPWSTR lpFontName;
118  INT Len;
119 
120  hCombo = GetDlgItem(hDlg, IDC_FONTCOMBO);
121 
122  Len = GetWindowTextLengthW(hCombo);
123 
124  if (Len != 0)
125  {
126  lpFontName = HeapAlloc(GetProcessHeap(),
127  0,
128  (Len + 1) * sizeof(WCHAR));
129 
130  if (lpFontName)
131  {
132  SendMessageW(hCombo,
133  WM_GETTEXT,
134  Len + 1,
135  (LPARAM)lpFontName);
136 
137  hMap = GetDlgItem(hDlg, IDC_FONTMAP);
138 
139  SendMessageW(hMap,
140  FM_SETFONT,
141  0,
142  (LPARAM)lpFontName);
143  }
144 
146  0,
147  lpFontName);
148  }
149 }
150 
151 // Copy collected characters into the clipboard
152 static
153 void
155 {
156  HWND hText = GetDlgItem(hDlg, IDC_TEXTBOX);
157  DWORD dwStart, dwEnd;
158 
159  // Acquire selection limits
160  SendMessage(hText, EM_GETSEL, (WPARAM)&dwStart, (LPARAM)&dwEnd);
161 
162  // Test if the whose text is unselected
163  if(dwStart == dwEnd) {
164 
165  // Select the whole text
166  SendMessageW(hText, EM_SETSEL, 0, -1);
167 
168  // Copy text
169  SendMessageW(hText, WM_COPY, 0, 0);
170 
171  // Restore previous values
172  SendMessageW(hText, EM_SETSEL, (WPARAM)dwStart, (LPARAM)dwEnd);
173 
174  } else {
175 
176  // Copy text
177  SendMessageW(hText, WM_COPY, 0, 0);
178  }
179 }
180 
181 // Recover charset for the given font
182 static
183 BYTE
185 {
186  TEXTMETRIC tmFont;
187  HGDIOBJ hOldObj;
188  HDC hDC;
189 
190  hDC = GetDC(hWnd);
191  hOldObj = SelectObject(hDC, hFont);
192  GetTextMetrics(hDC, &tmFont);
193  SelectObject(hDC, hOldObj);
194  ReleaseDC(hWnd, hDC);
195 
196  return tmFont.tmCharSet;
197 }
198 
199 // Select a new character
200 static
201 VOID
203 {
204  HWND hMap = GetDlgItem(hDlg, IDC_FONTMAP);
205  HWND hText = GetDlgItem(hDlg, IDC_TEXTBOX);
206  HFONT hFont;
207  LOGFONT lFont;
208  CHARFORMAT cf;
209 
210  // Retrieve current character selected
211  if (ch == 0)
212  {
213  ch = (WCHAR) SendMessageW(hMap, FM_GETCHAR, 0, 0);
214  if (!ch)
215  return;
216  }
217 
218  // Retrieve current selected font
219  hFont = (HFONT)SendMessage(hMap, FM_GETHFONT, 0, 0);
220 
221  // Recover LOGFONT structure from hFont
222  if (!GetObject(hFont, sizeof(LOGFONT), &lFont))
223  return;
224 
225  // Recover font properties of Richedit control
226  ZeroMemory(&cf, sizeof(cf));
227  cf.cbSize = sizeof(cf);
229 
230  // Apply properties of the new font
231  cf.bCharSet = GetFontMetrics(hText, hFont);
232 
233  // Update font name
234  wcscpy(cf.szFaceName, lFont.lfFaceName);
235 
236  // Update font properties
238 
239  // Send selected character to Richedit
240  SendMessage(hText, WM_CHAR, (WPARAM)ch, 0);
241 }
242 
243 #ifndef REMOVE_ADVANCED
244 static
245 void
246 UpdateSettings(HWND hDlg)
247 {
248  if (hDlg == hCharmapDlg)
249  {
250  Settings.IsAdvancedView =
252 
253  }
254 
255  if (hDlg == hAdvancedDlg)
256  {
257  }
258 }
259 #endif
260 
261 VOID
263 {
265  WCHAR szDesc[MAX_PATH];
266 
267  GetUName(wch, szDesc);
268  wsprintfW(buff, L"U+%04X: %s", wch, szDesc);
269  SendMessageW(hStatusWnd, SB_SETTEXT, 0, (LPARAM)buff);
270 }
271 
272 static
273 void
275 {
276  RECT rcCharmap;
277 #ifndef REMOVE_ADVANCED
278  RECT rcAdvanced;
279 #endif
280  RECT rcPanelExt;
281  RECT rcPanelInt;
282  RECT rcStatus;
283  UINT DeX, DeY;
284  UINT xPos, yPos;
285  UINT Width, Height;
286  UINT DeskTopWidth, DeskTopHeight;
287 
288  GetClientRect(hCharmapDlg, &rcCharmap);
289 #ifndef REMOVE_ADVANCED
290  GetClientRect(hAdvancedDlg, &rcAdvanced);
291 #endif
292  GetWindowRect(hWnd, &rcPanelExt);
293  GetClientRect(hWnd, &rcPanelInt);
294  GetClientRect(hStatusWnd, &rcStatus);
295 
296  DeskTopWidth = GetSystemMetrics(SM_CXFULLSCREEN);
297  DeskTopHeight = GetSystemMetrics(SM_CYFULLSCREEN);
298 
299  DeX = (rcPanelExt.right - rcPanelExt.left) - rcPanelInt.right;
300  DeY = (rcPanelExt.bottom - rcPanelExt.top) - rcPanelInt.bottom;
301 
302  MoveWindow(hCharmapDlg, 0, 0, rcCharmap.right, rcCharmap.bottom, FALSE);
303 #ifndef REMOVE_ADVANCED
304  MoveWindow(hAdvancedDlg, 0, rcCharmap.bottom, rcAdvanced.right, rcAdvanced.bottom, FALSE);
305  ShowWindow(hAdvancedDlg, (Settings.IsAdvancedView) ? SW_SHOW : SW_HIDE);
306 #endif
307  xPos = rcPanelExt.left;
308  yPos = rcPanelExt.top;
309 
310  Width = DeX + rcCharmap.right;
311  Height = DeY + rcCharmap.bottom + rcStatus.bottom;
312 #ifndef REMOVE_ADVANCED
313  if (Settings.IsAdvancedView)
314  Height += rcAdvanced.bottom;
315 #endif
316  if ((xPos + Width) > DeskTopWidth)
317  xPos += DeskTopWidth - (xPos + Width);
318 
319  if ((yPos + Height) > DeskTopHeight)
320  yPos += DeskTopHeight - (yPos + Height);
321 
322  MoveWindow(hWnd,
323  xPos, yPos,
324  Width, Height,
325  TRUE);
326 }
327 
328 static
329 INT_PTR
330 CALLBACK
332  UINT Message,
333  WPARAM wParam,
334  LPARAM lParam)
335 {
336  switch(Message)
337  {
338  case WM_INITDIALOG:
339  {
340  DWORD evMask;
341 #ifdef REMOVE_ADVANCED
342  HWND hAdv;
343 #endif
344 
346  IDC_FONTCOMBO));
347 
348  ChangeMapFont(hDlg);
349 
350  // Configure Richedit control for sending notification changes.
351  evMask = SendDlgItemMessage(hDlg, IDC_TEXTBOX, EM_GETEVENTMASK, 0, 0);
352  evMask |= ENM_CHANGE;
354 #ifdef REMOVE_ADVANCED
355  hAdv = GetDlgItem(hDlg, IDC_CHECK_ADVANCED);
356  ShowWindow(hAdv, SW_HIDE);
357 #endif
358  return TRUE;
359  }
360 
361  case WM_COMMAND:
362  {
363  switch(LOWORD(wParam))
364  {
365  case IDC_FONTMAP:
366  switch (HIWORD(wParam))
367  {
368  case FM_SETCHAR:
369  AddCharToSelection(hDlg, LOWORD(lParam));
370  break;
371  }
372  break;
373 
374  case IDC_FONTCOMBO:
375  if (HIWORD(wParam) == CBN_SELCHANGE)
376  {
377  ChangeMapFont(hDlg);
378  }
379  break;
380 
381  case IDC_SELECT:
382  AddCharToSelection(hDlg, 0);
383  break;
384 
385  case IDC_TEXTBOX:
386  switch (HIWORD(wParam)) {
387  case EN_CHANGE:
388  if (GetWindowTextLength(GetDlgItem(hDlg, IDC_TEXTBOX)) == 0)
390  else
392  break;
393  }
394  break;
395 
396  case IDC_COPY:
397  CopyCharacters(hDlg);
398  break;
399 #ifndef REMOVE_ADVANCED
400  case IDC_CHECK_ADVANCED:
401  UpdateSettings(hDlg);
402  ChangeView(GetParent(hDlg));
403  break;
404 #endif
405  }
406  }
407  break;
408 
409  default:
410  break;
411  }
412 
413  return FALSE;
414 }
415 #ifndef REMOVE_ADVANCED
416 static
417 INT_PTR
418 CALLBACK
419 AdvancedDlgProc(HWND hDlg,
420  UINT Message,
421  WPARAM wParam,
422  LPARAM lParam)
423 {
424  switch(Message)
425  {
426  case WM_INITDIALOG:
427  return TRUE;
428 
429  default:
430  return FALSE;
431  }
432 
433  return FALSE;
434 }
435 #endif
436 
437 static int
439 {
440  HMENU hSysMenu;
441  WCHAR lpAboutText[256];
442 
443  hCharmapDlg = CreateDialog(hInstance,
445  hWnd,
447 #ifndef REMOVE_ADVANCED
448  hAdvancedDlg = CreateDialog(hInstance,
450  hWnd,
452 #endif
453  hStatusWnd = CreateWindow(STATUSCLASSNAME,
454  NULL,
456  0, 0, 0, 0,
457  hWnd,
459  hInstance,
460  NULL);
461 
462  // Set the status bar for multiple parts output
463  SendMessage(hStatusWnd, SB_SIMPLE, (WPARAM)FALSE, (LPARAM)0);
464 
465  ChangeView(hWnd);
466 
467  hSysMenu = GetSystemMenu(hWnd, FALSE);
468 
469  if (hSysMenu != NULL)
470  {
471  if (LoadStringW(hInstance, IDS_ABOUT, lpAboutText, SIZEOF(lpAboutText)))
472  {
473  AppendMenuW(hSysMenu, MF_SEPARATOR, 0, NULL);
474  AppendMenuW(hSysMenu, MF_STRING, ID_ABOUT, lpAboutText);
475  }
476  }
477 
478  return 0;
479 }
480 
481 static LRESULT CALLBACK
483 {
484  switch (msg) {
485  case WM_CREATE:
486  // For now, the Help push button is disabled because of lacking of HTML Help support
488  return PanelOnCreate(hWnd, wParam, lParam);
489 
490  case WM_CLOSE:
491  DestroyWindow(hWnd);
492  return 0;
493 
494  case WM_SIZE:
495  SendMessage(hStatusWnd, msg, wParam, lParam);
496  break;
497 
498  case WM_DESTROY:
499  SaveSettings();
500  PostQuitMessage(0);
501  return 0;
502 
503  case WM_SYSCOMMAND:
504  switch(wParam) {
505  case ID_ABOUT:
506  ShowAboutDlg(hWnd);
507  break;
508  }
509  break;
510 
511  }
512 
513  return DefWindowProc(hWnd, msg, wParam, lParam);
514 }
515 
516 static HWND
518 {
519  WCHAR szClass[] = L"CharMap";
520  WCHAR szTitle[256];
521  WNDCLASSEXW wc;
522  HWND hWnd;
523 
524  LoadStringW(hInst, IDS_TITLE, szTitle, SIZEOF(szTitle));
525 
526  hSmIcon = LoadImage(hInstance,
528  IMAGE_ICON,
529  16,
530  16,
531  0);
532 
533  hBgIcon = LoadImage(hInstance,
535  IMAGE_ICON,
536  32,
537  32,
538  0);
539 
540  // Create workspace
541  ZeroMemory(&wc, sizeof(wc));
542 
543  wc.cbSize = sizeof(wc);
545  wc.hInstance = hInst;
546  wc.hIcon = hBgIcon;
549  wc.lpszMenuName = NULL;
550  wc.lpszClassName = szClass;
551  wc.hIconSm = hSmIcon;
552 
553  RegisterClassExW(&wc);
554 
555  hWnd = CreateWindowW(
556  szClass,
557  szTitle,
563  NULL,
564  NULL,
565  hInst,
566  NULL);
567 
568  if (hWnd != NULL)
569  {
570  LoadSettings();
571  ShowWindow(hWnd, SW_SHOW);
572  UpdateWindow(hWnd);
573  }
574 
575  return hWnd;
576 }
577 
578 INT
579 WINAPI
581  HINSTANCE hPrev,
582  LPWSTR Cmd,
583  int iCmd)
584 {
586  INT Ret = 1;
587  HMODULE hRichEd20;
588  MSG Msg;
589 
590  hInstance = hInst;
591 
592  /* Mirroring code for the titlebar */
593  switch (GetUserDefaultUILanguage())
594  {
597  break;
598 
599  default:
600  break;
601  }
602 
603  iccx.dwSize = sizeof(INITCOMMONCONTROLSEX);
604  iccx.dwICC = ICC_TAB_CLASSES;
605  InitCommonControlsEx(&iccx);
606 
607  if (RegisterMapClasses(hInstance))
608  {
609  hRichEd20 = LoadLibraryW(L"RICHED20.DLL");
610 
611  if (hRichEd20 != NULL)
612  {
613  InitInstance(hInst);
614 
615  for (;;)
616  {
617  if (GetMessage(&Msg, NULL, 0, 0) <= 0)
618  {
619  Ret = Msg.wParam;
620  break;
621  }
622 
623  TranslateMessage(&Msg);
624  DispatchMessage(&Msg);
625  }
626 
627  FreeLibrary(hRichEd20);
628  }
629  UnregisterMapClasses(hInstance);
630  }
631 
632  return Ret;
633 }
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
static IClassFactory * cf
HWND hStatusWnd
Definition: charmap.c:23
#define HDC
Definition: msvc.h:22
BOOL IsAdvancedView
Definition: precomp.h:63
#define CB_SETITEMDATA
Definition: winuser.h:1927
#define IDI_ICON
Definition: resource.h:5
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define DispatchMessage
Definition: winuser.h:5631
LANGID WINAPI GetUserDefaultUILanguage(void)
Definition: lang.c:561
BOOL WINAPI TranslateMessage(_In_ const MSG *)
static INT_PTR CALLBACK CharMapDlgProc(HWND hDlg, UINT Message, WPARAM wParam, LPARAM lParam)
Definition: charmap.c:331
static HICON
Definition: imagelist.c:84
#define TRUE
Definition: types.h:120
#define MAKEWPARAM(l, h)
Definition: winuser.h:3916
BYTE lfPitchAndFamily
Definition: dimm.idl:71
#define IMAGE_ICON
Definition: winuser.h:212
#define LAYOUT_RTL
Definition: wingdi.h:1352
VOID ShowAboutDlg(HWND hWndParent)
Definition: about.c:77
#define WM_CHAR
Definition: winuser.h:1693
#define CreateWindow
Definition: winuser.h:5620
#define EM_GETEVENTMASK
Definition: richedit.h:92
#define IDC_CHECK_ADVANCED
Definition: resource.h:26
HDC WINAPI GetDC(_In_opt_ HWND)
#define IDC_TEXTBOX
Definition: resource.h:15
int WINAPI EnumFontFamiliesExW(_In_ HDC, _In_ PLOGFONTW, _In_ FONTENUMPROCW, _In_ LPARAM, _In_ DWORD)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define SW_HIDE
Definition: winuser.h:762
#define NULL_BRUSH
Definition: wingdi.h:899
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
#define WM_GETTEXT
Definition: winuser.h:1600
HICON hSmIcon
Definition: charmap.c:24
#define SUBLANG_DEFAULT
Definition: nls.h:168
BYTE lfCharSet
Definition: dimm.idl:67
#define CALLBACK
Definition: compat.h:27
#define MF_STRING
Definition: winuser.h:138
#define IDC_CMHELP
Definition: resource.h:13
BOOL WINAPI UpdateWindow(_In_ HWND)
HWND hWnd
Definition: settings.c:17
LONG top
Definition: windef.h:297
HANDLE HWND
Definition: compat.h:13
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
#define ZeroMemory
Definition: winbase.h:1635
HICON hIcon
Definition: winuser.h:3175
static void ChangeView(HWND hWnd)
Definition: charmap.c:274
#define WS_CHILD
Definition: pedump.c:617
#define SendDlgItemMessage
Definition: winuser.h:5708
LONG left
Definition: windef.h:296
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
int32_t INT_PTR
Definition: typedefs.h:62
#define GetTextMetrics
Definition: wingdi.h:4451
#define WCHAR
Definition: msvc.h:43
#define DEFAULT_CHARSET
Definition: wingdi.h:382
LONG right
Definition: windef.h:298
#define STATUSCLASSNAME
Definition: commctrl.h:1909
BOOL WINAPI DestroyWindow(_In_ HWND)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4185
struct tagINITCOMMONCONTROLSEX INITCOMMONCONTROLSEX
int32_t INT
Definition: typedefs.h:56
#define LANG_HEBREW
Definition: nls.h:67
WPARAM wParam
Definition: combotst.c:138
HFONT hFont
Definition: main.c:53
static HWND InitInstance(HINSTANCE hInst)
Definition: charmap.c:517
struct @1571 Msg[]
UINT_PTR WPARAM
Definition: windef.h:207
BOOL WINAPI AppendMenuW(_In_ HMENU, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)
#define EM_GETSEL
Definition: winuser.h:1958
#define IDS_ABOUT
Definition: resource.h:29
static VOID FillFontStyleComboList(HWND hwndCombo)
Definition: charmap.c:77
HWND hAdv
Definition: advanced.c:14
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
void SaveSettings(void)
Definition: settings.c:113
HINSTANCE hInstance
Definition: charmap.c:20
BYTE tmCharSet
Definition: wingdi.h:2357
LPCWSTR lpszMenuName
Definition: winuser.h:3178
#define SIZEOF(_ar)
Definition: calc.h:48
void LoadSettings(void)
Definition: settings.c:53
#define WM_COPY
Definition: winuser.h:1823
#define IDD_STATUSBAR
Definition: resource.h:9
LONG_PTR LPARAM
Definition: windef.h:208
#define FIXED_PITCH
Definition: wingdi.h:442
#define FM_SETFONT
Definition: precomp.h:22
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
VOID UnregisterMapClasses(HINSTANCE hInstance)
Definition: map.c:672
static void CopyCharacters(HWND hDlg)
Definition: charmap.c:154
#define INT(a)
Definition: assyntax.h:463
unsigned int idx
Definition: utils.c:41
#define CW_USEDEFAULT
Definition: winuser.h:225
#define EM_SETCHARFORMAT
Definition: richedit.h:101
#define SB_SIMPLE
Definition: commctrl.h:1928
#define CB_ADDSTRING
Definition: winuser.h:1897
HDC hdc
Definition: msvc.h:53
HMENU WINAPI GetSystemMenu(_In_ HWND, _In_ BOOL)
UINT msg
Definition: msvc.h:92
#define LoadLibraryW(x)
Definition: compat.h:404
smooth NULL
Definition: ftsmooth.c:416
INT_PTR CALLBACK AdvancedDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: advanced.c:511
#define MF_SEPARATOR
Definition: winuser.h:137
#define BM_GETCHECK
Definition: winuser.h:1879
#define ID_ABOUT
Definition: charmap.c:18
#define SW_SHOW
Definition: winuser.h:769
#define EM_SETEVENTMASK
Definition: richedit.h:102
#define CB_ERR
Definition: winuser.h:2389
LPCWSTR lpszClassName
Definition: winuser.h:3179
#define DefWindowProc
Definition: ros2win.h:31
#define WM_DESTROY
Definition: winuser.h:1591
BYTE lfOutPrecision
Definition: dimm.idl:68
BOOL WINAPI SetProcessDefaultLayout(DWORD dwDefaultLayout)
Definition: window.c:1686
#define WS_CAPTION
Definition: pedump.c:624
#define FM_GETHFONT
Definition: precomp.h:25
static LRESULT CALLBACK PanelWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: charmap.c:482
static int CALLBACK EnumFontNames(ENUMLOGFONTEXW *lpelfe, NEWTEXTMETRICEXW *lpntme, DWORD FontType, LPARAM lParam)
Definition: charmap.c:32
#define FreeLibrary(x)
Definition: compat.h:405
#define IDS_TITLE
Definition: resource.h:30
unsigned int BOOL
Definition: ntddk_ex.h:94
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_SIZE
Definition: winuser.h:1593
HBRUSH hbrBackground
Definition: winuser.h:3177
UINT cbSize
Definition: winuser.h:3169
#define WM_CLOSE
Definition: winuser.h:1603
HICON hBgIcon
Definition: charmap.c:25
#define MAX_PATH
Definition: compat.h:26
int WINAPI GetWindowTextLengthW(_In_ HWND)
#define EM_SETSEL
Definition: winuser.h:1979
unsigned int UINT
Definition: ndis.h:50
#define OUT_STROKE_PRECIS
Definition: wingdi.h:416
#define IDC_COPY
Definition: resource.h:17
int WINAPI GetSystemMetrics(_In_ int)
unsigned long DWORD
Definition: ntddk_ex.h:95
#define Len
Definition: deflate.h:82
#define GetObject
Definition: wingdi.h:4445
SETTINGS Settings
Definition: charmap.c:26
TCHAR szTitle[MAX_LOADSTRING]
Definition: magnifier.c:36
HINSTANCE hInstance
Definition: winuser.h:3174
#define DEFAULT_GUI_FONT
Definition: wingdi.h:907
CHAR Message[80]
Definition: alive.c:5
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static int PanelOnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
Definition: charmap.c:438
static const WCHAR L[]
Definition: oid.c:1087
#define ENM_CHANGE
Definition: richedit.h:468
#define FM_GETCHAR
Definition: precomp.h:23
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
Definition: commctrl.c:893
Definition: sacdrv.h:278
#define SB_SETTEXT
Definition: commctrl.h:1919
HCURSOR hCursor
Definition: winuser.h:3176
#define CB_SETCURSEL
Definition: winuser.h:1922
#define WM_COMMAND
Definition: winuser.h:1716
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
#define WINAPI
Definition: msvc.h:20
#define LoadCursor
Definition: winuser.h:5678
WNDPROC lpfnWndProc
Definition: winuser.h:3171
unsigned char BYTE
Definition: ntddk_ex.h:96
#define IDC_FONTCOMBO
Definition: resource.h:12
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
BOOL RegisterMapClasses(HINSTANCE hInstance)
Definition: map.c:646
VOID ChangeMapFont(HWND hDlg)
Definition: charmap.c:113
#define FM_SETCHAR
Definition: precomp.h:24
static HDC hDC
Definition: 3dtext.c:33
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define IDD_CHARMAP
Definition: resource.h:7
HWND WINAPI GetParent(_In_ HWND)
HINSTANCE hInst
Definition: dxdiag.c:13
#define WS_MINIMIZEBOX
Definition: pedump.c:631
#define EM_GETCHARFORMAT
Definition: richedit.h:91
FARPROC FONTENUMPROCW
Definition: wingdi.h:2874
int WINAPI GetUName(IN WORD wCharCode, OUT LPWSTR lpBuf)
Definition: getuname.c:17
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define GetMessage
Definition: winuser.h:5656
#define CBN_SELCHANGE
Definition: winuser.h:1940
HWND hCharmapDlg
Definition: charmap.c:22
#define WM_SETFONT
Definition: winuser.h:1632
HICON hIconSm
Definition: winuser.h:3180
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
#define IDC_ARROW
Definition: winuser.h:682
VOID UpdateStatusBar(WCHAR wch)
Definition: charmap.c:262
#define SendMessage
Definition: winuser.h:5709
#define WM_CREATE
Definition: winuser.h:1590
#define SM_CYFULLSCREEN
Definition: winuser.h:968
#define IDC_SELECT
Definition: resource.h:16
LOGFONTW elfLogFont
Definition: wingdi.h:2679
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
#define HIWORD(l)
Definition: typedefs.h:246
#define SCF_SELECTION
Definition: richedit.h:235
#define GetWindowTextLength
Definition: winuser.h:5665
CHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:55
#define MAKELANGID(p, s)
Definition: nls.h:15
LONG bottom
Definition: windef.h:299
static BYTE GetFontMetrics(HWND hWnd, HFONT hFont)
Definition: charmap.c:184
#define SM_CXFULLSCREEN
Definition: winuser.h:967
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define LoadImage
Definition: winuser.h:5681
INT WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrev, LPWSTR Cmd, int iCmd)
Definition: charmap.c:580
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LONG_PTR LRESULT
Definition: windef.h:209
HWND hAdvancedDlg
Definition: charmap.c:21
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_SYSMENU
Definition: pedump.c:629
#define IDD_ADVANCED
Definition: resource.h:10
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
#define WM_SYSCOMMAND
Definition: winuser.h:1717
#define WM_INITDIALOG
Definition: winuser.h:1715
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
static unsigned char buff[32768]
Definition: fatten.c:17
#define HeapFree(x, y, z)
Definition: compat.h:394
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
static VOID AddCharToSelection(HWND hDlg, WCHAR ch)
Definition: charmap.c:202
#define CreateDialog
Definition: winuser.h:5615
#define IDC_FONTMAP
Definition: resource.h:14
#define ICC_TAB_CLASSES
Definition: commctrl.h:61
#define EN_CHANGE
Definition: winuser.h:1983
#define CB_FINDSTRINGEXACT
Definition: winuser.h:1901