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.

107 lines
3.0 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORPORATION, 1998
  4. *
  5. * TITLE: PPSCAN.H
  6. *
  7. * VERSION: 1.0
  8. *
  9. * AUTHOR: ShaunIv
  10. *
  11. * DATE: 5/17/1999
  12. *
  13. * DESCRIPTION:
  14. *
  15. *******************************************************************************/
  16. #ifndef __PPSCAN_H_INCLUDED
  17. #define __PPSCAN_H_INCLUDED
  18. #include <windows.h>
  19. #include <atlbase.h>
  20. #include "contrast.h"
  21. #include "vwiaset.h"
  22. #include "slidedit.h"
  23. #include "updnedit.h"
  24. class CScannerCommonPropertyPage
  25. {
  26. private:
  27. //
  28. // For keeping track of which controls are enabled
  29. //
  30. enum
  31. {
  32. UsingContrast = 0x00000001,
  33. UsingBrightness = 0x00000002,
  34. UsingResolution = 0x00000004,
  35. UsingDataType = 0x00000008
  36. };
  37. HWND m_hWnd;
  38. //
  39. // We need to get this from CScannerPropPageExt *m_pScannerPropPageExt;
  40. //
  41. CComPtr<IWiaItem> m_pIWiaItem;
  42. //
  43. // We are messing with settings so ignore ui messages.
  44. //
  45. int m_nProgrammaticSetting;
  46. CValidWiaSettings m_ValidContrastSettings;
  47. CValidWiaSettings m_ValidBrightnessSettings;
  48. CValidWiaSettings m_ValidResolutionSettings;
  49. CSliderAndEdit m_BrightnessSliderAndEdit;
  50. CSliderAndEdit m_ContrastSliderAndEdit;
  51. CUpDownAndEdit m_ResolutionUpDownAndEdit;
  52. LONG m_nControlsInUse;
  53. int m_nInitialDataTypeSelection;
  54. static const int c_nMinBrightnessAndContrastSettingCount;
  55. private:
  56. //
  57. // No implementation
  58. //
  59. CScannerCommonPropertyPage(void);
  60. CScannerCommonPropertyPage( const CScannerCommonPropertyPage & );
  61. CScannerCommonPropertyPage &operator=( const CScannerCommonPropertyPage & );
  62. private:
  63. CScannerCommonPropertyPage( HWND hWnd );
  64. LRESULT OnCommand( WPARAM, LPARAM );
  65. LRESULT OnNotify( WPARAM, LPARAM );
  66. LRESULT OnInitDialog( WPARAM, LPARAM );
  67. LRESULT OnApply( WPARAM, LPARAM );
  68. LRESULT OnKillActive( WPARAM, LPARAM );
  69. LRESULT OnSetActive( WPARAM, LPARAM );
  70. LRESULT OnHScroll( WPARAM, LPARAM );
  71. LRESULT OnVScroll( WPARAM, LPARAM );
  72. LRESULT OnHelp( WPARAM, LPARAM );
  73. LRESULT OnContextMenu( WPARAM, LPARAM );
  74. LRESULT OnSysColorChange( WPARAM, LPARAM );
  75. void OnBrightnessEditChange( WPARAM, LPARAM );
  76. void OnContrastEditChange( WPARAM, LPARAM );
  77. void OnResolutionEditChange( WPARAM, LPARAM );
  78. void OnDataTypeSelChange( WPARAM, LPARAM );
  79. void OnRestoreDefault( WPARAM, LPARAM );
  80. void SetText( HWND hWnd, LPCTSTR pszText );
  81. void SetText( HWND hWnd, LONG nNumber );
  82. bool PopulateDataTypes(void);
  83. bool ApplySettings(void);
  84. bool ValidateEditControls(void);
  85. void Initialize(void);
  86. bool IsUselessPreviewRange( const CValidWiaSettings &Settings );
  87. public:
  88. ~CScannerCommonPropertyPage(void);
  89. static INT_PTR CALLBACK DialogProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
  90. };
  91. #endif //__PPSCAN_H_INCLUDED