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.

105 lines
3.6 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORPORATION, 1998
  4. *
  5. * TITLE: SCANSEL.H
  6. *
  7. * VERSION: 1.0
  8. *
  9. * AUTHOR: ShaunIv
  10. *
  11. * DATE: 9/28/1999
  12. *
  13. * DESCRIPTION: Scanner region selection (preview) page
  14. *
  15. *******************************************************************************/
  16. #ifndef __SCANSEL_H_INCLUDED
  17. #define __SCANSEL_H_INCLUDED
  18. #include <windows.h>
  19. #include "acqmgrcw.h"
  20. #include "createtb.h"
  21. #include "pviewids.h"
  22. class CScannerSelectionPage
  23. {
  24. private:
  25. // Private data
  26. HWND m_hWnd;
  27. CAcquisitionManagerControllerWindow *m_pControllerWindow;
  28. UINT m_nThreadNotificationMessage;
  29. UINT m_nWiaEventMessage;
  30. HBITMAP m_hBitmapDefaultPreviewBitmap;
  31. SIZE m_sizeFlatbed;
  32. SIZE m_sizeDocfeed;
  33. bool m_bAllowRegionPreview;
  34. HWND m_hwndPreview;
  35. HWND m_hwndSelectionToolbar;
  36. HWND m_hwndRescan;
  37. CWiaPaperSize *m_pPaperSizes;
  38. UINT m_nPaperSizeCount;
  39. ToolbarHelper::CToolbarBitmapInfo m_ScannerSelectionButtonBarBitmapInfo;
  40. CSimpleEvent m_PreviewScanCancelEvent;
  41. private:
  42. // No implementation
  43. CScannerSelectionPage(void);
  44. CScannerSelectionPage( const CScannerSelectionPage & );
  45. CScannerSelectionPage &operator=( const CScannerSelectionPage & );
  46. private:
  47. // Constructor and destructor
  48. explicit CScannerSelectionPage( HWND hWnd );
  49. ~CScannerSelectionPage(void);
  50. private:
  51. // Helpers
  52. CWiaItem *GetActiveScannerItem(void);
  53. void InitializeIntents(void);
  54. void EnableControls( BOOL bEnable );
  55. bool ApplyCurrentPreviewWindowSettings(void);
  56. bool ApplyCurrentIntent(void);
  57. void SetIntentCheck( LONG nIntent );
  58. void PopulateDocumentHandling(void);
  59. void PopulatePageSize(void);
  60. void HandlePaperSourceSelChange(void);
  61. void HandlePaperSizeSelChange(void);
  62. bool InDocFeedMode(void);
  63. void EnableControl( int nControl, BOOL bEnable );
  64. void ShowControl( int nControl, BOOL bShow );
  65. void UpdateControlState(void);
  66. bool InPreviewMode(void);
  67. private:
  68. // Thread messages
  69. void OnNotifyScanPreview( UINT nMsg, CThreadNotificationMessage *pThreadNotificationMessage );
  70. LRESULT OnEventNotification( WPARAM, LPARAM );
  71. // WM_COMMAND handlers
  72. void OnRescan( WPARAM, LPARAM );
  73. void OnProperties( WPARAM, LPARAM );
  74. void OnPreviewSelection( WPARAM, LPARAM );
  75. void OnPaperSourceSelChange( WPARAM, LPARAM );
  76. void OnPaperSizeSelChange( WPARAM, LPARAM );
  77. // WM_NOTIFY handlers
  78. LRESULT OnWizNext( WPARAM, LPARAM );
  79. LRESULT OnWizBack( WPARAM, LPARAM );
  80. LRESULT OnSetActive( WPARAM, LPARAM );
  81. LRESULT OnGetToolTipDispInfo( WPARAM, LPARAM );
  82. LRESULT OnReset( WPARAM, LPARAM );
  83. // Message handlers
  84. LRESULT OnInitDialog( WPARAM, LPARAM );
  85. LRESULT OnDestroy( WPARAM, LPARAM );
  86. LRESULT OnCommand( WPARAM, LPARAM );
  87. LRESULT OnNotify( WPARAM, LPARAM );
  88. LRESULT OnThreadNotification( WPARAM, LPARAM );
  89. LRESULT OnSysColorChange( WPARAM, LPARAM );
  90. LRESULT OnThemeChanged( WPARAM, LPARAM );
  91. public:
  92. static INT_PTR CALLBACK DialogProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam );
  93. };
  94. #endif __SCANSEL_H_INCLUDED