Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

144 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 1991-1997, Microsoft Corporation All rights reserved.
  3. Module Name:
  4. charmap.h
  5. Abstract:
  6. This module contains the header information for the Charmap utility.
  7. Revision History:
  8. --*/
  9. //
  10. // Include Files.
  11. //
  12. #include "cmdlg.h"
  13. //
  14. // Constant Declarations.
  15. //
  16. #define BTOC(bytes) ((bytes) / sizeof(TCHAR))
  17. #define CTOB(cch) ((cch) * sizeof(TCHAR))
  18. #define cchFullMap (256)
  19. #define CCH_KEYNAME 50 // number of chars in keyname
  20. #define LF_SUBSETSIZE 128
  21. //
  22. // Typedef Declarations.
  23. //
  24. #ifdef UNICODE
  25. typedef unsigned short UTCHAR;
  26. #else
  27. typedef unsigned char UTCHAR;
  28. #endif
  29. #define UCHAR unsigned char
  30. typedef struct tagSYCM
  31. {
  32. INT dxpBox;
  33. INT dypBox;
  34. INT dxpCM;
  35. INT dypCM;
  36. INT xpCh;
  37. INT ypCh;
  38. INT dxpMag;
  39. INT dypMag;
  40. INT xpMagCurr;
  41. INT ypMagCurr;
  42. INT ypDest;
  43. INT xpCM;
  44. INT ypCM;
  45. BOOL fHasFocus;
  46. BOOL fFocusState;
  47. BOOL fMouseDn;
  48. BOOL fCursorOff;
  49. BOOL fAnsiFont;
  50. UTCHAR chCurr;
  51. HFONT hFontMag;
  52. HFONT hFont;
  53. HDC hdcMag;
  54. HBITMAP hbmMag;
  55. INT rgdxp[256];
  56. } SYCM, *PSYCM;
  57. typedef struct tagITEMDATA
  58. {
  59. SHORT FontType;
  60. BYTE CharSet;
  61. BYTE PitchAndFamily;
  62. } ITEMDATA;
  63. typedef struct tagUSUBSET
  64. {
  65. INT BeginRange;
  66. INT EndRange;
  67. INT StringResId;
  68. TCHAR Name[LF_SUBSETSIZE];
  69. } USUBSET;
  70. //
  71. // Function Declarations.
  72. //
  73. BOOL InitApplication(HANDLE);
  74. BOOL InitInstance(HANDLE, INT);
  75. INT_PTR APIENTRY CharMapDlgProc(HWND, UINT, WPARAM, LPARAM);
  76. LRESULT APIENTRY CharGridWndProc(HWND, UINT, WPARAM, LPARAM);
  77. INT ChFromSymLParam(PSYCM, LONG);
  78. VOID DrawSymChOutlineHwnd(PSYCM, HWND, UTCHAR, BOOL, BOOL);
  79. VOID RecalcCharMap(HWND, PSYCM, INT, BOOL);
  80. VOID DrawSymbolMap(PSYCM, HDC);
  81. VOID DrawSymbolGrid(PSYCM, HDC);
  82. VOID DrawSymbolChars(PSYCM, HDC);
  83. VOID DrawSymChOutline(PSYCM, HDC, UTCHAR, BOOL, BOOL);
  84. VOID MoveSymbolSel(PSYCM, UTCHAR);
  85. VOID RestoreSymMag(PSYCM);
  86. INT APIENTRY FontLoadProc(LPLOGFONT, NEWTEXTMETRICEX*, DWORD, LPARAM);
  87. HANDLE GetEditText(HWND);
  88. VOID CopyString(HWND);
  89. VOID SendRTFToClip(HWND, LPTSTR);
  90. INT PointsToHeight(INT);
  91. VOID UpdateKeystrokeText(HDC hdc, BOOL fANSI, UTCHAR chNew, BOOL fRedraw);
  92. VOID PaintStatusLine(HDC, BOOL, BOOL);
  93. BOOL UpdateHelpText(LPMSG, HWND);
  94. INT KeyboardVKeyFromChar(UTCHAR);
  95. BOOL DrawFamilyComboItem(LPDRAWITEMSTRUCT);
  96. HBITMAP LoadBitmaps(INT);
  97. VOID DoHelp(HWND, BOOL);
  98. VOID SaveCurrentFont(HWND);
  99. INT SelectInitialFont(HWND);
  100. VOID ExitMagnify(HWND, PSYCM);
  101. INT SelectInitialSubset(HWND);
  102. VOID SaveCurrentSubset(HWND);
  103. BOOL CALLBACK SubSetDlgProc(HWND, UINT, WPARAM, LPARAM);
  104. VOID UpdateSymbolSelection(HWND, INT, INT);
  105. VOID UpdateSymbolRange(HWND hwnd, INT FirstChar, INT LastChar);
  106. VOID SubSetChanged(HWND hwnd, INT iSubSet, INT ichFirst, INT ichLast);
  107. VOID ProcessScrollMsg(HWND hwnd, int nCode, int nPos);
  108. INT ScrollMapPage(HWND hwndDlg, BOOL fUp, BOOL fRePaint);
  109. BOOL ScrollMap(HWND hwndDlg, INT cchScroll, BOOL fRePaint);
  110. void SetEditCtlFont(HWND hwndDlg, int idCtl, HFONT hfont);