www.pudn.com > Map_OpenGL.rar > Map_OpenGLView.h
// Map_OpenGLView.h : interface of the CMap_OpenGLView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MAP_OPENGLVIEW_H__D9507922_E7EE_458B_BC74_115A54EFF11E__INCLUDED_)
#define AFX_MAP_OPENGLVIEW_H__D9507922_E7EE_458B_BC74_115A54EFF11E__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "GLEnabledView.h"
enum ShowMap
{
nonemap,
triangle,
bit,
color,
};
class CMap_OpenGLView : public CGLEnabledView
{
protected: // create from serialization only
CMap_OpenGLView();
DECLARE_DYNCREATE(CMap_OpenGLView)
// Attributes
public:
CMap_OpenGLDoc* GetDocument();
// Operations
public:
virtual void OnDrawGL(void);
virtual void SetRC(void);
private:
CPoint mousedownpoint;
double x_angle;
double y_angle;
float Key_x,Key_y,Key_z;
static ShowMap m_showmap;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMap_OpenGLView)
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 ~CMap_OpenGLView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CMap_OpenGLView)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnTriangle();
afx_msg void OnUpdateTriangle(CCmdUI* pCmdUI);
afx_msg void OnColor();
afx_msg void OnUpdateColor(CCmdUI* pCmdUI);
afx_msg void OnBitmap();
afx_msg void OnUpdateBitmap(CCmdUI* pCmdUI);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in Map_OpenGLView.cpp
inline CMap_OpenGLDoc* CMap_OpenGLView::GetDocument()
{ return (CMap_OpenGLDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MAP_OPENGLVIEW_H__D9507922_E7EE_458B_BC74_115A54EFF11E__INCLUDED_)