www.pudn.com > WaterWaveInOpengl.rar > MyOpenGLFrameView.h


// MyOpenGLFrameView.h : interface of the CMyOpenGLFrameView class 
// 
///////////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_MYOPENGLFRAMEVIEW_H__57C3D838_C310_4960_A316_D8A8D3202CD8__INCLUDED_) 
#define AFX_MYOPENGLFRAMEVIEW_H__57C3D838_C310_4960_A316_D8A8D3202CD8__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
 
class CMyOpenGLFrameView : public CView 
{ 
protected: // create from serialization only 
	CMyOpenGLFrameView(); 
	DECLARE_DYNCREATE(CMyOpenGLFrameView) 
 
// Attributes 
public: 
	CMyOpenGLFrameDoc* GetDocument(); 
 
// Operations 
public: 
	//add down 
	CPalette    m_cPalette; 
	CPalette    *m_pOldPalette; 
	CRect       m_oldRect; 
	float       m_fRadius; 
 
	GLfloat	rtri;					// 用于三角形的角度 ( 新增 ) 
	GLfloat	rquad;					// 用于四边形的角度 ( 新增 ) 
 
	void Init(); 
	void CreateRGBPalette(void); 
	BOOL bSetupPixelFormat(void); 
	unsigned char ComponentFromIndex(int i, UINT nbits, UINT shift); 
	void DrawScene(void); 
	//add up 
 
// Overrides 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CMyOpenGLFrameView) 
	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: 
	BOOL m_bFullView; 
	virtual ~CMyOpenGLFrameView(); 
#ifdef _DEBUG 
	virtual void AssertValid() const; 
	virtual void Dump(CDumpContext& dc) const; 
#endif 
 
protected: 
 
// Generated message map functions 
protected: 
	//{{AFX_MSG(CMyOpenGLFrameView) 
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 
	afx_msg void OnDestroy(); 
	afx_msg BOOL OnEraseBkgnd(CDC* pDC); 
	afx_msg void OnSize(UINT nType, int cx, int cy); 
	afx_msg void OnTimer(UINT nIDEvent); 
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); 
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point); 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
}; 
 
#ifndef _DEBUG  // debug version in MyOpenGLFrameView.cpp 
inline CMyOpenGLFrameDoc* CMyOpenGLFrameView::GetDocument() 
   { return (CMyOpenGLFrameDoc*)m_pDocument; } 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
 
//{{AFX_INSERT_LOCATION}} 
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 
 
#endif // !defined(AFX_MYOPENGLFRAMEVIEW_H__57C3D838_C310_4960_A316_D8A8D3202CD8__INCLUDED_)