YLGLView.cpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. // YLGLView.cpp : implementation of the CYLGLView class
  2. //
  3. #include "stdafx.h"
  4. #include "YLGL.h"
  5. #include "YLGLDoc.h"
  6. #include "YLGLView.h"
  7. #ifdef _DEBUG
  8. #define new DEBUG_NEW
  9. #undef THIS_FILE
  10. static char THIS_FILE[] = __FILE__;
  11. #endif
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CYLGLView
  14. IMPLEMENT_DYNCREATE(CYLGLView, CView)
  15. BEGIN_MESSAGE_MAP(CYLGLView, CView)
  16. //{{AFX_MSG_MAP(CYLGLView)
  17. //}}AFX_MSG_MAP
  18. END_MESSAGE_MAP()
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CYLGLView construction/destruction
  21. CYLGLView::CYLGLView()
  22. {
  23. // TODO: add construction code here
  24. }
  25. CYLGLView::~CYLGLView()
  26. {
  27. }
  28. BOOL CYLGLView::PreCreateWindow(CREATESTRUCT& cs)
  29. {
  30. // TODO: Modify the Window class or styles here by modifying
  31. // the CREATESTRUCT cs
  32. return CView::PreCreateWindow(cs);
  33. }
  34. /////////////////////////////////////////////////////////////////////////////
  35. // CYLGLView drawing
  36. void CYLGLView::OnDraw(CDC* pDC)
  37. {
  38. CYLGLDoc* pDoc = GetDocument();
  39. ASSERT_VALID(pDoc);
  40. // TODO: add draw code for native data here
  41. }
  42. /////////////////////////////////////////////////////////////////////////////
  43. // CYLGLView diagnostics
  44. #ifdef _DEBUG
  45. void CYLGLView::AssertValid() const
  46. {
  47. CView::AssertValid();
  48. }
  49. void CYLGLView::Dump(CDumpContext& dc) const
  50. {
  51. CView::Dump(dc);
  52. }
  53. CYLGLDoc* CYLGLView::GetDocument() // non-debug version is inline
  54. {
  55. ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CYLGLDoc)));
  56. return (CYLGLDoc*)m_pDocument;
  57. }
  58. #endif //_DEBUG
  59. /////////////////////////////////////////////////////////////////////////////
  60. // CYLGLView message handlers
  61. void CYLGLView::OnInitialUpdate()
  62. {
  63. CView::OnInitialUpdate();
  64. // TODO: Add your specialized code here and/or call the base class
  65. }