www.pudn.com > assigment1.zip > myGraphicsView.h
// myGraphicsView.h : interface of the CMyGraphicsView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MYGRAPHICSVIEW_H__5720E133_BF79_4763_99FD_D7FD84B9E5E7__INCLUDED_)
#define AFX_MYGRAPHICSVIEW_H__5720E133_BF79_4763_99FD_D7FD84B9E5E7__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// settings for OpenGL
#include "gl/gl.h"
#include "gl/glu.h"
#include "gl/glaux.h"
class CMyGraphicsView : public CView
{
protected: // create from serialization only
CMyGraphicsView();
DECLARE_DYNCREATE(CMyGraphicsView)
// Attributes
public:
CMyGraphicsDoc* GetDocument();
HGLRC hglrc; // settings for OpenGL
CPoint m_p[100];
int m_pN;
GLint w, h;
// Operations
public:
void myinit(void);
int random(int);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyGraphicsView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
void OneTree(double x1,double y1,double x2,double y2);
int m_Flag;
CPoint m_pPrev;
void DrawMagicCircle();
int m_circle;
CPen pen;
int iBlue;
int iGreen;
int iRed;
COLORREF m_color;
int m_line_width;
int m_line_method;
COLORREF m_LineColor;
COLORREF mPenColor;
virtual ~CMyGraphicsView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CMyGraphicsView)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnDestroy();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnBasicPolygon();
afx_msg void OnBasicLines();
afx_msg void OnMagicCircle();
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnFractalsTree();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in myGraphicsView.cpp
inline CMyGraphicsDoc* CMyGraphicsView::GetDocument()
{ return (CMyGraphicsDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MYGRAPHICSVIEW_H__5720E133_BF79_4763_99FD_D7FD84B9E5E7__INCLUDED_)