www.pudn.com > Screensaver.rar > 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#include #include #include #include ///////////////////////////////////////////////////////////////////////////// // 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 void OnLButtonDblClk(UINT nFlags, CPoint point); afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); //}}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_)