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

📄 fractalexview.h

📁 自己写的一个分形程序
💻 H
字号:
// FractalExView.h : interface of the CFractalExView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_FRACTALEXVIEW_H__824A723E_6ABC_436F_AAF1_B2E3B9FE5AB7__INCLUDED_)
#define AFX_FRACTALEXVIEW_H__824A723E_6ABC_436F_AAF1_B2E3B9FE5AB7__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "FractalExDoc.h"
#include "dib.h"
#include "Complex.cpp"
#include "FractalDialog.h"
#include "OtherFractalDialog.h"
#include "MainFrm.h"

#define MAX_UNDO 21


class CFractalExView : public CFormView
{
protected: // create from serialization only
	CFractalExView();
	DECLARE_DYNCREATE(CFractalExView)

public:
	//{{AFX_DATA(CFractalExView)
	enum { IDD = IDD_FRACTALEX_FORM };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

// Attributes
public:
	CFractalExDoc* GetDocument();
	_CalcFractal CalcFractal;
	_GetFractalData GetFractalData;
	_CalcFractalPoint CalcFractalPoint;
	HMODULE hlib;

	CFractalDialog customfdlg;
	CString BuildLib;//已经建立
	COtherFractalDialog otherfdlg;

	COLORREF colorcir[200*6];
	CPoint oldpoint;
	CRect oldrect;
	bool mousedown;
	datatype scale;

	CString strlvl;
	int wid2, hei2;
	PixelInfo *pixelinfo;

	datatype widhei;
	bool onceinit;
	CDib memdib;

	CRectFloat UndoRect[MAX_UNDO];
	int nUndoRect, curUndoRect, nRedoRect;

	int& ZoomOp;
	CString status_coor;//状态栏显示坐标
// Operations
public:
	HCURSOR cur_zoom_in[4];
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CFractalExView)
	public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual void OnInitialUpdate(); // called first time after construct
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	CMainFrame* GetMainFrame();
	void UnloadFractalLib();
	CString BuildDll(CString exp, CString ori, CString name, bool tempor);
	void LoadFractalLib(CString dllname="");
	void Render();
	void UseColorSet(int set, bool redraw=true);
	virtual void NewFractal(CRectFloat& rc);
	void SaveMemdc(CString filename);
	CRectFloat CalcSelRect(CRect& selRect);
	void ChangeRect(CRect& SelRect);
	void AddUndo(CRectFloat& rc);
	void DeleteMem();
	void CreateMem();

	void DrawFractal(bool redraw=true);

	virtual ~CFractalExView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CFractalExView)
	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 OnPaint();
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnEditUndo();
	afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI);
	afx_msg void OnEditRedo();
	afx_msg void OnUpdateEditRedo(CCmdUI* pCmdUI);
	afx_msg void OnDestroy();
	afx_msg void OnZoomIn();
	afx_msg void OnZoomOut();
	afx_msg void OnUpdateZoomIn(CCmdUI* pCmdUI);
	afx_msg void OnZoomMove();
	afx_msg void OnUpdateZoomMove(CCmdUI* pCmdUI);
	afx_msg void OnUpdateZoomOut(CCmdUI* pCmdUI);
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	afx_msg void OnFileExport();
	afx_msg void OnEditCopy();
	afx_msg void OnOnidle();
	afx_msg void OnFractalCustom();
	afx_msg void OnUpdateFractalCustom(CCmdUI* pCmdUI);
	afx_msg void OnZoomReset();
	afx_msg void OnFractalOther();
	afx_msg void OnUpdateFractalOther(CCmdUI* pCmdUI);
	afx_msg void OnSetIteration();
	afx_msg void OnFractalViewinfo();
	afx_msg void OnUpdateFractalModeJulia(CCmdUI* pCmdUI);
	afx_msg void OnUpdateFractalModeMand(CCmdUI* pCmdUI);
	afx_msg void OnUpdateFractalModePert(CCmdUI* pCmdUI);
	afx_msg void OnFractalModeJulia();
	afx_msg void OnFractalModeMand();
	afx_msg void OnFractalModePert();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
	afx_msg void OnUpdateCoorIndicator(CCmdUI* pCmdUI);
	afx_msg void OnUpdateFractaltype(CCmdUI* pCmdUI);
	afx_msg void OnFractaltype(UINT nID);
	afx_msg void OnUpdateColorset(CCmdUI* pCmdUI);
	afx_msg void OnColorset(UINT nID);
};

#ifndef _DEBUG  // debug version in FractalExView.cpp
inline CFractalExDoc* CFractalExView::GetDocument()
   { return (CFractalExDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_FRACTALEXVIEW_H__824A723E_6ABC_436F_AAF1_B2E3B9FE5AB7__INCLUDED_)

⌨️ 快捷键说明

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