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.

106 lines
3.4 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORPORATION, 1998
  4. *
  5. * TITLE: SCANDLG.H
  6. *
  7. * VERSION: 1.0
  8. *
  9. * AUTHOR: ShaunIv
  10. *
  11. * DATE: 10/7/1999
  12. *
  13. * DESCRIPTION: Scan dialog
  14. *
  15. *******************************************************************************/
  16. #ifndef _SCANDLG_H_INCLUDED
  17. #define _SCANDLG_H_INCLUDED
  18. #include "wiadevd.h"
  19. #include "scanitem.h"
  20. #include "propstrm.h"
  21. #include "sitemlst.h"
  22. #include "itranhlp.h"
  23. class CScannerAcquireDialog
  24. {
  25. private:
  26. HWND m_hWnd;
  27. DEVICEDIALOGDATA *m_pDeviceDialogData;
  28. CScanItemList m_ScanItemList;
  29. SIZE m_sizeFlatbed;
  30. SIZE m_sizeDocfeed;
  31. SIZE m_sizeMinimumWindowSize;
  32. UINT m_nMsgScanBegin;
  33. UINT m_nMsgScanEnd;
  34. UINT m_nMsgScanProgress;
  35. bool m_bScanning;
  36. HFONT m_hBigTitleFont;
  37. HICON m_hIconLarge;
  38. HICON m_hIconSmall;
  39. CComPtr<IUnknown> m_DisconnectEvent;
  40. CScannerItem *m_pScannerItem;
  41. CWiaPaperSize *m_pPaperSizes;
  42. UINT m_nPaperSizeCount;
  43. bool m_bHasFlatBed;
  44. bool m_bHasDocFeed;
  45. HBITMAP m_hBitmapDefaultPreviewBitmap;
  46. private:
  47. // No implementation
  48. CScannerAcquireDialog(void);
  49. CScannerAcquireDialog( const CScannerAcquireDialog & );
  50. CScannerAcquireDialog &operator=( const CScannerAcquireDialog & );
  51. private:
  52. // Constructor, destructor
  53. explicit CScannerAcquireDialog( HWND hwnd ); // Only implemented constructor
  54. virtual ~CScannerAcquireDialog(void);
  55. // Helpers
  56. void PopulateIntentList(void);
  57. void SetDefaultButton( int nId, bool bFocus );
  58. bool ApplyCurrentIntent(void);
  59. void SetIntentCheck( LONG nIntent );
  60. void PopulateDocumentHandling(void);
  61. void PopulatePageSize(void);
  62. void HandlePaperSourceSelChange(void);
  63. void HandlePaperSizeSelChange(void);
  64. bool InDocFeedMode(void);
  65. void UpdatePreviewControlState(void);
  66. void EnableControl( int nControl, BOOL bEnable );
  67. void ShowControl( int nControl, BOOL bShow );
  68. // Message handlers
  69. LRESULT OnInitDialog( WPARAM, LPARAM );
  70. LRESULT OnCommand( WPARAM, LPARAM );
  71. LRESULT OnDestroy( WPARAM, LPARAM );
  72. LRESULT OnGetMinMaxInfo( WPARAM, LPARAM );
  73. LRESULT OnSize( WPARAM, LPARAM );
  74. LRESULT OnScanBegin( WPARAM, LPARAM );
  75. LRESULT OnScanEnd( WPARAM, LPARAM );
  76. LRESULT OnScanProgress( WPARAM, LPARAM );
  77. LRESULT OnEnterSizeMove( WPARAM, LPARAM );
  78. LRESULT OnExitSizeMove( WPARAM, LPARAM );
  79. LRESULT OnWiaEvent( WPARAM, LPARAM );
  80. LRESULT OnHelp( WPARAM, LPARAM );
  81. LRESULT OnContextMenu( WPARAM, LPARAM );
  82. LRESULT OnSysColorChange( WPARAM, LPARAM );
  83. // WM_COMMAND handlers
  84. void OnIntentChange( WPARAM, LPARAM );
  85. void OnPreviewSelChange( WPARAM, LPARAM );
  86. void OnRescan( WPARAM, LPARAM );
  87. void OnScan( WPARAM, LPARAM );
  88. void OnCancel( WPARAM, LPARAM );
  89. void OnAdvanced( WPARAM, LPARAM );
  90. void OnPaperSourceSelChange( WPARAM, LPARAM );
  91. void OnPaperSizeSelChange( WPARAM, LPARAM );
  92. public:
  93. static INT_PTR CALLBACK DialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
  94. };
  95. #endif