www.pudn.com > Map_OpenGL.rar > GLEnabledView.h


#pragma once 
 
 
 
// CGLEnabledView 视图 
 
class CGLEnabledView : public CView 
{ 
	DECLARE_DYNCREATE(CGLEnabledView) 
 
protected: 
	CGLEnabledView();           // 动态创建所使用的受保护的构造函数 
	virtual ~CGLEnabledView(); 
 
public: 
	virtual void OnDraw(CDC* pDC);      // 重写以绘制此视图 
#ifdef _DEBUG 
	virtual void AssertValid() const; 
	virtual void Dump(CDumpContext& dc) const; 
#endif 
 
protected: 
	DECLARE_MESSAGE_MAP() 
 
public: 
	// 客户区的大小 
	CRect m_ClientRect; 
	// 窗口的比例 
	double m_dAspectRatio; 
	// OpenGL绘制描述表 
	HGLRC m_hRC; 
	// OpenGL调色板 
	HPALETTE m_hPalette; 
	// 设备描述表 
	CDC* m_pDC; 
	bool SetupPixelFormat(void); 
	void SetLogicalPalette(void); 
	bool InitiaLizeOpenGL(CDC* pDC); 
	virtual void OnDrawGL(void); 
	virtual void SetRC(void); 
	afx_msg void OnSize(UINT nType, int cx, int cy); 
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 
	afx_msg void OnDestroy(); 
protected: 
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 
};