ReactOS  0.4.15-dev-5487-ge7bbbf0
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 #include "precomp.h"
10 
11 #include <commctrl.h>
12 #include <richedit.h>
13 #include <winnls.h>
14 
15 //#define REMOVE_ADVANCED
16 
17 #define ID_ABOUT 0x1
18 
26 
27 static
28 VOID
30 {
31  WCHAR szCharSetText[256];
32  LPWSTR trimmedName;
33  CPINFOEXW cpInfo;
34  INT i;
35 
36  if (LoadStringW(hInstance, IDS_UNICODE, szCharSetText, SIZEOF(szCharSetText)))
37  {
38  SendMessageW(hwndCombo,
40  0,
41  (LPARAM)szCharSetText);
42  }
43 
44  for (i = 0; i < SIZEOF(codePages); i++)
45  {
46  if (GetCPInfoExW(codePages[i], 0, &cpInfo))
47  {
48  trimmedName = wcschr(cpInfo.CodePageName, L'(');
49  if (!trimmedName)
50  trimmedName = cpInfo.CodePageName;
51 
52  SendMessageW(hwndCombo,
54  0,
55  (LPARAM)trimmedName);
56  }
57  }
58 
59  SendMessageW(hwndCombo, CB_SETCURSEL, 0, 0);
60 }
61 
62 static
63 VOID
65 {
66  WCHAR szAllText[256];
67 
68  if (LoadStringW(hInstance, IDS_ALL, szAllText, SIZEOF(szAllText)))
69  {
70  SendMessageW(hwndCombo, CB_ADDSTRING, 0, (LPARAM)szAllText);
71  }
72 
73  SendMessageW(hwndCombo, CB_SETCURSEL, 0, 0);
74 }
75 
76 /* Font-enumeration callback */
77 static
78 int
81  NEWTEXTMETRICEXW *lpntme,
82  DWORD FontType,
83  LPARAM lParam)
84 {
85  HWND hwndCombo = (HWND)lParam;
86  LPWSTR pszName = lpelfe->elfLogFont.lfFaceName;
87 
88  /* Skip rotated font */
89  if(pszName[0] == L'@') return 1;
90 
91  /* make sure font doesn't already exist in our list */
92  if(SendMessageW(hwndCombo,
94  0,
95  (LPARAM)pszName) == CB_ERR)
96  {
97  INT idx;
98  BOOL fFixed;
99  BOOL fTrueType;
100 
101  /* add the font */
102  idx = (INT)SendMessageW(hwndCombo,
103  CB_ADDSTRING,
104  0,
105  (LPARAM)pszName);
106 
107  /* record the font's attributes (Fixedwidth and Truetype) */
108  fFixed = (lpelfe->elfLogFont.lfPitchAndFamily & FIXED_PITCH) ? TRUE : FALSE;
109  fTrueType = (lpelfe->elfLogFont.lfOutPrecision == OUT_STROKE_PRECIS) ? TRUE : FALSE;
110 
111  /* store this information in the list-item's userdata area */
112  SendMessageW(hwndCombo,
114  idx,
115  MAKEWPARAM(fFixed, fTrueType));
116  }
117 
118  return 1;
119 }
120 
121 
122 /* Initialize the font-list by enumeration all system fonts */
123 static
124 VOID
126 {
127  HDC hdc;
128  LOGFONTW lf;
129 
130  /* FIXME: for fun, draw each font in its own style */
132  SendMessageW(hwndCombo,
133  WM_SETFONT,
134  (WPARAM)hFont,
135  0);
136 
137  ZeroMemory(&lf, sizeof(lf));
139 
140  hdc = GetDC(hwndCombo);
141 
142  /* store the list of fonts in the combo */
144  &lf,
146  (LPARAM)hwndCombo,
147  0);
148 
149  ReleaseDC(hwndCombo,
150  hdc);
151 
152  SendMessageW(hwndCombo,
153  CB_SETCURSEL,
154  0,
155  0);
156 }
157 
158 
159 extern
160 VOID
162 {
163  HWND hCombo;
164  HWND hMap;
165  LPWSTR lpFontName;
166  INT Len;
167 
168  hCombo = GetDlgItem(hDlg, IDC_FONTCOMBO);
169 
170  Len = GetWindowTextLengthW(hCombo);
171 
172  if (Len != 0)
173  {
174  lpFontName = HeapAlloc(GetProcessHeap(),
175  0,
176  (Len + 1) * sizeof(WCHAR));
177 
178  if (lpFontName)
179  {
180  SendMessageW(hCombo,
181  WM_GETTEXT,
182  Len + 1,
183  (LPARAM)lpFontName);
184 
185  hMap = GetDlgItem(hDlg, IDC_FONTMAP);
186 
187  SendMessageW(hMap,
188  FM_SETFONT,
189  0,
190  (LPARAM)lpFontName);
191  }
192 
194  0,
195  lpFontName);
196  }
197 }
198 
199 // Copy collected characters into the clipboard
200 static
201 void
203 {
204  HWND hText = GetDlgItem(hDlg, IDC_TEXTBOX);
205  DWORD dwStart, dwEnd;
206 
207  // Acquire selection limits
208  SendMessage(hText, EM_GETSEL, (WPARAM)&dwStart, (LPARAM)&dwEnd);
209 
210  // Test if the whose text is unselected
211  if(dwStart == dwEnd) {
212 
213  // Select the whole text
214  SendMessageW(hText, EM_SETSEL, 0, -1);
215 
216  // Copy text
217  SendMessageW(hText, WM_COPY, 0, 0);
218 
219  // Restore previous values
220  SendMessageW(hText, EM_SETSEL, (WPARAM)dwStart, (LPARAM)dwEnd);
221 
222  } else {
223 
224  // Copy text
225  SendMessageW(hText, WM_COPY, 0, 0);
226  }
227 }
228 
229 // Recover charset for the given font
230 static
231 BYTE
233 {
234  TEXTMETRIC tmFont;
235  HGDIOBJ hOldObj;
236  HDC hDC;
237 
238  hDC = GetDC(hWnd);
239  hOldObj = SelectObject(hDC, hFont);
240  GetTextMetrics(hDC, &tmFont);
241  SelectObject(hDC, hOldObj);
242  ReleaseDC(hWnd, hDC);
243 
244  return tmFont.tmCharSet;
245 }
246 
247 // Select a new character
248 static
249 VOID
251 {
252  HWND hMap = GetDlgItem(hDlg, IDC_FONTMAP);
253  HWND hText = GetDlgItem(hDlg, IDC_TEXTBOX);
254  HFONT hFont;
255  LOGFONT lFont;
256  CHARFORMAT cf;
257 
258  // Retrieve current character selected
259  if (ch == 0)
260  {
261  ch = (WCHAR) SendMessageW(hMap, FM_GETCHAR, 0, 0);
262  if (!ch)
263  return;
264  }
265 
266  // Retrieve current selected font
267  hFont = (HFONT)SendMessage(hMap, FM_GETHFONT, 0, 0);
268 
269  // Recover LOGFONT structure from hFont
270  if (!GetObject(hFont, sizeof(LOGFONT), &lFont))
271  return;
272 
273  // Recover font properties of Richedit control
274  ZeroMemory(&cf, sizeof(cf));
275  cf.cbSize = sizeof(cf);
277 
278  // Apply properties of the new font
279  cf.bCharSet = GetFontMetrics(hText, hFont);
280 
281  // Update font name
282  wcscpy(cf.szFaceName, lFont.lfFaceName);
283 
284  // Update font properties
286 
287  // Send selected character to Richedit
288  SendMessage(hText, WM_CHAR, (WPARAM)ch, 0);
289 }
290 
291 #ifndef REMOVE_ADVANCED
292 static
293 void
295 {
296  if (hDlg == hCharmapDlg)
297  {
298  Settings.IsAdvancedView =
300 
301  }
302 
303  if (hDlg == hAdvancedDlg)
304  {
305  }
306 }
307 #endif
308 
309 VOID
311 {
313  WCHAR szDesc[MAX_PATH];
314 
315  GetUName(wch, szDesc);
316  wsprintfW(buff, L"U+%04X: %s", wch, szDesc);
318 }
319 
320 static
321 void
323 {
324  RECT rcCharmap;
325 #ifndef REMOVE_ADVANCED
326  RECT rcAdvanced;
327 #else
328  RECT rcCopy;
329 #endif
330  RECT rcPanelExt;
331  RECT rcPanelInt;
332  RECT rcStatus;
333  UINT DeX, DeY;
334  LONG xPos, yPos;
335  UINT Width, Height;
336  UINT DeskTopWidth, DeskTopHeight;
337 #ifdef REMOVE_ADVANCED
338  HWND hCopy;
339 #endif
340 
341  GetClientRect(hCharmapDlg, &rcCharmap);
342 #ifndef REMOVE_ADVANCED
343  GetClientRect(hAdvancedDlg, &rcAdvanced);
344 #else
345  hCopy = GetDlgItem(hCharmapDlg, IDC_COPY);
346  GetClientRect(hCopy, &rcCopy);
347 #endif
348  GetWindowRect(hWnd, &rcPanelExt);
349  GetClientRect(hWnd, &rcPanelInt);
350  GetClientRect(hStatusWnd, &rcStatus);
351 
352  DeskTopWidth = GetSystemMetrics(SM_CXFULLSCREEN);
353  DeskTopHeight = GetSystemMetrics(SM_CYFULLSCREEN);
354 
355  DeX = (rcPanelExt.right - rcPanelExt.left) - rcPanelInt.right;
356  DeY = (rcPanelExt.bottom - rcPanelExt.top) - rcPanelInt.bottom;
357 
358  MoveWindow(hCharmapDlg, 0, 0, rcCharmap.right, rcCharmap.bottom, FALSE);
359 #ifndef REMOVE_ADVANCED
360  MoveWindow(hAdvancedDlg, 0, rcCharmap.bottom, rcAdvanced.right, rcAdvanced.bottom, FALSE);
361  ShowWindow(hAdvancedDlg, (Settings.IsAdvancedView) ? SW_SHOW : SW_HIDE);
362 #endif
363  xPos = rcPanelExt.left;
364  yPos = rcPanelExt.top;
365 
366  Width = DeX + rcCharmap.right;
367  Height = DeY + rcCharmap.bottom + rcStatus.bottom;
368 #ifndef REMOVE_ADVANCED
369  if (Settings.IsAdvancedView)
370  Height += rcAdvanced.bottom;
371 #else
372  /* The lack of advanced button leaves an empty gap at the bottom of the window.
373  Shrink the window height a bit here to accomodate for that lost control. */
374  Height = rcCharmap.bottom + rcCopy.bottom + 10;
375 #endif
376  // FIXME: This fails on multi monitor setups
377  if ((xPos + Width) > DeskTopWidth)
378  xPos = DeskTopWidth - Width;
379 
380  if ((yPos + Height) > DeskTopHeight)
381  yPos = DeskTopHeight - Height;
382 
384  xPos, yPos,
385  Width, Height,
386  TRUE);
387 }
388 
389 static
390 INT_PTR
391 CALLBACK
393  UINT Message,
394  WPARAM wParam,
395  LPARAM lParam)
396 {
397  switch(Message)
398  {
399  case WM_INITDIALOG:
400  {
401  DWORD evMask;
402 #ifdef REMOVE_ADVANCED
403  HWND hAdv;
404 #endif
405 
407  IDC_FONTCOMBO));
408 
409  ChangeMapFont(hDlg);
410 
411  // Configure Richedit control for sending notification changes.
412  evMask = SendDlgItemMessage(hDlg, IDC_TEXTBOX, EM_GETEVENTMASK, 0, 0);
413  evMask |= ENM_CHANGE;
415 #ifdef REMOVE_ADVANCED
416  hAdv = GetDlgItem(hDlg, IDC_CHECK_ADVANCED);
417  ShowWindow(hAdv, SW_HIDE);
418 #endif
419  return TRUE;
420  }
421 
422  case WM_COMMAND:
423  {
424  switch(LOWORD(wParam))
425  {
426  case IDC_FONTMAP:
427  switch (HIWORD(wParam))
428  {
429  case FM_SETCHAR:
431  break;
432  }
433  break;
434 
435  case IDC_FONTCOMBO:
436  if (HIWORD(wParam) == CBN_SELCHANGE)
437  {
438  ChangeMapFont(hDlg);
439  }
440  break;
441 
442  case IDC_SELECT:
443  AddCharToSelection(hDlg, 0);
444  break;
445 
446  case IDC_TEXTBOX:
447  switch (HIWORD(wParam)) {
448  case EN_CHANGE:
449  if (GetWindowTextLength(GetDlgItem(hDlg, IDC_TEXTBOX)) == 0)
451  else
453  break;
454  }
455  break;
456 
457  case IDC_COPY:
458  CopyCharacters(hDlg);
459  break;
460 #ifndef REMOVE_ADVANCED
461  case IDC_CHECK_ADVANCED:
462  UpdateSettings(hDlg);
463  ChangeView(GetParent(hDlg));
464  break;
465 #endif
466  }
467  }
468  break;
469 
470  default:
471  break;
472  }
473 
474  return FALSE;
475 }
476 #ifndef REMOVE_ADVANCED
477 static
478 INT_PTR
479 CALLBACK
481  UINT Message,
482  WPARAM wParam,
483  LPARAM lParam)
484 {
485  switch(Message)
486  {
487  case WM_INITDIALOG:
488  return TRUE;
489 
490  case WM_COMMAND:
491  {
492  switch (LOWORD(wParam))
493  {
494  case IDC_COMBO_CHARSET:
495  if (HIWORD(wParam) == CBN_SELCHANGE)
496  {
498  CB_GETCURSEL,
499  0, 0);
502  idx, 0);
503 
505  }
506  break;
507  }
508  }
509 
510  default:
511  return FALSE;
512  }
513 
514  return FALSE;
515 }
516 #endif
517 
518 static int
520 {
521  HMENU hSysMenu;
522  WCHAR lpAboutText[256];
523 
526  hWnd,
528 
529  // For now, the Help push button is disabled because of lacking of HTML Help support
531 
532 #ifndef REMOVE_ADVANCED
535  hWnd,
537 
539 
543 #endif
545  NULL,
547  0, 0, 0, 0,
548  hWnd,
550  hInstance,
551  NULL);
552 
553  // Set the status bar for multiple parts output
555 
556  ChangeView(hWnd);
557 
558  hSysMenu = GetSystemMenu(hWnd, FALSE);
559 
560  if (hSysMenu != NULL)
561  {
562  if (LoadStringW(hInstance, IDS_ABOUT, lpAboutText, SIZEOF(lpAboutText)))
563  {
564  AppendMenuW(hSysMenu, MF_SEPARATOR, 0, NULL);
565  AppendMenuW(hSysMenu, MF_STRING, ID_ABOUT, lpAboutText);
566  }
567  }
568 
570 
571  return 0;
572 }
573 
574 static LRESULT CALLBACK
576 {
577  switch (msg) {
578  case WM_CREATE:
579  return PanelOnCreate(hWnd, wParam, lParam);
580 
581  case WM_CLOSE:
583  return 0;
584 
585  case WM_SIZE:
587  break;
588 
589  case WM_DESTROY:
590  SaveSettings();
591  PostQuitMessage(0);
592  return 0;
593 
594  case WM_SYSCOMMAND:
595  switch(wParam) {
596  case ID_ABOUT:
598  break;
599  }
600  break;
601 
602  }
603 
604  return DefWindowProc(hWnd, msg, wParam, lParam);
605 }
606 
607 static HWND
609 {
610  WCHAR szClass[] = L"CharMap";
611  WCHAR szTitle[256];
612  WNDCLASSEXW wc;
613  HWND hWnd;
614 
616 
619  IMAGE_ICON,
620  16,
621  16,
622  0);
623 
626  IMAGE_ICON,
627  32,
628  32,
629  0);
630 
631  // Create workspace
632  ZeroMemory(&wc, sizeof(wc));
633 
634  wc.cbSize = sizeof(wc);
636  wc.hInstance = hInst;
637  wc.hIcon = hBgIcon;
640  wc.lpszMenuName = NULL;
641  wc.lpszClassName = szClass;
642  wc.hIconSm = hSmIcon;
643 
644  RegisterClassExW(&wc);
645 
647  szClass,
648  szTitle,
654  NULL,
655  NULL,
656  hInst,
657  NULL);
658 
659  if (hWnd != NULL)
660  {
661  LoadSettings();
664  }
665 
666  return hWnd;
667 }
668 
669 INT
670 WINAPI
672  HINSTANCE hPrev,
673  LPWSTR Cmd,
674  int iCmd)
675 {
677  INT Ret = 1;
678  HMODULE hRichEd20;
679  MSG Msg;
680 
681  hInstance = hInst;
682 
683  /* Mirroring code for the titlebar */
684  switch (GetUserDefaultUILanguage())
685  {
688  break;
689 
690  default:
691  break;
692  }
693 
694  iccx.dwSize = sizeof(INITCOMMONCONTROLSEX);
695  iccx.dwICC = ICC_TAB_CLASSES;
696  InitCommonControlsEx(&iccx);
697 
699  {
700  hRichEd20 = LoadLibraryW(L"RICHED20.DLL");
701 
702  if (hRichEd20 != NULL)
703  {
705 
706  for (;;)
707  {
708  if (GetMessage(&Msg, NULL, 0, 0) <= 0)
709  {
710  Ret = Msg.wParam;
711  break;
712  }
713 
714  /* NOTE: CreateDialog needs IsDialogMessage call in message loop */
716  continue;
717 #ifndef REMOVE_ADVANCED
719  continue;
720 #endif
721 
724  }
725 
726  FreeLibrary(hRichEd20);
727  }
729  }
730 
731  return Ret;
732 }
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
static IClassFactory * cf
HWND hStatusWnd
Definition: charmap.c:22
#define CB_SETITEMDATA
Definition: winuser.h:1956
#define IDI_ICON
Definition: resource.h:5
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define DispatchMessage
Definition: winuser.h:5755
LANGID WINAPI GetUserDefaultUILanguage(void)
Definition: lang.c:810
BOOL WINAPI TranslateMessage(_In_ const MSG *)
static INT_PTR CALLBACK CharMapDlgProc(HWND hDlg, UINT Message, WPARAM wParam, LPARAM lParam)
Definition: charmap.c:392
static HICON
Definition: imagelist.c:84
#define IDS_UNICODE
Definition: resource.h:31
#define MAKEWPARAM(l, h)
Definition: winuser.h:3999
BYTE lfPitchAndFamily
Definition: dimm.idl:71
#define IMAGE_ICON
Definition: winuser.h:212
#define LAYOUT_RTL
Definition: wingdi.h:1371
VOID ShowAboutDlg(HWND hWndParent)
Definition: about.c:77
#define WM_CHAR
Definition: winuser.h:1707
#define CreateWindow
Definition: winuser.h:5744
#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
#define TRUE
Definition: types.h:120
int WINAPI EnumFontFamiliesExW(_In_ HDC, _In_ PLOGFONTW, _In_ FONTENUMPROCW, _In_ LPARAM, _In_ DWORD)
#define SW_HIDE
Definition: winuser.h:762
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:124
WCHAR CodePageName[MAX_PATH]
Definition: winnls.h:599
#define NULL_BRUSH
Definition: wingdi.h:901
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
#define WM_GETTEXT
Definition: winuser.h:1608
HICON hSmIcon
Definition: charmap.c:23
#define SUBLANG_DEFAULT
Definition: nls.h:168
static VOID FillGroupByComboList(HWND hwndCombo)
Definition: charmap.c:64
BYTE lfCharSet
Definition: dimm.idl:67
#define INT
Definition: polytest.cpp:20
static HDC
Definition: imagelist.c:92
#define CALLBACK
Definition: compat.h:35
#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:307
HANDLE HWND
Definition: compat.h:19
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
#define ZeroMemory
Definition: winbase.h:1670
HICON hIcon
Definition: winuser.h:3212
HWND WINAPI SetFocus(_In_opt_ HWND)
UINT_PTR WPARAM
Definition: windef.h:207
static void ChangeView(HWND hWnd)
Definition: charmap.c:322
#define WS_CHILD
Definition: pedump.c:617
#define SendDlgItemMessage
Definition: winuser.h:5832
_In_ HFONT _Out_ PUINT Height
Definition: font.h:124
LONG left
Definition: windef.h:306
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
int32_t INT_PTR
Definition: typedefs.h:64
#define IsDialogMessage
Definition: winuser.h:5799
#define GetTextMetrics
Definition: wingdi.h:4474
#define DEFAULT_CHARSET
Definition: wingdi.h:384
LONG right
Definition: windef.h:308
#define STATUSCLASSNAME
Definition: commctrl.h:1939
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:4306
struct tagINITCOMMONCONTROLSEX INITCOMMONCONTROLSEX
int32_t INT
Definition: typedefs.h:58
#define LANG_HEBREW
Definition: nls.h:67
#define CB_GETCURSEL
Definition: winuser.h:1933
WPARAM wParam
Definition: combotst.c:138
#define IDC_COMBO_CHARSET
Definition: resource.h:21
HFONT hFont
Definition: main.c:53
static HWND InitInstance(HINSTANCE hInst)
Definition: charmap.c:608
BOOL WINAPI AppendMenuW(_In_ HMENU, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)
#define EM_GETSEL
Definition: winuser.h:1987
#define IDS_ABOUT
Definition: resource.h:29
static VOID FillFontStyleComboList(HWND hwndCombo)
Definition: charmap.c:125
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS Settings
Definition: wdfdevice.h:2592
void SaveSettings(void)
Definition: settings.c:115
HINSTANCE hInstance
Definition: charmap.c:19
BYTE tmCharSet
Definition: wingdi.h:2380
#define L(x)
Definition: ntvdm.h:50
LPCWSTR lpszMenuName
Definition: winuser.h:3215
#define SIZEOF(_ar)
Definition: calc.h:97
void LoadSettings(void)
Definition: settings.c:53
#define FALSE
Definition: types.h:117
#define WM_COPY
Definition: winuser.h:1852
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
#define IDD_STATUSBAR
Definition: resource.h:9
#define FIXED_PITCH
Definition: wingdi.h:444
#define FM_SETFONT
Definition: precomp.h:22
#define FM_SETCHARMAP
Definition: precomp.h:26
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
VOID UnregisterMapClasses(HINSTANCE hInstance)
Definition: map.c:875
static void CopyCharacters(HWND hDlg)
Definition: charmap.c:202
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:1958
#define CB_ADDSTRING
Definition: winuser.h:1926
HMENU WINAPI GetSystemMenu(_In_ HWND, _In_ BOOL)
#define LoadLibraryW(x)
Definition: compat.h:747
#define MF_SEPARATOR
Definition: winuser.h:137
LONG_PTR LPARAM
Definition: windef.h:208
#define BM_GETCHECK
Definition: winuser.h:1908
static void UpdateSettings(HWND hDlg)
Definition: charmap.c:294
#define ID_ABOUT
Definition: charmap.c:17
#define SW_SHOW
Definition: winuser.h:769
#define IDC_COMBO_GROUPBY
Definition: resource.h:22
#define EM_SETEVENTMASK
Definition: richedit.h:102
#define IDS_ALL
Definition: resource.h:32
#define CB_ERR
Definition: winuser.h:2425
LPCWSTR lpszClassName
Definition: winuser.h:3216
#define DefWindowProc
Definition: ros2win.h:31
#define WM_DESTROY
Definition: winuser.h:1599
BYTE lfOutPrecision
Definition: dimm.idl:68
BOOL WINAPI SetProcessDefaultLayout(DWORD dwDefaultLayout)
Definition: window.c:1720
#define WS_CAPTION
Definition: pedump.c:624
#define FM_GETHFONT
Definition: precomp.h:25
#define IDC_EDIT_UNICODE
Definition: resource.h:25
static LRESULT CALLBACK PanelWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: charmap.c:575
static int CALLBACK EnumFontNames(ENUMLOGFONTEXW *lpelfe, NEWTEXTMETRICEXW *lpntme, DWORD FontType, LPARAM lParam)
Definition: charmap.c:80
#define FreeLibrary(x)
Definition: compat.h:748
#define IDS_TITLE
Definition: resource.h:30
#define GetProcessHeap()
Definition: compat.h:736
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define WM_SIZE
Definition: winuser.h:1601
HBRUSH hbrBackground
Definition: winuser.h:3214
UINT cbSize
Definition: winuser.h:3206
#define WM_CLOSE
Definition: winuser.h:1611
HICON hBgIcon
Definition: charmap.c:24
#define MAX_PATH
Definition: compat.h:34
int WINAPI GetWindowTextLengthW(_In_ HWND)
#define WINAPI
Definition: msvc.h:6
#define EM_SETSEL
Definition: winuser.h:2008
static VOID FillCharacterSetComboList(HWND hwndCombo)
Definition: charmap.c:29
#define OUT_STROKE_PRECIS
Definition: wingdi.h:418
#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:4468
SETTINGS Settings
Definition: charmap.c:25
TCHAR szTitle[MAX_LOADSTRING]
Definition: magnifier.c:35
HINSTANCE hInstance
Definition: winuser.h:3211
#define DEFAULT_GUI_FONT
Definition: wingdi.h:909
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:519
#define ENM_CHANGE
Definition: richedit.h:468
#define FM_GETCHAR
Definition: precomp.h:23
HDC hdc
Definition: main.c:9
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
Definition: commctrl.c:893
Definition: sacdrv.h:278
#define SB_SETTEXT
Definition: commctrl.h:1949
HCURSOR hCursor
Definition: winuser.h:3213
#define CB_SETCURSEL
Definition: winuser.h:1951
#define WM_COMMAND
Definition: winuser.h:1730
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
unsigned char BYTE
Definition: xxhash.c:193
#define LoadCursor
Definition: winuser.h:5802
WNDPROC lpfnWndProc
Definition: winuser.h:3208
#define IDC_FONTCOMBO
Definition: resource.h:12
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
BOOL RegisterMapClasses(HINSTANCE hInstance)
Definition: map.c:849
VOID ChangeMapFont(HWND hDlg)
Definition: charmap.c:161
#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
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define WS_MINIMIZEBOX
Definition: pedump.c:631
static INT_PTR CALLBACK AdvancedDlgProc(HWND hDlg, UINT Message, WPARAM wParam, LPARAM lParam)
Definition: charmap.c:480
#define EM_GETCHARFORMAT
Definition: richedit.h:91
FARPROC FONTENUMPROCW
Definition: wingdi.h:2897
int WINAPI GetUName(IN WORD wCharCode, OUT LPWSTR lpBuf)
Definition: getuname.c:17
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
#define GetMessage
Definition: winuser.h:5780
#define CBN_SELCHANGE
Definition: winuser.h:1969
HWND hCharmapDlg
Definition: charmap.c:21
#define WM_SETFONT
Definition: winuser.h:1640
HICON hIconSm
Definition: winuser.h:3217
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
#define msg(x)
Definition: auth_time.c:54
#define IDC_ARROW
Definition: winuser.h:682
VOID UpdateStatusBar(WCHAR wch)
Definition: charmap.c:310
#define SendMessage
Definition: winuser.h:5833
#define WM_CREATE
Definition: winuser.h:1598
#define SM_CYFULLSCREEN
Definition: winuser.h:972
#define IDC_SELECT
Definition: resource.h:16
LOGFONTW elfLogFont
Definition: wingdi.h:2702
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
#define HIWORD(l)
Definition: typedefs.h:247
#define IDC_BUTTON_SEARCH
Definition: resource.h:23
#define SCF_SELECTION
Definition: richedit.h:235
#define GetWindowTextLength
Definition: winuser.h:5789
CHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:55
#define MAKELANGID(p, s)
Definition: nls.h:15
BOOL WINAPI GetCPInfoExW(UINT CodePage, DWORD dwFlags, LPCPINFOEXW lpCPInfoEx)
Definition: nls.c:2093
LONG bottom
Definition: windef.h:309
static BYTE GetFontMetrics(HWND hWnd, HFONT hFont)
Definition: charmap.c:232
#define SM_CXFULLSCREEN
Definition: winuser.h:971
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define LoadImage
Definition: winuser.h:5805
static const UINT codePages[]
Definition: precomp.h:29
INT WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrev, LPWSTR Cmd, int iCmd)
Definition: charmap.c:671
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LONG_PTR LRESULT
Definition: windef.h:209
HWND hAdvancedDlg
Definition: charmap.c:20
#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:1731
struct @1595 Msg[]
#define WM_INITDIALOG
Definition: winuser.h:1729
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:735
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
static VOID AddCharToSelection(HWND hDlg, WCHAR ch)
Definition: charmap.c:250
#define CreateDialog
Definition: winuser.h:5739
#define IDC_FONTMAP
Definition: resource.h:14
#define ICC_TAB_CLASSES
Definition: commctrl.h:61
#define EN_CHANGE
Definition: winuser.h:2012
#define CB_FINDSTRINGEXACT
Definition: winuser.h:1930