ReactOS  0.4.15-dev-1389-g828d5fa
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 static
29 VOID
31 {
32  WCHAR szCharSetText[256];
33  LPWSTR trimmedName;
34  CPINFOEXW cpInfo;
35  INT i;
36 
37  if (LoadStringW(hInstance, IDS_UNICODE, szCharSetText, SIZEOF(szCharSetText)))
38  {
39  SendMessageW(hwndCombo,
41  0,
42  (LPARAM)szCharSetText);
43  }
44 
45  for (i = 0; i < SIZEOF(codePages); i++)
46  {
47  if (GetCPInfoExW(codePages[i], 0, &cpInfo))
48  {
49  trimmedName = wcschr(cpInfo.CodePageName, L'(');
50  if (!trimmedName)
51  trimmedName = cpInfo.CodePageName;
52 
53  SendMessageW(hwndCombo,
55  0,
56  (LPARAM)trimmedName);
57  }
58  }
59 
60  SendMessageW(hwndCombo, CB_SETCURSEL, 0, 0);
61 }
62 
63 static
64 VOID
66 {
67  WCHAR szAllText[256];
68 
69  if (LoadStringW(hInstance, IDS_ALL, szAllText, SIZEOF(szAllText)))
70  {
71  SendMessageW(hwndCombo, CB_ADDSTRING, 0, (LPARAM)szAllText);
72  }
73 
74  SendMessageW(hwndCombo, CB_SETCURSEL, 0, 0);
75 }
76 
77 /* Font-enumeration callback */
78 static
79 int
82  NEWTEXTMETRICEXW *lpntme,
83  DWORD FontType,
84  LPARAM lParam)
85 {
86  HWND hwndCombo = (HWND)lParam;
87  LPWSTR pszName = lpelfe->elfLogFont.lfFaceName;
88 
89  /* Skip rotated font */
90  if(pszName[0] == L'@') return 1;
91 
92  /* make sure font doesn't already exist in our list */
93  if(SendMessageW(hwndCombo,
95  0,
96  (LPARAM)pszName) == CB_ERR)
97  {
98  INT idx;
99  BOOL fFixed;
100  BOOL fTrueType;
101 
102  /* add the font */
103  idx = (INT)SendMessageW(hwndCombo,
104  CB_ADDSTRING,
105  0,
106  (LPARAM)pszName);
107 
108  /* record the font's attributes (Fixedwidth and Truetype) */
109  fFixed = (lpelfe->elfLogFont.lfPitchAndFamily & FIXED_PITCH) ? TRUE : FALSE;
110  fTrueType = (lpelfe->elfLogFont.lfOutPrecision == OUT_STROKE_PRECIS) ? TRUE : FALSE;
111 
112  /* store this information in the list-item's userdata area */
113  SendMessageW(hwndCombo,
115  idx,
116  MAKEWPARAM(fFixed, fTrueType));
117  }
118 
119  return 1;
120 }
121 
122 
123 /* Initialize the font-list by enumeration all system fonts */
124 static
125 VOID
127 {
128  HDC hdc;
129  LOGFONTW lf;
130 
131  /* FIXME: for fun, draw each font in its own style */
133  SendMessageW(hwndCombo,
134  WM_SETFONT,
135  (WPARAM)hFont,
136  0);
137 
138  ZeroMemory(&lf, sizeof(lf));
140 
141  hdc = GetDC(hwndCombo);
142 
143  /* store the list of fonts in the combo */
145  &lf,
147  (LPARAM)hwndCombo,
148  0);
149 
150  ReleaseDC(hwndCombo,
151  hdc);
152 
153  SendMessageW(hwndCombo,
154  CB_SETCURSEL,
155  0,
156  0);
157 }
158 
159 
160 extern
161 VOID
163 {
164  HWND hCombo;
165  HWND hMap;
166  LPWSTR lpFontName;
167  INT Len;
168 
169  hCombo = GetDlgItem(hDlg, IDC_FONTCOMBO);
170 
171  Len = GetWindowTextLengthW(hCombo);
172 
173  if (Len != 0)
174  {
175  lpFontName = HeapAlloc(GetProcessHeap(),
176  0,
177  (Len + 1) * sizeof(WCHAR));
178 
179  if (lpFontName)
180  {
181  SendMessageW(hCombo,
182  WM_GETTEXT,
183  Len + 1,
184  (LPARAM)lpFontName);
185 
186  hMap = GetDlgItem(hDlg, IDC_FONTMAP);
187 
188  SendMessageW(hMap,
189  FM_SETFONT,
190  0,
191  (LPARAM)lpFontName);
192  }
193 
195  0,
196  lpFontName);
197  }
198 }
199 
200 // Copy collected characters into the clipboard
201 static
202 void
204 {
205  HWND hText = GetDlgItem(hDlg, IDC_TEXTBOX);
206  DWORD dwStart, dwEnd;
207 
208  // Acquire selection limits
209  SendMessage(hText, EM_GETSEL, (WPARAM)&dwStart, (LPARAM)&dwEnd);
210 
211  // Test if the whose text is unselected
212  if(dwStart == dwEnd) {
213 
214  // Select the whole text
215  SendMessageW(hText, EM_SETSEL, 0, -1);
216 
217  // Copy text
218  SendMessageW(hText, WM_COPY, 0, 0);
219 
220  // Restore previous values
221  SendMessageW(hText, EM_SETSEL, (WPARAM)dwStart, (LPARAM)dwEnd);
222 
223  } else {
224 
225  // Copy text
226  SendMessageW(hText, WM_COPY, 0, 0);
227  }
228 }
229 
230 // Recover charset for the given font
231 static
232 BYTE
234 {
235  TEXTMETRIC tmFont;
236  HGDIOBJ hOldObj;
237  HDC hDC;
238 
239  hDC = GetDC(hWnd);
240  hOldObj = SelectObject(hDC, hFont);
241  GetTextMetrics(hDC, &tmFont);
242  SelectObject(hDC, hOldObj);
243  ReleaseDC(hWnd, hDC);
244 
245  return tmFont.tmCharSet;
246 }
247 
248 // Select a new character
249 static
250 VOID
252 {
253  HWND hMap = GetDlgItem(hDlg, IDC_FONTMAP);
254  HWND hText = GetDlgItem(hDlg, IDC_TEXTBOX);
255  HFONT hFont;
256  LOGFONT lFont;
257  CHARFORMAT cf;
258 
259  // Retrieve current character selected
260  if (ch == 0)
261  {
262  ch = (WCHAR) SendMessageW(hMap, FM_GETCHAR, 0, 0);
263  if (!ch)
264  return;
265  }
266 
267  // Retrieve current selected font
268  hFont = (HFONT)SendMessage(hMap, FM_GETHFONT, 0, 0);
269 
270  // Recover LOGFONT structure from hFont
271  if (!GetObject(hFont, sizeof(LOGFONT), &lFont))
272  return;
273 
274  // Recover font properties of Richedit control
275  ZeroMemory(&cf, sizeof(cf));
276  cf.cbSize = sizeof(cf);
278 
279  // Apply properties of the new font
280  cf.bCharSet = GetFontMetrics(hText, hFont);
281 
282  // Update font name
283  wcscpy(cf.szFaceName, lFont.lfFaceName);
284 
285  // Update font properties
287 
288  // Send selected character to Richedit
289  SendMessage(hText, WM_CHAR, (WPARAM)ch, 0);
290 }
291 
292 #ifndef REMOVE_ADVANCED
293 static
294 void
296 {
297  if (hDlg == hCharmapDlg)
298  {
299  Settings.IsAdvancedView =
301 
302  }
303 
304  if (hDlg == hAdvancedDlg)
305  {
306  }
307 }
308 #endif
309 
310 VOID
312 {
314  WCHAR szDesc[MAX_PATH];
315 
316  GetUName(wch, szDesc);
317  wsprintfW(buff, L"U+%04X: %s", wch, szDesc);
319 }
320 
321 static
322 void
324 {
325  RECT rcCharmap;
326 #ifndef REMOVE_ADVANCED
327  RECT rcAdvanced;
328 #else
329  RECT rcCopy;
330 #endif
331  RECT rcPanelExt;
332  RECT rcPanelInt;
333  RECT rcStatus;
334  UINT DeX, DeY;
335  LONG xPos, yPos;
336  UINT Width, Height;
337  UINT DeskTopWidth, DeskTopHeight;
338 #ifdef REMOVE_ADVANCED
339  HWND hCopy;
340 #endif
341 
342  GetClientRect(hCharmapDlg, &rcCharmap);
343 #ifndef REMOVE_ADVANCED
344  GetClientRect(hAdvancedDlg, &rcAdvanced);
345 #else
346  hCopy = GetDlgItem(hCharmapDlg, IDC_COPY);
347  GetClientRect(hCopy, &rcCopy);
348 #endif
349  GetWindowRect(hWnd, &rcPanelExt);
350  GetClientRect(hWnd, &rcPanelInt);
351  GetClientRect(hStatusWnd, &rcStatus);
352 
353  DeskTopWidth = GetSystemMetrics(SM_CXFULLSCREEN);
354  DeskTopHeight = GetSystemMetrics(SM_CYFULLSCREEN);
355 
356  DeX = (rcPanelExt.right - rcPanelExt.left) - rcPanelInt.right;
357  DeY = (rcPanelExt.bottom - rcPanelExt.top) - rcPanelInt.bottom;
358 
359  MoveWindow(hCharmapDlg, 0, 0, rcCharmap.right, rcCharmap.bottom, FALSE);
360 #ifndef REMOVE_ADVANCED
361  MoveWindow(hAdvancedDlg, 0, rcCharmap.bottom, rcAdvanced.right, rcAdvanced.bottom, FALSE);
362  ShowWindow(hAdvancedDlg, (Settings.IsAdvancedView) ? SW_SHOW : SW_HIDE);
363 #endif
364  xPos = rcPanelExt.left;
365  yPos = rcPanelExt.top;
366 
367  Width = DeX + rcCharmap.right;
368  Height = DeY + rcCharmap.bottom + rcStatus.bottom;
369 #ifndef REMOVE_ADVANCED
370  if (Settings.IsAdvancedView)
371  Height += rcAdvanced.bottom;
372 #else
373  /* The lack of advanced button leaves an empty gap at the bottom of the window.
374  Shrink the window height a bit here to accomodate for that lost control. */
375  Height = rcCharmap.bottom + rcCopy.bottom + 10;
376 #endif
377  // FIXME: This fails on multi monitor setups
378  if ((xPos + Width) > DeskTopWidth)
379  xPos = DeskTopWidth - Width;
380 
381  if ((yPos + Height) > DeskTopHeight)
382  yPos = DeskTopHeight - Height;
383 
385  xPos, yPos,
386  Width, Height,
387  TRUE);
388 }
389 
390 static
391 INT_PTR
392 CALLBACK
394  UINT Message,
395  WPARAM wParam,
396  LPARAM lParam)
397 {
398  switch(Message)
399  {
400  case WM_INITDIALOG:
401  {
402  DWORD evMask;
403 #ifdef REMOVE_ADVANCED
404  HWND hAdv;
405 #endif
406 
408  IDC_FONTCOMBO));
409 
410  ChangeMapFont(hDlg);
411 
412  // Configure Richedit control for sending notification changes.
413  evMask = SendDlgItemMessage(hDlg, IDC_TEXTBOX, EM_GETEVENTMASK, 0, 0);
414  evMask |= ENM_CHANGE;
416 #ifdef REMOVE_ADVANCED
417  hAdv = GetDlgItem(hDlg, IDC_CHECK_ADVANCED);
418  ShowWindow(hAdv, SW_HIDE);
419 #endif
420  return TRUE;
421  }
422 
423  case WM_COMMAND:
424  {
425  switch(LOWORD(wParam))
426  {
427  case IDC_FONTMAP:
428  switch (HIWORD(wParam))
429  {
430  case FM_SETCHAR:
432  break;
433  }
434  break;
435 
436  case IDC_FONTCOMBO:
437  if (HIWORD(wParam) == CBN_SELCHANGE)
438  {
439  ChangeMapFont(hDlg);
440  }
441  break;
442 
443  case IDC_SELECT:
444  AddCharToSelection(hDlg, 0);
445  break;
446 
447  case IDC_TEXTBOX:
448  switch (HIWORD(wParam)) {
449  case EN_CHANGE:
450  if (GetWindowTextLength(GetDlgItem(hDlg, IDC_TEXTBOX)) == 0)
452  else
454  break;
455  }
456  break;
457 
458  case IDC_COPY:
459  CopyCharacters(hDlg);
460  break;
461 #ifndef REMOVE_ADVANCED
462  case IDC_CHECK_ADVANCED:
463  UpdateSettings(hDlg);
464  ChangeView(GetParent(hDlg));
465  break;
466 #endif
467  }
468  }
469  break;
470 
471  default:
472  break;
473  }
474 
475  return FALSE;
476 }
477 #ifndef REMOVE_ADVANCED
478 static
479 INT_PTR
480 CALLBACK
482  UINT Message,
483  WPARAM wParam,
484  LPARAM lParam)
485 {
486  switch(Message)
487  {
488  case WM_INITDIALOG:
489  return TRUE;
490 
491  case WM_COMMAND:
492  {
493  switch (LOWORD(wParam))
494  {
495  case IDC_COMBO_CHARSET:
496  if (HIWORD(wParam) == CBN_SELCHANGE)
497  {
499  CB_GETCURSEL,
500  0, 0);
503  idx, 0);
504 
506  }
507  break;
508  }
509  }
510 
511  default:
512  return FALSE;
513  }
514 
515  return FALSE;
516 }
517 #endif
518 
519 static int
521 {
522  HMENU hSysMenu;
523  WCHAR lpAboutText[256];
524 
527  hWnd,
529 
530  // For now, the Help push button is disabled because of lacking of HTML Help support
532 
533 #ifndef REMOVE_ADVANCED
536  hWnd,
538 
540 
544 #endif
546  NULL,
548  0, 0, 0, 0,
549  hWnd,
551  hInstance,
552  NULL);
553 
554  // Set the status bar for multiple parts output
556 
557  ChangeView(hWnd);
558 
559  hSysMenu = GetSystemMenu(hWnd, FALSE);
560 
561  if (hSysMenu != NULL)
562  {
563  if (LoadStringW(hInstance, IDS_ABOUT, lpAboutText, SIZEOF(lpAboutText)))
564  {
565  AppendMenuW(hSysMenu, MF_SEPARATOR, 0, NULL);
566  AppendMenuW(hSysMenu, MF_STRING, ID_ABOUT, lpAboutText);
567  }
568  }
569 
570  return 0;
571 }
572 
573 static LRESULT CALLBACK
575 {
576  switch (msg) {
577  case WM_CREATE:
578  return PanelOnCreate(hWnd, wParam, lParam);
579 
580  case WM_CLOSE:
582  return 0;
583 
584  case WM_SIZE:
586  break;
587 
588  case WM_DESTROY:
589  SaveSettings();
590  PostQuitMessage(0);
591  return 0;
592 
593  case WM_SYSCOMMAND:
594  switch(wParam) {
595  case ID_ABOUT:
597  break;
598  }
599  break;
600 
601  }
602 
603  return DefWindowProc(hWnd, msg, wParam, lParam);
604 }
605 
606 static HWND
608 {
609  WCHAR szClass[] = L"CharMap";
610  WCHAR szTitle[256];
611  WNDCLASSEXW wc;
612  HWND hWnd;
613 
615 
618  IMAGE_ICON,
619  16,
620  16,
621  0);
622 
625  IMAGE_ICON,
626  32,
627  32,
628  0);
629 
630  // Create workspace
631  ZeroMemory(&wc, sizeof(wc));
632 
633  wc.cbSize = sizeof(wc);
635  wc.hInstance = hInst;
636  wc.hIcon = hBgIcon;
639  wc.lpszMenuName = NULL;
640  wc.lpszClassName = szClass;
641  wc.hIconSm = hSmIcon;
642 
643  RegisterClassExW(&wc);
644 
646  szClass,
647  szTitle,
653  NULL,
654  NULL,
655  hInst,
656  NULL);
657 
658  if (hWnd != NULL)
659  {
660  LoadSettings();
663  }
664 
665  return hWnd;
666 }
667 
668 INT
669 WINAPI
671  HINSTANCE hPrev,
672  LPWSTR Cmd,
673  int iCmd)
674 {
676  INT Ret = 1;
677  HMODULE hRichEd20;
678  MSG Msg;
679 
680  hInstance = hInst;
681 
682  /* Mirroring code for the titlebar */
683  switch (GetUserDefaultUILanguage())
684  {
687  break;
688 
689  default:
690  break;
691  }
692 
693  iccx.dwSize = sizeof(INITCOMMONCONTROLSEX);
694  iccx.dwICC = ICC_TAB_CLASSES;
695  InitCommonControlsEx(&iccx);
696 
698  {
699  hRichEd20 = LoadLibraryW(L"RICHED20.DLL");
700 
701  if (hRichEd20 != NULL)
702  {
704 
705  for (;;)
706  {
707  if (GetMessage(&Msg, NULL, 0, 0) <= 0)
708  {
709  Ret = Msg.wParam;
710  break;
711  }
712 
715  }
716 
717  FreeLibrary(hRichEd20);
718  }
720  }
721 
722  return Ret;
723 }
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 CB_SETITEMDATA
Definition: winuser.h:1948
#define IDI_ICON
Definition: resource.h:5
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define DispatchMessage
Definition: winuser.h:5740
LANGID WINAPI GetUserDefaultUILanguage(void)
Definition: lang.c:806
BOOL WINAPI TranslateMessage(_In_ const MSG *)
static INT_PTR CALLBACK CharMapDlgProc(HWND hDlg, UINT Message, WPARAM wParam, LPARAM lParam)
Definition: charmap.c:393
static HICON
Definition: imagelist.c:84
#define IDS_UNICODE
Definition: resource.h:31
#define MAKEWPARAM(l, h)
Definition: winuser.h:3984
BYTE lfPitchAndFamily
Definition: dimm.idl:71
#define IMAGE_ICON
Definition: winuser.h:212
#define LAYOUT_RTL
Definition: wingdi.h:1370
VOID ShowAboutDlg(HWND hWndParent)
Definition: about.c:77
#define WM_CHAR
Definition: winuser.h:1699
#define CreateWindow
Definition: winuser.h:5729
#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
WCHAR CodePageName[MAX_PATH]
Definition: winnls.h:596
#define NULL_BRUSH
Definition: wingdi.h:900
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
static VOID FillGroupByComboList(HWND hwndCombo)
Definition: charmap.c:65
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:1499
#define ZeroMemory
Definition: winbase.h:1648
HICON hIcon
Definition: winuser.h:3197
UINT_PTR WPARAM
Definition: windef.h:207
static void ChangeView(HWND hWnd)
Definition: charmap.c:323
#define WS_CHILD
Definition: pedump.c:617
#define SendDlgItemMessage
Definition: winuser.h:5817
LONG left
Definition: windef.h:306
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
int32_t INT_PTR
Definition: typedefs.h:64
#define GetTextMetrics
Definition: wingdi.h:4473
#define DEFAULT_CHARSET
Definition: wingdi.h:383
LONG right
Definition: windef.h:308
#define STATUSCLASSNAME
Definition: commctrl.h:1935
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:4291
struct tagINITCOMMONCONTROLSEX INITCOMMONCONTROLSEX
int32_t INT
Definition: typedefs.h:58
#define LANG_HEBREW
Definition: nls.h:67
#define CB_GETCURSEL
Definition: winuser.h:1925
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:607
BOOL WINAPI AppendMenuW(_In_ HMENU, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)
#define EM_GETSEL
Definition: winuser.h:1979
#define IDS_ABOUT
Definition: resource.h:29
static VOID FillFontStyleComboList(HWND hwndCombo)
Definition: charmap.c:126
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:20
BYTE tmCharSet
Definition: wingdi.h:2379
LPCWSTR lpszMenuName
Definition: winuser.h:3200
struct @1620 Msg[]
#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:1844
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:443
#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:741
static void CopyCharacters(HWND hDlg)
Definition: charmap.c:203
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:1954
#define CB_ADDSTRING
Definition: winuser.h:1918
HMENU WINAPI GetSystemMenu(_In_ HWND, _In_ BOOL)
#define LoadLibraryW(x)
Definition: compat.h:606
#define MF_SEPARATOR
Definition: winuser.h:137
LONG_PTR LPARAM
Definition: windef.h:208
#define BM_GETCHECK
Definition: winuser.h:1900
static void UpdateSettings(HWND hDlg)
Definition: charmap.c:295
#define ID_ABOUT
Definition: charmap.c:18
#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:2410
LPCWSTR lpszClassName
Definition: winuser.h:3201
#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: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:574
static int CALLBACK EnumFontNames(ENUMLOGFONTEXW *lpelfe, NEWTEXTMETRICEXW *lpntme, DWORD FontType, LPARAM lParam)
Definition: charmap.c:81
#define FreeLibrary(x)
Definition: compat.h:607
#define IDS_TITLE
Definition: resource.h:30
#define GetProcessHeap()
Definition: compat.h:595
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:1593
HBRUSH hbrBackground
Definition: winuser.h:3199
UINT cbSize
Definition: winuser.h:3191
#define WM_CLOSE
Definition: winuser.h:1603
HICON hBgIcon
Definition: charmap.c:25
#define MAX_PATH
Definition: compat.h:34
int WINAPI GetWindowTextLengthW(_In_ HWND)
#define WINAPI
Definition: msvc.h:6
#define EM_SETSEL
Definition: winuser.h:2000
static VOID FillCharacterSetComboList(HWND hwndCombo)
Definition: charmap.c:30
#define OUT_STROKE_PRECIS
Definition: wingdi.h:417
#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:4467
SETTINGS Settings
Definition: charmap.c:26
TCHAR szTitle[MAX_LOADSTRING]
Definition: magnifier.c:35
HINSTANCE hInstance
Definition: winuser.h:3196
#define DEFAULT_GUI_FONT
Definition: wingdi.h:908
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:520
static const WCHAR L[]
Definition: oid.c:1250
#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:277
#define SB_SETTEXT
Definition: commctrl.h:1945
HCURSOR hCursor
Definition: winuser.h:3198
#define CB_SETCURSEL
Definition: winuser.h:1943
#define WM_COMMAND
Definition: winuser.h:1722
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:5787
WNDPROC lpfnWndProc
Definition: winuser.h:3193
#define IDC_FONTCOMBO
Definition: resource.h:12
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
BOOL RegisterMapClasses(HINSTANCE hInstance)
Definition: map.c:715
VOID ChangeMapFont(HWND hDlg)
Definition: charmap.c:162
#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:481
#define EM_GETCHARFORMAT
Definition: richedit.h:91
FARPROC FONTENUMPROCW
Definition: wingdi.h:2896
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:5765
#define CBN_SELCHANGE
Definition: winuser.h:1961
HWND hCharmapDlg
Definition: charmap.c:22
#define WM_SETFONT
Definition: winuser.h:1632
HICON hIconSm
Definition: winuser.h:3202
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:311
#define SendMessage
Definition: winuser.h:5818
#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:2701
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:5774
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:1969
LONG bottom
Definition: windef.h:309
static BYTE GetFontMetrics(HWND hWnd, HFONT hFont)
Definition: charmap.c:233
#define SM_CXFULLSCREEN
Definition: winuser.h:967
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define LoadImage
Definition: winuser.h:5790
static const UINT codePages[]
Definition: precomp.h:29
INT WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrev, LPWSTR Cmd, int iCmd)
Definition: charmap.c:670
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:1723
#define WM_INITDIALOG
Definition: winuser.h:1721
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:594
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
static VOID AddCharToSelection(HWND hDlg, WCHAR ch)
Definition: charmap.c:251
#define CreateDialog
Definition: winuser.h:5724
#define IDC_FONTMAP
Definition: resource.h:14
#define ICC_TAB_CLASSES
Definition: commctrl.h:61
#define EN_CHANGE
Definition: winuser.h:2004
#define CB_FINDSTRINGEXACT
Definition: winuser.h:1922