prnsetup.h
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 16k
Category:

Windows Kernel

Development Platform:

Visual C++

  1. /*++
  2. Copyright (c) 1990-1998,  Microsoft Corporation  All rights reserved.
  3. Module Name:
  4.     prnsetup.h
  5. Abstract:
  6.     This module contains the header information for the Win32 print dialogs.
  7. Revision History:
  8. --*/
  9. //
  10. //  Include Files.
  11. //
  12. #include <help.h>
  13. //
  14. //  Constant Declarations.
  15. //
  16. #ifndef WINNT
  17.   #define COMDLG_ANSI     0x0
  18.   #define COMDLG_WIDE     0x1
  19. #endif
  20. #define PI_PRINTERS_ENUMERATED    0x00000001
  21. #define PI_COLLATE_REQUESTED      0x00000002
  22. #define PI_WPAPER_ENVELOPE        0x00000004     // wPaper is DMPAPER_ENV_x
  23. #define PI_PRINTDLGX_RECURSE      0x00000008     // PrintDlgX calls PrintDlgX
  24. #define PRNPROP (LPCTSTR)         0xA000L
  25. #define DN_PADDINGCHARS           16             // extra devnames padding
  26. #define MMS_PER_INCH              254            // 25.4 mms/inch
  27. #define INCHES_DEFAULT            1000
  28. #define MMS_DEFAULT               2500
  29. #define COPIES_EDIT_SIZE          4
  30. #define PAGE_EDIT_SIZE            5
  31. #define MARGIN_EDIT_SIZE          6
  32. #define CCHPAPERNAME              64
  33. #define CCHBINNAME                24
  34. #define ROTATE_LEFT               270            // dot-matrix
  35. #define ROTATE_RIGHT              90             // HP PCL
  36. #define MAX_DEV_SECT              512
  37. #define BACKSPACE                 0x08
  38. #define CTRL_X_CUT                0x18
  39. #define CTRL_C_COPY               0x03
  40. #define CTRL_V_PASTE              0x16
  41. #define SIZEOF_DEVICE_INFO        32
  42. #define MAX_PRINTERNAME           (MAX_PATH * 2)
  43. #define SCRATCHBUF_SIZE           256
  44. #define MIN_DEVMODE_SIZEA         40             // from spoolerincsplcom.h
  45. //
  46. //  Constant Declarations for DLG file.
  47. //
  48. #define ID_BOTH_P_PROPERTIES      psh2
  49. #define ID_BOTH_P_NETWORK         psh14
  50. #define ID_BOTH_P_HELP            pshHelp
  51. #define ID_BOTH_S_PRINTER         stc6
  52. #define ID_BOTH_S_STATUS          stc12
  53. #define ID_BOTH_S_TYPE            stc11
  54. #define ID_BOTH_S_WHERE           stc14
  55. #define ID_BOTH_S_COMMENT         stc13
  56. #define ID_PRINT_X_TOFILE         chx1
  57. #define ID_PRINT_X_COLLATE        chx2
  58. #define ID_PRINT_C_QUALITY        cmb1
  59. #define ID_PRINT_C_NAME           cmb4
  60. #define ID_PRINT_E_FROM           edt1
  61. #define ID_PRINT_E_TO             edt2
  62. #define ID_PRINT_E_COPIES         edt3
  63. #define ID_PRINT_G_RANGE          grp1
  64. #define ID_PRINT_G_COPIES         grp2
  65. #define ID_PRINT_G_PRINTER        grp4
  66. #define ID_PRINT_I_COLLATE        ico3
  67. #define ID_PRINT_P_SETUP          psh1
  68. #define ID_PRINT_R_ALL            rad1
  69. #define ID_PRINT_R_SELECTION      rad2
  70. #define ID_PRINT_R_PAGES          rad3
  71. #define ID_PRINT_S_DEFAULT        stc1
  72. #define ID_PRINT_S_FROM           stc2
  73. #define ID_PRINT_S_TO             stc3
  74. #define ID_PRINT_S_QUALITY        stc4
  75. #define ID_PRINT_S_COPIES         stc5
  76. #define ID_SETUP_C_NAME           cmb1
  77. #define ID_SETUP_C_SIZE           cmb2
  78. #define ID_SETUP_C_SOURCE         cmb3
  79. #define ID_SETUP_E_LEFT           edt4
  80. #define ID_SETUP_E_TOP            edt5
  81. #define ID_SETUP_E_RIGHT          edt6
  82. #define ID_SETUP_E_BOTTOM         edt7
  83. #define ID_SETUP_G_ORIENTATION    grp1
  84. #define ID_SETUP_G_PAPER          grp2
  85. #define ID_SETUP_G_DUPLEX         grp3
  86. #define ID_SETUP_G_MARGINS        grp4
  87. #define ID_SETUP_I_ORIENTATION    ico1
  88. #define ID_SETUP_I_DUPLEX         ico2
  89. #define ID_SETUP_P_MORE           psh1
  90. #define ID_SETUP_P_PRINTER        psh3
  91. #define ID_SETUP_R_PORTRAIT       rad1
  92. #define ID_SETUP_R_LANDSCAPE      rad2
  93. #define ID_SETUP_R_DEFAULT        rad3
  94. #define ID_SETUP_R_SPECIFIC       rad4
  95. #define ID_SETUP_R_NONE           rad5
  96. #define ID_SETUP_R_LONG           rad6
  97. #define ID_SETUP_R_SHORT          rad7
  98. #define ID_SETUP_S_DEFAULT        stc1
  99. #define ID_SETUP_S_SIZE           stc2
  100. #define ID_SETUP_S_SOURCE         stc3
  101. #define ID_SETUP_S_LEFT           stc15
  102. #define ID_SETUP_S_RIGHT          stc16
  103. #define ID_SETUP_S_TOP            stc17
  104. #define ID_SETUP_S_BOTTOM         stc18
  105. #define ID_SETUP_W_SAMPLE         rct1
  106. #define ID_SETUP_W_SHADOWRIGHT    rct2
  107. #define ID_SETUP_W_SHADOWBOTTOM   rct3
  108. //
  109. //  Typedef Declarations.
  110. //
  111. typedef struct {
  112.     UINT            ApiType;
  113.     LPPRINTDLG      pPD;
  114.     LPPAGESETUPDLG  pPSD;
  115.     DWORD           cPrinters;
  116.     PPRINTER_INFO_2 pPrinters;
  117.     PPRINTER_INFO_2 pCurPrinter;
  118.     HANDLE          hCurPrinter;
  119.     DWORD           Status;
  120.     TCHAR           szDefaultPrinter[MAX_PRINTERNAME];
  121.     WORD            wPaper;
  122.     DWORD           dwRotation;
  123.     UINT            uiOrientationID;
  124.     POINT           PtPaperSizeMMs;
  125.     RECT            RtMinMarginMMs;
  126.     RECT            RtMarginMMs;
  127.     POINT           PtMargins;
  128.     RECT            RtSampleXYWH;
  129.     BOOL            bKillFocus;
  130.     DWORD           ProcessVersion;
  131. #ifdef UNICODE
  132.     LPPRINTDLGA     pPDA;
  133.     LPBOOL          pAllocInfo;
  134.     BOOL            bUseExtDeviceMode;
  135.     BOOL            fPrintTemplateAlloc;
  136.     BOOL            fSetupTemplateAlloc;
  137.     UINT            NestCtr;
  138. #endif
  139. } PRINTINFO, *PPRINTINFO;
  140. //
  141. //  Global Variables.
  142. //
  143. #ifndef WINNT
  144.   UINT msgHELPA;
  145. #endif
  146. #ifndef WINNT
  147.   typedef DWORD (WINAPI *LPFNWNETCONNECTIONDIALOG)(HWND, DWORD);
  148.   LPFNWNETCONNECTIONDIALOG MPR_WNetConnectionDialog = NULL;
  149.   CHAR szWNetConnectionDialog[] = "WNetConnectionDialog";
  150. #endif
  151. static TCHAR  szTextWindows[]     = TEXT("Windows");
  152. static TCHAR  szTextDevices[]     = TEXT("devices");
  153. static TCHAR  szTextDevice[]      = TEXT("device");
  154. static TCHAR  szTextNull[]        = TEXT("");
  155. static TCHAR  szFilePort[]        = TEXT("FILE:");
  156. static TCHAR  szDriver[]          = TEXT("winspool");
  157. #ifndef WINNT
  158.   static TCHAR  szCommdlgHelp[]   = HELPMSGSTRING;
  159. #endif
  160. LPPRINTHOOKPROC glpfnPrintHook = NULL;
  161. LPSETUPHOOKPROC glpfnSetupHook = NULL;
  162. #ifdef WINNT
  163.   WNDPROC lpEditNumOnlyProc = NULL;
  164. #endif
  165. WNDPROC lpEditMarginProc = NULL;
  166. WNDPROC lpStaticProc = NULL;
  167. HKEY hPrinterKey;
  168. TCHAR *szRegistryPrinter = TEXT("Printers");
  169. TCHAR *szRegistryDefaultValueName = TEXT("Default");
  170. #ifndef WINNT
  171.   HANDLE hMPR = NULL;
  172.   TCHAR szMprDll[] = TEXT("mpr.dll");
  173. #endif
  174. static BOOL   bAllIconsLoaded = FALSE;         // if all icons/images loaded
  175. static HANDLE hIconCollate = NULL;             // Image
  176. static HANDLE hIconNoCollate = NULL;           // Image
  177. static HICON  hIconPortrait = NULL;            // Icon
  178. static HICON  hIconLandscape = NULL;           // Icon
  179. static HICON  hIconPDuplexNone = NULL;         // Icon
  180. static HICON  hIconLDuplexNone = NULL;         // Icon
  181. static HICON  hIconPDuplexTumble = NULL;       // Icon
  182. static HICON  hIconLDuplexTumble = NULL;       // Icon
  183. static HICON  hIconPDuplexNoTumble = NULL;     // Icon
  184. static HICON  hIconLDuplexNoTumble = NULL;     // Icon
  185. static HICON  hIconPSStampP = NULL;            // Icon
  186. static HICON  hIconPSStampL = NULL;            // Icon
  187. static TCHAR  cIntlDecimal = CHAR_NULL;        // decimal separator (.)
  188. static TCHAR  cIntlMeasure[5] = TEXT("");      // measurement designator ("/mm)
  189. static int    cchIntlMeasure = 0;              // # of chars in cIntlMeasure
  190. static TCHAR  szDefaultSrc[SCRATCHBUF_SIZE] = TEXT("");
  191. //
  192. //  Context Help IDs.
  193. //
  194. const static DWORD aPrintHelpIDs[] =             // Context Help IDs
  195. {
  196.     // for Print dialog
  197.     grp4,  NO_HELP,
  198.     stc6,  IDH_PRINT_CHOOSE_PRINTER,
  199.     cmb4,  IDH_PRINT_CHOOSE_PRINTER,
  200.     psh2,  IDH_PRINT_PROPERTIES,
  201.     stc8,  IDH_PRINT_SETUP_DETAILS,
  202.     stc12, IDH_PRINT_SETUP_DETAILS,
  203.     stc7,  IDH_PRINT_SETUP_DETAILS,
  204.     stc11, IDH_PRINT_SETUP_DETAILS,
  205.     stc10, IDH_PRINT_SETUP_DETAILS,
  206.     stc14, IDH_PRINT_SETUP_DETAILS,
  207.     stc9,  IDH_PRINT_SETUP_DETAILS,
  208.     stc13, IDH_PRINT_SETUP_DETAILS,
  209.     chx1,  IDH_PRINT_TO_FILE,
  210.     grp1,  NO_HELP,
  211.     ico1,  IDH_PRINT32_RANGE,
  212.     rad1,  IDH_PRINT32_RANGE,
  213.     rad2,  IDH_PRINT32_RANGE,
  214.     rad3,  IDH_PRINT32_RANGE,
  215.     stc2,  IDH_PRINT32_RANGE,
  216.     edt1,  IDH_PRINT32_RANGE,
  217.     stc3,  IDH_PRINT32_RANGE,
  218.     edt2,  IDH_PRINT32_RANGE,
  219.     grp2,  NO_HELP,
  220.     edt3,  IDH_PRINT_COPIES,
  221.     ico3,  IDH_PRINT_COLLATE,
  222.     chx2,  IDH_PRINT_COLLATE,
  223.     // for win3.1 Print template
  224.     stc1,  IDH_PRINT_SETUP_DETAILS,
  225.     stc4,  IDH_PRINT_QUALITY,
  226.     cmb1,  IDH_PRINT_QUALITY,
  227.     stc5,  IDH_PRINT_COPIES,
  228.     psh1,  IDH_PRINT_PRINTER_SETUP,
  229.     psh14, IDH_PRINT_NETWORK,
  230.     pshHelp, IDH_HELP,
  231.     0,     0
  232. };
  233. const static DWORD aPrintSetupHelpIDs[] =        // Context Help IDs
  234. {
  235.     // for PrintSetup dialog
  236.     grp4,  NO_HELP,
  237.     stc6,  IDH_PRINT_CHOOSE_PRINTER,
  238.     cmb1,  IDH_PRINT_CHOOSE_PRINTER,
  239.     psh2,  IDH_PRINT_PROPERTIES,
  240.     stc8,  IDH_PRINT_SETUP_DETAILS,
  241.     stc12, IDH_PRINT_SETUP_DETAILS,
  242.     stc7,  IDH_PRINT_SETUP_DETAILS,
  243.     stc11, IDH_PRINT_SETUP_DETAILS,
  244.     stc10, IDH_PRINT_SETUP_DETAILS,
  245.     stc14, IDH_PRINT_SETUP_DETAILS,
  246.     stc9,  IDH_PRINT_SETUP_DETAILS,
  247.     stc13, IDH_PRINT_SETUP_DETAILS,
  248.     grp2,  NO_HELP,
  249.     stc2,  IDH_PAGE_PAPER_SIZE,
  250.     cmb2,  IDH_PAGE_PAPER_SIZE,
  251.     stc3,  IDH_PAGE_PAPER_SOURCE,
  252.     cmb3,  IDH_PAGE_PAPER_SOURCE,
  253.     grp1,  NO_HELP,
  254.     ico1,  IDH_PRINT_SETUP_ORIENT,
  255.     rad1,  IDH_PRINT_SETUP_ORIENT,
  256.     rad2,  IDH_PRINT_SETUP_ORIENT,
  257.     // for win3.1 PrintSetup template
  258.     grp3,  NO_HELP,
  259.     stc1,  IDH_PRINT_CHOOSE_PRINTER,
  260.     rad3,  IDH_PRINT_CHOOSE_PRINTER,
  261.     rad4,  IDH_PRINT_CHOOSE_PRINTER,
  262.     cmb1,  IDH_PRINT_CHOOSE_PRINTER,
  263.     psh1,  IDH_PRINT_PROPERTIES,
  264.     psh14, IDH_PRINT_NETWORK,
  265.     pshHelp, IDH_HELP,
  266.     // for winNT PrintSetup template
  267.     grp2,  NO_HELP,                              // grp2 used for win31 help
  268.     ico2,  IDH_PRINT_SETUP_DUPLEX,
  269.     rad5,  IDH_PRINT_SETUP_DUPLEX,
  270.     rad6,  IDH_PRINT_SETUP_DUPLEX,
  271.     rad7,  IDH_PRINT_SETUP_DUPLEX,
  272.     0,     0
  273. };
  274. const static DWORD aPageSetupHelpIDs[] =         // Context Help IDs
  275. {
  276.     rct1,  IDH_PAGE_SAMPLE,
  277.     rct2,  IDH_PAGE_SAMPLE,
  278.     rct3,  IDH_PAGE_SAMPLE,
  279.     grp2,  NO_HELP,
  280.     stc2,  IDH_PAGE_PAPER_SIZE,
  281.     cmb2,  IDH_PAGE_PAPER_SIZE,
  282.     stc3,  IDH_PAGE_PAPER_SOURCE,
  283.     cmb3,  IDH_PAGE_PAPER_SOURCE,
  284.     grp1,  NO_HELP,
  285.     rad1,  IDH_PAGE_ORIENTATION,
  286.     rad2,  IDH_PAGE_ORIENTATION,
  287.     grp4,  NO_HELP,
  288.     stc15, IDH_PAGE_MARGINS,
  289.     edt4,  IDH_PAGE_MARGINS,
  290.     stc16, IDH_PAGE_MARGINS,
  291.     edt6,  IDH_PAGE_MARGINS,
  292.     stc17, IDH_PAGE_MARGINS,
  293.     edt5,  IDH_PAGE_MARGINS,
  294.     stc18, IDH_PAGE_MARGINS,
  295.     edt7,  IDH_PAGE_MARGINS,
  296.     psh3,  IDH_PAGE_PRINTER,
  297.     psh14, IDH_PRINT_NETWORK,
  298.     pshHelp, IDH_HELP,
  299.     0, 0
  300. };
  301. //
  302. //  Macro Definitions.
  303. //
  304. #define IS_KEY_PRESSED(key)       ( GetKeyState(key) & 0x8000 )
  305. #define ISDIGIT(c)                ((c) >= TEXT('0') && (c) <= TEXT('9'))
  306. //
  307. //  SetField is used to modify new-for-ver-4.0 DEVMODE fields.
  308. //  We don't have to worry about the GET case, because we always check for
  309. //  the existance-of-field bit before looking at the field.
  310. //
  311. #define SetField(_pdm, _fld, _val)     
  312.         ((_pdm)->dmSpecVersion >= 0x0400 ? (((_pdm)->_fld = (_val)), TRUE) : FALSE)
  313. #ifdef __cplusplus
  314. extern "C" {
  315. #endif
  316. //
  317. //  Function Prototypes.
  318. //
  319. BOOL
  320. PrintDlgX(
  321.     PPRINTINFO pPI);
  322. BOOL
  323. PageSetupDlgX(
  324.     PPRINTINFO pPI);
  325. BOOL
  326. PrintLoadIcons();
  327. int
  328. PrintDisplayPrintDlg(
  329.     PPRINTINFO pPI);
  330. int
  331. PrintDisplaySetupDlg(
  332.     PPRINTINFO pPI);
  333. BOOL_PTR CALLBACK
  334. PrintDlgProc(
  335.     HWND hDlg,
  336.     UINT wMsg,
  337.     WPARAM wParam,
  338.     LPARAM lParam);
  339. BOOL_PTR CALLBACK
  340. PrintSetupDlgProc(
  341.     HWND hDlg,
  342.     UINT wMsg,
  343.     WPARAM wParam,
  344.     LPARAM lParam);
  345. LRESULT
  346. PrintEditNumberOnlyProc(
  347.     HWND hWnd,
  348.     UINT msg,
  349.     WPARAM wP,
  350.     LPARAM lP);
  351. LRESULT
  352. PrintEditMarginProc(
  353.     HWND hWnd,
  354.     UINT msg,
  355.     WPARAM wP,
  356.     LPARAM lP);
  357. LRESULT
  358. PrintPageSetupPaintProc(
  359.     HWND hWnd,
  360.     UINT msg,
  361.     WPARAM wP,
  362.     LPARAM lP);
  363. HANDLE
  364. PrintLoadResource(
  365.     HANDLE hInst,
  366.     LPTSTR pResName,
  367.     LPTSTR pType);
  368. VOID
  369. PrintGetDefaultPrinterName(
  370.     LPTSTR pDefaultPrinter,
  371.     UINT cchSize);
  372. BOOL
  373. PrintReturnDefault(
  374.     PPRINTINFO pPI);
  375. BOOL
  376. PrintInitGeneral(
  377.     HWND hDlg,
  378.     UINT Id,
  379.     PPRINTINFO pPI);
  380. DWORD
  381. PrintInitPrintDlg(
  382.     HWND hDlg,
  383.     WPARAM wParam,
  384.     PPRINTINFO pPI);
  385. DWORD
  386. PrintInitSetupDlg(
  387.     HWND hDlg,
  388.     WPARAM wParam,
  389.     PPRINTINFO pPI);
  390. VOID
  391. PrintUpdateSetupDlg(
  392.     HWND hDlg,
  393.     PPRINTINFO pPI,
  394.     LPDEVMODE pDM,
  395.     BOOL fResetContent);
  396. BOOL
  397. PrintSetCopies(
  398.     HWND hDlg,
  399.     PPRINTINFO pPI,
  400.     UINT Id);
  401. VOID
  402. PrintSetMinMargins(
  403.     HWND hDlg,
  404.     PPRINTINFO pPI,
  405.     LPDEVMODE pDM);
  406. VOID
  407. PrintSetupMargins(
  408.     HWND hDlg,
  409.     PPRINTINFO pPI);
  410. VOID
  411. PrintSetMargin(
  412.     HWND hDlg,
  413.     PPRINTINFO pPI,
  414.     UINT Id,
  415.     LONG lValue);
  416. VOID
  417. PrintGetMargin(
  418.     HWND hEdt,
  419.     PPRINTINFO pPI,
  420.     LONG lMin,
  421.     LONG *plMargin,
  422.     LONG *plSample);
  423. BOOL
  424. PrintInitBannerAndQuality(
  425.     HWND hDlg,
  426.     PPRINTINFO pPI,
  427.     LPPRINTDLG pPD);
  428. BOOL
  429. PrintCreateBanner(
  430.     HWND hDlg,
  431.     LPDEVNAMES pDN,
  432.     LPTSTR psBanner,
  433.     UINT cchBanner);
  434. VOID
  435. PrintInitQuality(
  436.     HANDLE hCmb,
  437.     LPPRINTDLG pPD,
  438.     SHORT nQuality);
  439. VOID
  440. PrintChangeProperties(
  441.     HWND hDlg,
  442.     UINT Id,
  443.     PPRINTINFO pPI);
  444. VOID
  445. PrintPrinterChanged(
  446.     HWND hDlg,
  447.     UINT Id,
  448.     PPRINTINFO pPI);
  449. VOID
  450. PrintCancelPrinterChanged(
  451.     PPRINTINFO pPI,
  452.     LPTSTR pPrinterName);
  453. VOID
  454. PrintUpdateStatus(
  455.     HWND hDlg,
  456.     PPRINTINFO pPI);
  457. BOOL
  458. PrintGetSetupInfo(
  459.     HWND hDlg,
  460.     LPPRINTDLG pPD);
  461. PPRINTER_INFO_2
  462. PrintSearchForPrinter(
  463.     PPRINTINFO pPI,
  464.     LPCTSTR lpsPrinterName);
  465. #ifdef UNICODE
  466.   VOID
  467.   PrintGetExtDeviceMode(
  468.       HWND hDlg,
  469.       PPRINTINFO pPI);
  470. #endif
  471. BOOL
  472. PrintEnumAndSelect(
  473.     HWND hDlg,
  474.     UINT Id,
  475.     PPRINTINFO pPI,
  476.     LPTSTR lpsPrinterToSelect,
  477.     BOOL bEnumPrinters);
  478. VOID
  479. PrintBuildDevNames(
  480.     PPRINTINFO pPI);
  481. HANDLE
  482. PrintGetDevMode(
  483.     HWND hDlg,
  484.     HANDLE hPrinter,
  485.     LPTSTR lpsDeviceName,
  486.     HANDLE hDevMode);
  487. VOID
  488. PrintReturnICDC(
  489.     LPPRINTDLG pPD,
  490.     LPDEVNAMES pDN,
  491.     LPDEVMODE pDM);
  492. VOID
  493. PrintMeasureItem(
  494.     HANDLE hDlg,
  495.     LPMEASUREITEMSTRUCT mis);
  496. VOID
  497. PrintInitOrientation(
  498.     HWND hDlg,
  499.     PPRINTINFO pPI,
  500.     LPDEVMODE pDM);
  501. VOID
  502. PrintSetOrientation(
  503.     HWND hDlg,
  504.     PPRINTINFO pPI,
  505.     LPDEVMODE pDM,
  506.     UINT uiOldId,
  507.     UINT uiNewId);
  508. VOID
  509. PrintUpdatePageSetup(
  510.     HWND hDlg,
  511.     PPRINTINFO pPI,
  512.     LPDEVMODE pDM,
  513.     UINT uiOldId,
  514.     UINT uiNewId);
  515. VOID
  516. PrintInitDuplex(
  517.     HWND hDlg,
  518.     LPDEVMODE pDM);
  519. VOID
  520. PrintSetDuplex(
  521.     HWND hDlg,
  522.     LPDEVMODE pDM,
  523.     UINT nRad);
  524. VOID
  525. PrintInitPaperCombo(
  526.     PPRINTINFO pPI,
  527.     HWND hCmb,
  528.     HWND hStc,
  529.     PPRINTER_INFO_2 pPrinter,
  530.     LPDEVMODE pDM,
  531.     WORD fwCap1,
  532.     WORD cchSize1,
  533.     WORD fwCap2);
  534. VOID
  535. PrintEditError(
  536.     HWND hDlg,
  537.     int Id,
  538.     UINT MessageId,
  539.     ...);
  540. VOID
  541. PrintOpenPrinter(
  542.     PPRINTINFO pPI,
  543.     LPTSTR pPrinterName);
  544. BOOL
  545. PrintClosePrinters(
  546.     PPRINTINFO pPI);
  547. VOID SetCopiesEditWidth(
  548.     HWND hDlg,
  549.     HWND hControl);
  550. #ifdef UNICODE
  551.   VOID
  552.   UpdateSpoolerInfo(
  553.       PPRINTINFO pPI);
  554. #endif
  555. PPRINTER_INFO_2
  556. PrintGetPrinterInfo2(
  557.     HANDLE hPrinter);
  558. int
  559. ConvertStringToInteger(
  560.     LPCTSTR pSrc);
  561. VOID
  562. FreePrinterArray(
  563.     PPRINTINFO pPI);
  564. VOID
  565. TermPrint(void);
  566. VOID
  567. TransferPSD2PD(
  568.     PPRINTINFO pPI);
  569. VOID
  570. TransferPD2PSD(
  571.     PPRINTINFO pPI);
  572. #ifdef UNICODE
  573.   VOID
  574.   TransferPSD2PDA(
  575.       PPRINTINFO pPI);
  576.   VOID
  577.   TransferPDA2PSD(
  578.       PPRINTINFO pPI);
  579.   BOOL
  580.   ThunkPageSetupDlg(
  581.       PPRINTINFO pPI,
  582.       LPPAGESETUPDLGA pPSDA);
  583.   VOID
  584.   FreeThunkPageSetupDlg(
  585.       PPRINTINFO pPI);
  586.   BOOL
  587.   ThunkPrintDlg(
  588.       PPRINTINFO pPI,
  589.       LPPRINTDLGA pPDA);
  590.   VOID
  591.   FreeThunkPrintDlg(
  592.       PPRINTINFO pPI);
  593.   VOID
  594.   ThunkPrintDlgA2W(
  595.       PPRINTINFO pPI);
  596.   VOID
  597.   ThunkPrintDlgW2A(
  598.       PPRINTINFO pPI);
  599.   VOID
  600.   ThunkDevNamesA2W(
  601.       LPDEVNAMES pDNA,
  602.       LPDEVNAMES pDNW);
  603.   VOID
  604.   ThunkDevNamesW2A(
  605.       LPDEVNAMES pDNW,
  606.       LPDEVNAMES pDNA);
  607.   VOID
  608.   ThunkDevModeA2W(
  609.       LPDEVMODEA pDMA,
  610.       LPDEVMODEW pDMW);
  611.   VOID
  612.   ThunkDevModeW2A(
  613.       LPDEVMODEW pDMW,
  614.       LPDEVMODEA pDMA);
  615.   LPDEVMODEW
  616.   AllocateUnicodeDevMode(
  617.       LPDEVMODEA pANSIDevMode);
  618.   LPDEVMODEA
  619.   AllocateAnsiDevMode(
  620.       LPDEVMODEW pUnicodeDevMode);
  621. #endif
  622. #ifdef __cplusplus
  623. };  // extern "C"
  624. #endif