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.

766 lines
16 KiB

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