Text3DView.h
上传用户:tengyuc
上传日期:2007-08-14
资源大小:722k
文件大小:2k
源码类别:

OpenGL

开发平台:

Visual C++

  1. // Text3DView.h : interface of the CText3DView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_MYSDOPENGLVIEW_H__75C5AAEC_37B0_4A8B_9132_9A0C663F6DDC__INCLUDED_)
  5. #define AFX_MYSDOPENGLVIEW_H__75C5AAEC_37B0_4A8B_9132_9A0C663F6DDC__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class CText3DView : public CView
  10. {
  11. protected: // create from serialization only
  12. CText3DView();
  13. DECLARE_DYNCREATE(CText3DView)
  14. // Attributes
  15. public:
  16. CText3DDoc* GetDocument();
  17. // Operations
  18. public:
  19. // Overrides
  20. // ClassWizard generated virtual function overrides
  21. //{{AFX_VIRTUAL(CText3DView)
  22. public:
  23. virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  24. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  25. protected:
  26. virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  27. virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  28. virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  29. //}}AFX_VIRTUAL
  30. // Implementation
  31. public:
  32. virtual ~CText3DView();
  33. /////////////////////////////////////////////////////////////////
  34. //添加成员函数与成员变量
  35. BOOL RenderScene();
  36. BOOL SetupPixelFormat(void);
  37. void SetLogicalPalette(void);
  38. BOOL InitializeOpenGL(CDC* pDC);
  39. HGLRC m_hRC; //OpenGL绘制描述表
  40. HPALETTE m_hPalette; //OpenGL调色板
  41. CDC*     m_pDC; //OpenGL设备描述表
  42. /////////////////////////////////////////////////////////////////
  43. #ifdef _DEBUG
  44. virtual void AssertValid() const;
  45. virtual void Dump(CDumpContext& dc) const;
  46. #endif
  47. protected:
  48. // Generated message map functions
  49. protected:
  50. //{{AFX_MSG(CText3DView)
  51. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  52. afx_msg void OnDestroy();
  53. afx_msg void OnSize(UINT nType, int cx, int cy);
  54. afx_msg void OnTimer(UINT nIDEvent);
  55. //}}AFX_MSG
  56. DECLARE_MESSAGE_MAP()
  57. };
  58. #ifndef _DEBUG  // debug version in Text3DView.cpp
  59. inline CText3DDoc* CText3DView::GetDocument()
  60.    { return (CText3DDoc*)m_pDocument; }
  61. #endif
  62. /////////////////////////////////////////////////////////////////////////////
  63. //{{AFX_INSERT_LOCATION}}
  64. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  65. #endif // !defined(AFX_MYSDOPENGLVIEW_H__75C5AAEC_37B0_4A8B_9132_9A0C663F6DDC__INCLUDED_)