Win95/NT下OpenGL编程原理

出处: 作者: 日期:2007年11月26日 15时22分

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert
additional declarations immediately before the previous line.

#endif // !defined(AFX_OPENGLWND_H__3FB1AB28_
0E70_11D2_9ACA_48543300E17D__INCLUDED_)
主窗口类的实现(OpenGLWnd.cpp):
// OpenGLWnd.cpp : implementation file
//

#include "stdafx.h"
#include "OpenGLWnd.h"
#include "SimpleGLApp.h"
#include "gl\glu.h"
#include "gl\gl.h"
#include "gl\glaux.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

///////////////////////////////////////
//////////////////////////////////////
// COpenGLWnd

IMPLEMENT_DYNCREATE(COpenGLWnd, CFrameWnd)

COpenGLWnd::COpenGLWnd()
{
m_pDC = NULL;
m_hrc = 0;
LoadFrame(IDR_MAINFRAME,WS_OVERLAPPEDWINDOW
| WS_CLIPCHILDREN | WS_CLIPSIBLINGS
,NULL,NULL );
}

COpenGLWnd::~COpenGLWnd()
{
}


BEGIN_MESSAGE_MAP(COpenGLWnd, CFrameWnd)
//{{AFX_MSG_MAP(COpenGLWnd)
ON_WM_CREATE()
ON_WM_SIZE()
ON_WM_DESTROY()
ON_WM_ERASEBKGND()
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()



BOOL COpenGLWnd::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Add your specialized
code here and/or call the base class
cs.lpszClass = AfxRegisterWndClass( CS_DBLCLKS |
CS_HREDRAW |
CS_VREDRAW |
CS_SAVEBITS |
CS_NOCLOSE |
CS_OWNDC
,AfxGetApp( )-
> LoadStandardCursor(IDC_ARROW), 0 ,
AfxGetApp( )- >LoadStandardIcon(IDI_APPLICATION));
return CFrameWnd::PreCreateWindow(cs);
}

最后更新时间:2008-03-28 14:00:40
文章评论
共有 0 位网友发表了评论
用户名: 新注册) 密码: 匿名评论 [查看所有评论]

评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
您可以用以下几种方式找到此文章

考试全流程