// File Sample3D.h
class CSample3DApp : public CWinApp
{
CWnd * pMainWndToDelete;
public:
virtual BOOL InitInstance();
virtual int ExitInstance();
};
// File Sample3D.cpp
#include "stdafx.h"
#include "oglctrl.h"
#include "Sample3D.h"
#include "MyGraph.h"
CSample3DApp Sample3DApp;
BOOL CSample3DApp::InitInstance()
{
pMainWndToDelete=m_pMainWnd=new CMyGraph;
m_pMainWnd->
CreateEx(0,"MyOpenGL","Sample3D",
WS_OVERLAPPEDWINDOW,
100,100,300,300,0,0);
m_pMainWnd->ShowWindow(m_nCmdShow);
m_pMainWnd->UpdateWindow();
return TRUE;
}
int CSample3DApp::ExitInstance()
{
delete pMainWndToDelete;
return CWinApp::ExitInstance();
}
//End of File