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.

192 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 1990-1995 Microsoft Corporation
  3. Module Name:
  4. proppage.h
  5. Abstract:
  6. This module contains all definition for the proppage.c
  7. Author:
  8. 03-Sep-1995 Sun 06:31:29 created -by- Daniel Chou (danielc)
  9. [Environment:]
  10. NT Windows - Common Printer Driver UI DLL
  11. [Notes:]
  12. Revision History:
  13. --*/
  14. typedef struct _MYBMP {
  15. LPBITMAPINFOHEADER lpbmi;
  16. LPBYTE lpBits;
  17. HANDLE hBitmap;
  18. } MYBMP;
  19. typedef struct _DUPLEXID {
  20. BYTE SimplexIdx;
  21. BYTE LongSideIdx;
  22. BYTE ShortSideIdx;
  23. BYTE Reserved[1];
  24. } DUPLEXID;
  25. typedef struct _ORIENTID {
  26. BYTE PortraitIdx;
  27. BYTE LandscapeIdx;
  28. BYTE RotateIdx;
  29. } ORIENTID;
  30. typedef struct _DUPLEX{
  31. WORD Start;
  32. WORD End;
  33. } DUPLEX;
  34. typedef struct _LAYOUTBMP {
  35. MYBMP Portrait;
  36. MYBMP BookletL;
  37. MYBMP BookletP;
  38. MYBMP ArrowL;
  39. MYBMP ArrowS;
  40. HANDLE hWnd;
  41. DUPLEXID Duplex;
  42. ORIENTID Orientation;
  43. BYTE OrientIdx;
  44. BYTE DuplexIdx;
  45. BYTE NupIdx;
  46. BYTE Reserved;
  47. } LAYOUTBMP, *PLAYOUTBMP;
  48. #define ORIENT_PORTRAIT 0
  49. #define ORIENT_LANDSCAPE 1
  50. #define ORIENT_ROTATED 2
  51. #define DUPLEX_LONGSIDE 0
  52. #define DUPLEX_SHORTSIDE 1
  53. #define DUPLEX_SIMPLEX 2
  54. #define NUP_ONEUP 0
  55. #define NUP_TWOUP 1
  56. #define NUP_FOURUP 2
  57. #define NUP_SIXUP 3
  58. #define NUP_NINEUP 4
  59. #define NUP_SIXTEENUP 5
  60. #define NUP_BOOKLET 6
  61. #define MAX_DUPLEX_OPTION 3
  62. #define MAX_BORDER 2
  63. #define FRAME_BORDER 1
  64. #define SHADOW_SIZE 5
  65. typedef struct _PAGEBORDER {
  66. INT left;
  67. INT top;
  68. INT right;
  69. INT bottom;
  70. } PAGEBORDER;
  71. #define ADDOFFSET(size, div) (div > 0 ? size/div : 0)
  72. typedef struct _NUP {
  73. INT row;
  74. INT columm;
  75. } NUP;
  76. VOID
  77. UpdateData(
  78. PLAYOUTBMP pData,
  79. PTVWND pTVWnd
  80. );
  81. VOID
  82. InitData(
  83. PLAYOUTBMP pData,
  84. PTVWND pTVWnd
  85. );
  86. VOID
  87. InvalidateBMP(
  88. HWND hDlg,
  89. PTVWND pTVWnd
  90. );
  91. VOID
  92. DrawBorder(
  93. HDC hDC,
  94. BOOL bDrawShadow,
  95. BOOL bDrawBorder,
  96. PRECT pRectIn,
  97. PRECT pRectOut,
  98. PAGEBORDER * pPageBorder
  99. );
  100. BOOL
  101. LoadLayoutBmp(
  102. HWND hDlg,
  103. MYBMP * pMyBmpData,
  104. DWORD dwBitmapID
  105. );
  106. PLAYOUTBMP
  107. InitLayoutBmp(
  108. HWND hDlg,
  109. HANDLE hBitmap,
  110. PTVWND pTVWnd
  111. );
  112. VOID
  113. FreeLayoutBmp(
  114. PLAYOUTBMP pData
  115. );
  116. VOID
  117. UpdateLayoutBmp(
  118. HDC hDC,
  119. PLAYOUTBMP pData
  120. );
  121. LONG
  122. UpdatePropPageItem(
  123. HWND hDlg,
  124. PTVWND pTVWnd,
  125. POPTITEM pItem,
  126. BOOL DoInit
  127. );
  128. LONG
  129. UpdatePropPage(
  130. HWND hDlg,
  131. PMYDLGPAGE pMyDP
  132. );
  133. LONG
  134. CountPropPageItems(
  135. PTVWND pTVWnd,
  136. BYTE CurPageIdx
  137. );
  138. INT_PTR
  139. CALLBACK
  140. PropPageProc(
  141. HWND hDlg,
  142. UINT Msg,
  143. WPARAM wParam,
  144. LPARAM lParam
  145. );