www.pudn.com > pccode_2006910124551680.rar > OGL_MFCView.h
// OGL_MFCView.h : interface of the COGL_MFCView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_OGL_MFCVIEW_H__F8524DB3_0B8C_11D8_8323_00FD0000053F__INCLUDED_)
#define AFX_OGL_MFCVIEW_H__F8524DB3_0B8C_11D8_8323_00FD0000053F__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class COGL_MFCView : public CScrollView
{
protected: // create from serialization only
COGL_MFCView();
DECLARE_DYNCREATE(COGL_MFCView)
// Attributes
public:
COGL_MFCDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(COGL_MFCView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void OnInitialUpdate(); // called first time after construct
//}}AFX_VIRTUAL
// Implementation
public:
static GLfloat fShininess;
static GLfloat glfMatEmission[4];
static GLfloat glfMatSpecular[4];
static GLfloat glfMatDiffuse[4];
static GLfloat glfMatAmbient[4];
GLfloat m_fxAngle,m_fzAngle;
HGLRC m_hRC;
void KillScene();
void DrawScene();
void InitScene();
virtual ~COGL_MFCView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(COGL_MFCView)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnDestroy();
afx_msg void OnSelectMeterialColor();
afx_msg void OnFileOpen();
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnEditPaste();
afx_msg void OnUpdateEditPaste(CCmdUI* pCmdUI);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
void RGBToGLfloatv(COLORREF color,GLfloat&,GLfloat&,GLfloat&);
BOOL DoPasteDib(COleDataObject* pOleDataObject);
private:
BYTE* pGrayData;
int nWidth,nHeight,nBitCount,nWidthBytes;
};
#ifndef _DEBUG // debug version in OGL_MFCView.cpp
inline COGL_MFCDoc* COGL_MFCView::GetDocument()
{ return (COGL_MFCDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_OGL_MFCVIEW_H__F8524DB3_0B8C_11D8_8323_00FD0000053F__INCLUDED_)