这是用MFC编写的使用openGL的视口代码。 CChildView::CChildView() 构造函数 CChildView::~CChildVie...
代码说明:
这是用MFC编写的使用openGL的视口代码。 CChildView::CChildView() 构造函数 CChildView::~CChildView() 析构函数 BEGIN_MESSAGE_MAP(CChildView,CWnd ) 消息映射 BOOL CChildView::PreCreateWindow(CREATESTRUCT& cs)创建窗口重新设置窗口参数 BOOL CChildView::PreTranslateMessage( MSG* pMsg ) 翻译消息 int CChildView::OnCreate( LPCREATESTRUCT lpCreateStruct ) 窗口创建好后进入此函数 完成openGL的初始化 void CChildView::OnSize( UINT nType, int cx, int cy ) 当窗口大小发生改变时重新设置OPenGL的视口参数。 void CChildView::OnDestroy() 销毁窗口 -It is written in MFC to use openGL viewport code. CChildView:: CChildView () constructor CChildView:: ~ CChildView () destructor BEGIN_MESSAGE_MAP (CChildView, CWnd) message map BOOL CChildView:: PreCreateWindow (CREATESTRUCT & cs) to create a window to reset the window parameters BOOL CChildView:: PreTranslateMessage (MSG* pMsg ) translation of the message int CChildView:: OnCreate (LPCREATESTRUCT lpCreateStruct) window is created and entered this function to complete openGL initialization void CChildView:: OnSize (UINT nType, int
下载说明:请别用迅雷下载,失败请重下,重下不扣分!