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.

77 lines
2.7 KiB

  1. /*****************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORPORATION, 2000
  4. *
  5. * TITLE: printopt.h
  6. *
  7. * VERSION: 1.0
  8. *
  9. * AUTHOR: RickTu
  10. *
  11. * DATE: 10/18/00
  12. *
  13. * DESCRIPTION: Definition of class which handles dlg proc duties
  14. * for the print options wizard page
  15. *
  16. *****************************************************************************/
  17. #ifndef _PRINT_PHOTOS_WIZARD_PRINT_OPTIONS__DLG_PROC_
  18. #define _PRINT_PHOTOS_WIZARD_PRINT_OPTIONS_DLG_PROC_
  19. typedef BOOL (*PF_BPRINTERSETUP)(HWND, UINT, UINT, LPTSTR, UINT*, LPCTSTR);
  20. const LPTSTR g_szPrintLibraryName = TEXT("printui.dll");
  21. const LPSTR g_szPrinterSetup = "bPrinterSetup";
  22. #define ENUM_MAX_RETRY 5
  23. #ifndef DC_MEDIATYPENAMES
  24. #define DC_MEDIATYPENAMES 34
  25. #endif
  26. #ifndef DC_MEDIATYPES
  27. #define DC_MEDIATYPES 35
  28. #endif
  29. class CPrintOptionsPage
  30. {
  31. public:
  32. CPrintOptionsPage( CWizardInfoBlob * pBlob );
  33. ~CPrintOptionsPage();
  34. INT_PTR DoHandleMessage( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
  35. VOID MessageQueueCreated();
  36. CSimpleCriticalSection _csList; // used to syncronize access to printer list information
  37. private:
  38. CWizardInfoBlob * _pWizInfo;
  39. HWND _hDlg;
  40. CSimpleString _strPrinterName; // selected printer name
  41. CSimpleString _strPortName; // selected printer's port name
  42. HMODULE _hLibrary; // library handle
  43. PF_BPRINTERSETUP _pfnPrinterSetup; // function entrance for APW
  44. BOOL _LoadPrintUI(); // Load library
  45. VOID _FreePrintUI(); // Free Library
  46. BOOL _ModifyDroppedWidth( HWND ); // modify dropped width if needed
  47. VOID _ValidateControls(); // validate controls in this page
  48. VOID _HandleSelectPrinter(); // save new selected printer and refresh media type selection
  49. VOID _HandleInstallPrinter(); // run add printer wizard
  50. VOID _HandlePrinterPreferences(); // handle when user presses Printer Preferences
  51. VOID _UpdateCachedInfo( PDEVMODE pDevMode ); // update global cached copies of printer information
  52. VOID _ShowCurrentMedia( LPCTSTR pszPrinterName, LPCTSTR pszPortName );
  53. // window message handlers
  54. LRESULT _OnInitDialog();
  55. LRESULT _OnCommand(WPARAM wParam, LPARAM lParam);
  56. LRESULT _OnNotify(WPARAM wParam, LPARAM lParam);
  57. VOID _OnKillActive();
  58. };
  59. #endif