DlgIntensity.h
上传用户:xayxjz
上传日期:2022-08-07
资源大小:2188k
文件大小:3k
源码类别:

图形图象

开发平台:

Visual C++

  1. #if !defined(AFX_DLGINTENSITY_H__42FF9AE8_5DB5_4842_803C_DD1E7330D1FF__INCLUDED_)
  2. #define AFX_DLGINTENSITY_H__42FF9AE8_5DB5_4842_803C_DD1E7330D1FF__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // DlgIntensity.h : header file
  7. //
  8. class CDibObject;
  9. /////////////////////////////////////////////////////////////////////////////
  10. // CDlgIntensity dialog
  11. class CDlgIntensity : public CDialog
  12. {
  13. // Construction
  14. public:
  15. void OnRButtonDown();
  16. void OnLButtonUp();
  17. BOOL OnMouseMove();
  18. BOOL OnLButtonDown();
  19. BOOL m_bIsGray256;
  20. //直方图数据指针
  21. int *m_pnHistogram;
  22. int *m_pHistTemp;
  23. // 当前鼠标拖动状态: 0表示未拖动,
  24. // 1表示正在拖动下限
  25. // 2表示正在拖动上限。
  26. int m_iIsDraging;
  27. BOOL m_bIsInRect;
  28. int m_nGrayValue;
  29. // 相应鼠标事件的矩形区域
  30. CRect m_MouseRect;
  31. // standard constructor
  32. CDlgIntensity(CWnd* pParent = NULL);   
  33. // Dialog Data
  34. //{{AFX_DATA(CDlgIntensity)
  35. enum { IDD = IDD_DLG_Intensity };
  36. CSpinButtonCtrl m_ctrlUpGraySpin;
  37. CSpinButtonCtrl m_ctrlLowGraySpin;
  38. CSpinButtonCtrl m_ctrlCurrentGraySpin;
  39. int m_iLowGray;
  40. int m_iUpGray;
  41. UINT m_nCurrentGray;
  42. long m_nCurrentPiexsNum;
  43. int m_nHistogramType;
  44. // NOTE: the ClassWizard will add data members here
  45. //}}AFX_DATA
  46. // Overrides
  47. // ClassWizard generated virtual function overrides
  48. //{{AFX_VIRTUAL(CDlgIntensity)
  49. protected:
  50. virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  51. //}}AFX_VIRTUAL
  52. private:
  53. CButton& GrayTypeRedRadio(){return *(CButton*)GetDlgItem(IDC_RED_RADIO);}
  54. CButton& GrayTypeGreenRadio(){return *(CButton*)GetDlgItem(IDC_GREEN_RADIO);}
  55. CButton& GrayTypeBlueRadio(){return *(CButton*)GetDlgItem(IDC_BLUE_RADIO);}
  56. // Implementation
  57. protected:
  58.     int m_nPenType;
  59. BOOL m_bRMouseDown;
  60. CDibObject *pDibObject;
  61. // Generated message map functions
  62. //{{AFX_MSG(CDlgIntensity)
  63. afx_msg void OnPaint();
  64. virtual void OnOK();
  65. virtual BOOL OnInitDialog();
  66. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  67. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  68. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  69. afx_msg void OnChangeEDITLowGray();
  70. afx_msg void OnChangeEDITUpGray();
  71. afx_msg void OnChangeEditCurGray();
  72. afx_msg void OnHistogramtype();
  73. afx_msg void OnGreenRadio();
  74. afx_msg void OnRedRadio();
  75. afx_msg void OnBlueRadio();
  76. afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  77. // Generated message map functions
  78. //{{AFX_MSG(CDlgIntensity)
  79. // NOTE: the ClassWizard will add member functions here
  80. //}}AFX_MSG
  81. DECLARE_MESSAGE_MAP()
  82. };
  83. //{{AFX_INSERT_LOCATION}}
  84. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  85. #endif // !defined(AFX_DLGINTENSITY_H__42FF9AE8_5DB5_4842_803C_DD1E7330D1FF__INCLUDED_)