www.pudn.com > 球和立方体.rar > MultiViewsTestView.h
// MultiViewsTestView.h : interface of the CMultiViewsTestView class // ///////////////////////////////////////////////////////////////////////////// #if !defined(AFX_MULTIVIEWSTESTVIEW_H__4B6AA18F_F815_11D7_8B4A_5254AB1FD91D__INCLUDED_) #define AFX_MULTIVIEWSTESTVIEW_H__4B6AA18F_F815_11D7_8B4A_5254AB1FD91D__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include#include #include #include "MyLink.h" class CMultiViewsTestView : public CView { protected: // create from serialization only CMultiViewsTestView(); DECLARE_DYNCREATE(CMultiViewsTestView) CMyDrawView(); CDC* m_pdc; HGLRC m_hrc; int flag; double size; int glcx, glcy; int glType; UINT nType; int m_drawtype; double fX; double fY; double fZ; double dRadius; CPoint m_glPoint; int m_vcx; int m_vcy; int iIndex; int iSequence; int iCurrent; // Attributes public: CMultiViewsTestDoc* GetDocument(); // Operations public: bool Create(CWnd* pWnd,int iPixelType,DWORD dwFlags); void Select(int i); void MakeCurrent(); void Init(void); void DrawSphere(SPHEREDATA* strSphereData); void DrawCube(CUBEDATA* strCubeData); void SetFlag(int f); void ChangeBig (GraphNode* glCurrent) ; void ChangeSmall(GraphNode* glCurrent) ; void MoveLeft (GraphNode* glCurrent); void MoveRight (GraphNode* glCurrent); void MoveDown(GraphNode* glCurrent); void MoveUp(GraphNode* glCurrent); void MoveInside(GraphNode* glCurrent); void MoveOut(GraphNode* glCurrent); void MyDrawWireCube(const float fWidth); // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CMultiViewsTestView) 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: virtual ~CMultiViewsTestView(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif protected: // Generated message map functions protected: //{{AFX_MSG(CMultiViewsTestView) afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); afx_msg void OnDestroy(); afx_msg void OnDrawCube(); afx_msg void OnDrawSphere(); afx_msg void OnMouseCube(); afx_msg void OnMouseSphere(); 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 OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); afx_msg void OnFileOpen(); afx_msg void OnFileSave(); afx_msg void OnSize(UINT nType, int cx, int cy); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; #ifndef _DEBUG // debug version in MultiViewsTestView.cpp inline CMultiViewsTestDoc* CMultiViewsTestView::GetDocument() { return (CMultiViewsTestDoc*)m_pDocument; } #endif ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_MULTIVIEWSTESTVIEW_H__4B6AA18F_F815_11D7_8B4A_5254AB1FD91D__INCLUDED_)