Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
mfcSimpleView.h
1 // mfcSimpleView.h : interface of the CSimpleView class
2 //
3 // Copyright (c) 2001 Virtual Terrain Project
4 // Free for all uses, see license.txt for details.
5 //
6 
7 #if !defined(_SIMPLEVIEW_H_INCLUDED_)
8 #define _SIMPLEVIEW_H_INCLUDED_
9 
10 #if _MSC_VER > 1000
11 #pragma once
12 #endif // _MSC_VER > 1000
13 
14 
15 class CSimpleView : public CView
16 {
17 protected: // create from serialization only
18  CSimpleView();
19  DECLARE_DYNCREATE(CSimpleView)
20 
21 // Attributes
22 public:
23  CSimpleDoc* GetDocument();
24  HGLRC m_hGLContext;
25 
26 // Operations
27 public:
28 
29 // Overrides
30  // ClassWizard generated virtual function overrides
31  //{{AFX_VIRTUAL(CSimpleView)
32  public:
33  virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
34  protected:
35  virtual void OnDraw(CDC* pDC);
36  //}}AFX_VIRTUAL
37 
38 // Implementation
39 public:
40  BOOL CreateViewGLContext(HDC hDC);
41  BOOL SetWindowPixelFormat(HDC hDC);
42  virtual ~CSimpleView();
43 #ifdef _DEBUG
44  virtual void AssertValid() const;
45  virtual void Dump(CDumpContext& dc) const;
46 #endif
47 
48 protected:
49  int m_GLPixelIndex;
50 
51 // Generated message map functions
52 protected:
53  //{{AFX_MSG(CSimpleView)
54  afx_msg void OnDestroy();
55  afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
56  afx_msg void OnSize(UINT nType, int cx, int cy);
57  afx_msg void OnPaint();
58  afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
59  afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
60  afx_msg void OnMouseMove(UINT nFlags, CPoint point);
61  afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
62  afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
63  afx_msg void OnMButtonDown(UINT nFlags, CPoint point);
64  afx_msg void OnMButtonUp(UINT nFlags, CPoint point);
65  //}}AFX_MSG
66  DECLARE_MESSAGE_MAP()
67 };
68 
69 #ifndef _DEBUG // debug version in mfcSimpleView.cpp
70 inline CSimpleDoc* CSimpleView::GetDocument()
71  { return (CSimpleDoc*)m_pDocument; }
72 #endif
73 
75 
76 //{{AFX_INSERT_LOCATION}}
77 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
78 
79 #endif // !defined(_SIMPLEVIEW_H_INCLUDED_)