Doc.h
Upload User: ty808080
Upload Date: 2022-02-22
Package Size: 101k
Code Size: 3k
Category:

GDI-Bitmap

Development Platform:

Visual C++

  1. #include "dibimage.h"
  2. class CDibtestDoc : public CDocument
  3. {
  4. protected: // create from serialization only
  5. CDibtestDoc();
  6. DECLARE_DYNCREATE(CDibtestDoc)
  7.   CDibImage m_Dib;
  8.   int m_RedChannel[256];
  9.   int m_GreenChannel[256];
  10.   int m_BlueChannel[256];
  11.   int m_nMaxRed;
  12.   int m_nMaxGreen;
  13.   int m_nMaxBlue;
  14.   int m_nMaxColor;
  15.   void UpdateHistogramData();
  16. //{{AFX_VIRTUAL(CDibtestDoc)
  17. public:
  18. virtual BOOL OnNewDocument();
  19. virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
  20. virtual void DeleteContents();
  21. virtual BOOL OnSaveDocument(LPCTSTR lpszPathName);
  22. //}}AFX_VIRTUAL
  23. virtual ~CDibtestDoc();
  24. #ifdef _DEBUG
  25. virtual void AssertValid() const;
  26. virtual void Dump(CDumpContext& dc) const;
  27. #endif
  28. protected:
  29. //{{AFX_MSG(CDibtestDoc)
  30. afx_msg void OnViewGrayscale();
  31. afx_msg void OnUpdateViewGrayscale(CCmdUI* pCmdUI);
  32. afx_msg void OnAdjustRed();
  33. afx_msg void OnUpdateAdjustRed(CCmdUI* pCmdUI);
  34. afx_msg void OnEditRedo();
  35. afx_msg void OnUpdateEditRedo(CCmdUI* pCmdUI);
  36. afx_msg void OnEditUndo();
  37. afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI);
  38. afx_msg void OnColorNegative();
  39. afx_msg void OnUpdateColorNegative(CCmdUI* pCmdUI);
  40. afx_msg void OnEditCopy();
  41. afx_msg void OnEditPasteSelection();
  42. afx_msg void OnUpdateEditPasteSelection(CCmdUI* pCmdUI);
  43. afx_msg void OnChannelSplit();
  44. afx_msg void OnUpdateChannelSplit(CCmdUI* pCmdUI);
  45. afx_msg void OnAdjustGreen();
  46. afx_msg void OnUpdateAdjustGreen(CCmdUI* pCmdUI);
  47. afx_msg void OnAdjustBlue();
  48. afx_msg void OnUpdateAdjustBlue(CCmdUI* pCmdUI);
  49. afx_msg void OnAdjustBrightness();
  50. afx_msg void OnUpdateAdjustBrightness(CCmdUI* pCmdUI);
  51. afx_msg void OnImageFlip();
  52. afx_msg void OnUpdateImageFlip(CCmdUI* pCmdUI);
  53. afx_msg void OnFilterUserdefined();
  54. afx_msg void OnUpdateFilterUserdefined(CCmdUI* pCmdUI);
  55. afx_msg void OnImageMirror();
  56. afx_msg void OnUpdateImageMirror(CCmdUI* pCmdUI);
  57. afx_msg void OnAdjustGamma();
  58. afx_msg void OnUpdateAdjustGamma(CCmdUI* pCmdUI);
  59. afx_msg void OnAdjustContrast();
  60. afx_msg void OnUpdateAdjustContrast(CCmdUI* pCmdUI);
  61. afx_msg void OnAdjustMidtone();
  62. afx_msg void OnUpdateAdjustMidtone(CCmdUI* pCmdUI);
  63. afx_msg void OnUpdateFilterFindEdges(CCmdUI* pCmdUI);
  64. afx_msg void OnFilterBlur();
  65. afx_msg void OnUpdateFilterBlur(CCmdUI* pCmdUI);
  66. afx_msg void OnAdjustSaturation();
  67. afx_msg void OnUpdateAdjustSaturation(CCmdUI* pCmdUI);
  68. afx_msg void OnAdjustHue();
  69. afx_msg void OnUpdateAdjustHue(CCmdUI* pCmdUI);
  70. afx_msg void OnFilterFindEdges();
  71. afx_msg void OnFilterAddNoise();
  72. afx_msg void OnUpdateFilterAddNoise(CCmdUI* pCmdUI);
  73. afx_msg void OnFilterFindHorizontalEdges();
  74. afx_msg void OnUpdateFilterFindHorizontalEdges(CCmdUI* pCmdUI);
  75. afx_msg void OnFilterFindVerticalEdges();
  76. afx_msg void OnUpdateFilterFindVerticalEdges(CCmdUI* pCmdUI);
  77. afx_msg void OnFilterMedian();
  78. afx_msg void OnUpdateFilterMedian(CCmdUI* pCmdUI);
  79. afx_msg void OnAdjustHighlight();
  80. afx_msg void OnUpdateAdjustHighlight(CCmdUI* pCmdUI);
  81. afx_msg void OnAdjustShadow();
  82. afx_msg void OnUpdateAdjustShadow(CCmdUI* pCmdUI);
  83. //}}AFX_MSG
  84. afx_msg void OnUndoSize(UINT nID);
  85.   afx_msg void OnUpdateUndoSize(CCmdUI* pCmdUI);
  86. DECLARE_MESSAGE_MAP()
  87. };