Source code of Windows XP (NT5)
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.

95 lines
2.2 KiB

  1. #include "cmdlg.h"
  2. /* Type definitions. */
  3. #ifdef UNICODE
  4. typedef unsigned short UTCHAR;
  5. #else
  6. typedef unsigned char UTCHAR;
  7. #endif
  8. #define BTOC(bytes) ((bytes) / sizeof(TCHAR))
  9. #define CTOB(cch) ((cch) * sizeof(TCHAR))
  10. #define UCHAR unsigned char
  11. typedef struct tagSYCM
  12. {
  13. INT dxpBox;
  14. INT dypBox;
  15. INT dxpCM;
  16. INT dypCM;
  17. INT xpCh;
  18. INT ypCh;
  19. INT dxpMag;
  20. INT dypMag;
  21. INT xpMagCurr;
  22. INT ypMagCurr;
  23. INT ypDest;
  24. INT xpCM;
  25. INT ypCM;
  26. BOOL fHasFocus;
  27. BOOL fFocusState;
  28. BOOL fMouseDn;
  29. BOOL fCursorOff;
  30. BOOL fAnsiFont;
  31. UTCHAR chCurr;
  32. HFONT hFontMag;
  33. HFONT hFont;
  34. HDC hdcMag;
  35. HBITMAP hbmMag;
  36. INT rgdxp[255];
  37. } SYCM;
  38. typedef SYCM *PSYCM;
  39. typedef struct tagITEMDATA
  40. {
  41. SHORT FontType;
  42. BYTE CharSet;
  43. BYTE PitchAndFamily;
  44. } ITEMDATA;
  45. #define LF_SUBSETSIZE 40
  46. typedef struct tagUSUBSET
  47. {
  48. INT BeginRange;
  49. INT EndRange;
  50. INT StringResId;
  51. TCHAR Name[LF_SUBSETSIZE];
  52. } USUBSET;
  53. /* Function declarations. */
  54. BOOL InitApplication(HANDLE);
  55. BOOL InitInstance(HANDLE, INT);
  56. INT_PTR APIENTRY CharMapDlgProc(HWND, UINT, WPARAM, LPARAM);
  57. LRESULT APIENTRY CharGridWndProc(HWND, UINT, WPARAM, LPARAM);
  58. INT ChFromSymLParam(PSYCM, LPARAM);
  59. VOID DrawSymChOutlineHwnd(PSYCM, HWND, UTCHAR, BOOL, BOOL);
  60. VOID RecalcCharMap(HWND, PSYCM, INT, BOOL);
  61. VOID DrawSymbolMap(PSYCM, HDC);
  62. VOID DrawSymbolGrid(PSYCM, HDC);
  63. VOID DrawSymbolChars(PSYCM, HDC);
  64. VOID DrawSymChOutline(PSYCM, HDC, UTCHAR, BOOL, BOOL);
  65. VOID MoveSymbolSel(PSYCM, UTCHAR);
  66. VOID RestoreSymMag(PSYCM);
  67. INT APIENTRY FontLoadProc(LPLOGFONT, NEWTEXTMETRICEX*, DWORD, LPARAM);
  68. HANDLE GetEditText(HWND);
  69. VOID CopyString(HWND);
  70. VOID SendRTFToClip(HWND, LPTSTR);
  71. INT PointsToHeight(INT);
  72. VOID UpdateKeystrokeText(HDC, UTCHAR, BOOL);
  73. VOID PaintStatusLine(HDC, BOOL, BOOL);
  74. BOOL UpdateHelpText(LPMSG, HWND);
  75. INT KeyboardVKeyFromChar(UTCHAR);
  76. BOOL DrawFamilyComboItem(LPDRAWITEMSTRUCT);
  77. HBITMAP LoadBitmaps(INT);
  78. VOID DoHelp(HWND, BOOL);
  79. VOID SaveCurrentFont(HWND);
  80. INT SelectInitialFont(HWND);
  81. VOID ExitMagnify(HWND, PSYCM);
  82. INT SelectInitialSubset(HWND);
  83. VOID SaveCurrentSubset(HWND);
  84. BOOL CALLBACK SubSetDlgProc(HWND, UINT, WPARAM, LPARAM);
  85. VOID UpdateSymbolSelection(HWND, INT, INT);