📄 childview.h
字号:
// ChildView.h : interface of the CChildView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_CHILDVIEW_H__4D6F05F6_4114_4F06_932B_512C764B1176__INCLUDED_)
#define AFX_CHILDVIEW_H__4D6F05F6_4114_4F06_932B_512C764B1176__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <gl/gl.h>
#include <gl/glu.h>
#include <gl/glaux.h>
#include <process.h>
#include <mmsystem.h>
/////////////////////////////////////////////////////////////////////////////
// CChildView window
class CChildView : public CWnd
{
// Construction
public:
CChildView();
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CChildView)
protected:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual BOOL PreTranslateMessage( MSG* pMsg );
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CChildView();
// Generated message map functions
protected:
//{{AFX_MSG(CChildView)
afx_msg int OnCreate( LPCREATESTRUCT lpCreateStruct );
afx_msg void OnSize( UINT nType, int cx, int cy );
afx_msg BOOL OnEraseBkgnd( CDC* pDC );
afx_msg void OnPaint();
afx_msg void OnTimer( UINT nIDEvent );
afx_msg void OnDestroy();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
VOID InitOpenGL ();
VOID DrawOpenGLScene();
BOOL LoadOpenGLTextures();
BOOL SetupPixelFormat ();
VOID SetDefaultTextureParams();
private:
CClientDC* m_pClientDC;
BOOL LoadImageFromResID( UINT nResID, GLuint& texture );
typedef enum {
E_TEXTURECOUNT = 4,
E_SNOWCOUNT = 2010
};
GLuint m_textureSnow[ E_TEXTURECOUNT ];
typedef struct tagSNOW {
GLfloat x;
GLfloat y;
GLfloat z;
GLfloat xrot;
GLfloat yrot;
GLfloat zrot;
GLfloat dropSpeed;
GLfloat rotSpeed;
int nIndexTexture;
} SNOW, * LPSNOW;
SNOW m_snow[ E_SNOWCOUNT ];
VOID InitSnow();
int m_nFloorIndex;
private:
CWinThread* m_lpThread;
static UINT Thread( LPVOID lParam );
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CHILDVIEW_H__4D6F05F6_4114_4F06_932B_512C764B1176__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -