www.pudn.com > 地表贴图.zip > GeoDrawView.h


// GeoDrawView.h : interface of the CGeoDrawView class 
// 
///////////////////////////////////////////////////////////////////////////// 
#if !defined(AFX_GEODRAWVIEW_H__8CC489B7_D307_44A5_9D0D_A1C6250C10BF__INCLUDED_) 
#define AFX_GEODRAWVIEW_H__8CC489B7_D307_44A5_9D0D_A1C6250C10BF__INCLUDED_ 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
#include "Fancedlg.h" 
#include "GLBase.h" 
 
#include  
#include  
#include  
 
class CGeoDrawDoc; 
 
class CGeoDrawView : public CView 
{ 
protected: // create from serialization only 
	CGeoDrawView(); 
	DECLARE_DYNCREATE(CGeoDrawView) 
 
// Attributes 
public: 
	CGeoDrawDoc* GetDocument(); 
		// 设置像素格式 
    bool bSetupPixelFormat(HDC hdc); 
 
    // 初始化投影变换 
    void SizeOpenGLScreen(int width, int height); 
 
    // 初始化OpenGL 
    void InitializeOpenGL(int width, int height); 
     
   // 释放程序占用的内存空间 
	   void DeInit(); 
 
	   void GLReady(CDC* pDC); 
	   void GLFinish(CDC* pDC); 
 
// Operations 
public: 
//////////////////////////////////////////// 
//  CGeoDrawDoc* m_pDoc; 
////////////////////////////////////////////// 
	HGLRC            m_hRC;  
    CDC*             m_pDC; 
/////////////////////////////////////////////// 
	////////////////////////// 
	CGLBase  m_Base; 
 
    BOOL   m_bLight; 
	BOOL   m_bTexture; 
 
	CString  m_strFileName; 
	int     g_ViewMode;	 
	double x_view,y_view,z_view; 
 
 
	// Overrides 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CGeoDrawView) 
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 ~CGeoDrawView(); 
#ifdef _DEBUG 
	virtual void AssertValid() const; 
	virtual void Dump(CDumpContext& dc) const; 
#endif 
 
protected: 
 
// Generated message map functions 
protected: 
	//{{AFX_MSG(CGeoDrawView) 
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 
	afx_msg void OnDestroy(); 
	afx_msg void OnSize(UINT nType, int cx, int cy); 
	afx_msg void OnModeData();	 
	afx_msg void OnModeData1(); 
	afx_msg void OnModeFace(); 
	afx_msg void OnModeLine(); 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
public: 
	afx_msg void OnDot(); 
	afx_msg void OnXview(); 
	afx_msg void OnYview(); 
	afx_msg void OnXadd(); 
	afx_msg void OnYadd(); 
	afx_msg void OnFranch(); 
	afx_msg void OnBackcolor(); 
	afx_msg void OnModeLight(); 
	afx_msg BOOL OnEraseBkgnd(CDC* pDC); 
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); 
	afx_msg void OnViewTexture(); 
}; 
 
#ifndef _DEBUG  // debug version in GeoDrawView.cpp 
inline CGeoDrawDoc* CGeoDrawView::GetDocument() 
   { return (CGeoDrawDoc*)m_pDocument; } 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
 
//{{AFX_INSERT_LOCATION}} 
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 
 
#endif // !defined(AFX_GEODRAWVIEW_H__8CC489B7_D307_44A5_9D0D_A1C6250C10BF__INCLUDED_)