⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 conversionview.h

📁 图象像素的表示
💻 H
字号:
// ConversionView.h : interface of the CConversionView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_CONVERSIONVIEW_H__8121DF2D_2DCB_11D6_BBF5_865C0B899126__INCLUDED_)
#define AFX_CONVERSIONVIEW_H__8121DF2D_2DCB_11D6_BBF5_865C0B899126__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include<math.h>
#include "MyTypedef.h"

class CConversionView : public CView
{
protected: // create from serialization only
	CConversionView();
	DECLARE_DYNCREATE(CConversionView)

// Attributes
public:
	CConversionDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CConversionView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CConversionView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

public:
	CClientDC *m_pDC;    //设备上下文

	MYBITMAP *pBuff;      //位图双缓冲
	MYBITMAP *pFrameBuff;
	UINT biWidth;         //位图尺寸  
	UINT biHeight;
	
	RECT selRect;         //选定的处理区域
	bool bSelect;         //是否选定处理区域

	UNREDO UnRedo;        //操作状态
	OPSTATUS opStatus;

public:

	//初始或者与位图操作有关的函数
	//
	void Init();
	void ReadBitmap();
	DWORD Pow2(UINT x);
	void CopyBitmap(MYBITMAP *Source,MYBITMAP *Destination);
	void DrawBitmap(MYBITMAP *pBmp, int x0, int y0, CClientDC *dc);
	
	//处理区域指定
	//
	void DrawRect(RECT Rect);
     
	//系列图像处理函数
	//
	void Contour(RECT rSel,int Value);
	void Luminosity(RECT rSel,int Value);
	void Contrast(RECT rSel,int Value);
	void Wave(RECT rSel,int Value);
	void WhtBlk(RECT rSel,int Value);
	void Gray(RECT rSel,int Value);
	void Blur(RECT rSel,int Value);
	void Mosaic(RECT rSel,int Value);

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CConversionView)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnbtnOpenBmp();
	afx_msg void OnbtnMosaic();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnDestroy();
	afx_msg void OnbtnBlur();
	afx_msg void OnUpdatebtnBlur(CCmdUI* pCmdUI);
	afx_msg void OnbtnContour();
	afx_msg void OnUpdatebtnContour(CCmdUI* pCmdUI);
	afx_msg void OnbtnContrast();
	afx_msg void OnUpdatebtnContrast(CCmdUI* pCmdUI);
	afx_msg void OnbtnGray();
	afx_msg void OnUpdatebtnGray(CCmdUI* pCmdUI);
	afx_msg void OnbtnLuminosity();
	afx_msg void OnUpdatebtnLuminosity(CCmdUI* pCmdUI);
	afx_msg void OnUpdatebtnMosaic(CCmdUI* pCmdUI);
	afx_msg void OnbtnUndo();
	afx_msg void OnUpdatebtnUndo(CCmdUI* pCmdUI);
	afx_msg void OnbtnWave();
	afx_msg void OnUpdatebtnWave(CCmdUI* pCmdUI);
	afx_msg void OnbtnWhtBlk();
	afx_msg void OnUpdatebtnWhtBlk(CCmdUI* pCmdUI);
	afx_msg void OnbtnRedo();
	afx_msg void OnUpdatebtnRedo(CCmdUI* pCmdUI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in ConversionView.cpp
inline CConversionDoc* CConversionView::GetDocument()
   { return (CConversionDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CONVERSIONVIEW_H__8121DF2D_2DCB_11D6_BBF5_865C0B899126__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -