www.gusucode.com > 与三维有关的一个VC++图形处理程序-源码程序 > 与三维有关的一个VC++图形处理程序-源码程序/code/DemToGL.cpp
// DemToGL.cpp : Defines the class behaviors for the application. // Download by http://www.NewXing.com #include "stdafx.h" #include "DemToGL.h" #include "DemToGLDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CDemToGLApp BEGIN_MESSAGE_MAP(CDemToGLApp, CWinApp) //{{AFX_MSG_MAP(CDemToGLApp) // NOTE - the ClassWizard will add and remove mapping macros here. // DO NOT EDIT what you see in these blocks of generated code! //}}AFX_MSG ON_COMMAND(ID_HELP, CWinApp::OnHelp) END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CDemToGLApp construction CDemToGLApp::CDemToGLApp() { // TODO: add construction code here, // Place all significant initialization in InitInstance } ///////////////////////////////////////////////////////////////////////////// // The one and only CDemToGLApp object CDemToGLApp theApp; ///////////////////////////////////////////////////////////////////////////// // CDemToGLApp initialization BOOL CDemToGLApp::InitInstance() { AfxEnableControlContainer(); SetDialogBkColor(RGB(0,0,145),RGB(255,255,0));//用于设置对话框的颜色 #ifdef _AFXDLL Enable3dControls(); // Call this when using MFC in a shared DLL #else Enable3dControlsStatic(); // Call this when linking to MFC statically #endif CDemToGLDlg dlg; m_pMainWnd = &dlg; int nResponse = dlg.DoModal(); if (nResponse == IDOK) { } else if (nResponse == IDCANCEL) { } return FALSE; }