Click here to Skip to main content
Click here to Skip to main content
Articles » Multimedia » OpenGL » General » Downloads
 
Add your own
alternative version
Go to top

OpenGL Win32 AppWizard

, 19 May 2003
This Custom AppWizard for VC++ 6.0 or VC++.NET creates an OpenGL enabled Win32 application suitable for demos and simple games.
oglwiz7.zip
OGLWiz7
1033
HTML
1033
Images
OGLWiz7.gif
OGLWiz7_Background.gif
Scripts
1033
Templates
1033
Templates.inf
res
Mainicon.ico
OGLWiz7.ico
OGLWiz7.vsdir
OGLWiz7.vsz
oglwiz_bin.zip
OGLWiz.awx
OGLWIZ.HLP
oglwiz_src.zip
res
OGLWiz.ico
Template
newproj.inf
confirm.inf
res
SDKTest.ICO
small.ico
hlp
OGLWiz.hpj
OGLWiz.rtf
OGLWiz.hm
OGLWIZ.HLP
OGLWiz.clv
OGLWiz.dsp
OGLWiz.dsw
// OGLWizaw.cpp : implementation file
//

#include "stdafx.h"
#include "OGLWiz.h"
#include "OGLWizaw.h"
#include "chooser.h"

#ifdef _PSEUDO_DEBUG
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

// This is called immediately after the custom AppWizard is loaded.  Initialize
//  the state of the custom AppWizard here.
void COGLWizAppWiz::InitCustomAppWiz()
{
	// Create a new dialog chooser; CDialogChooser's constructor initializes
	//  its internal array with pointers to the steps.
	m_pChooser = new CDialogChooser;

	// Set the maximum number of steps.
	SetNumberOfSteps(LAST_DLG);

	// TODO: Add any other custom AppWizard-wide initialization here.
}

// This is called just before the custom AppWizard is unloaded.
void COGLWizAppWiz::ExitCustomAppWiz()
{
	// Deallocate memory used for the dialog chooser
	ASSERT(m_pChooser != NULL);
	delete m_pChooser;
	m_pChooser = NULL;

	// TODO: Add code here to deallocate resources used by the custom AppWizard
}

// This is called when the user clicks "Create..." on the New Project dialog
//  or "Next" on one of the custom AppWizard's steps.
CAppWizStepDlg* COGLWizAppWiz::Next(CAppWizStepDlg* pDlg)
{
	
	return m_pChooser->Next(pDlg);
}

// This is called when the user clicks "Back" on one of the custom
//  AppWizard's steps.
CAppWizStepDlg* COGLWizAppWiz::Back(CAppWizStepDlg* pDlg)
{
	// Delegate to the dialog chooser
	return m_pChooser->Back(pDlg);
}

void COGLWizAppWiz::CustomizeProject(IBuildProject* pProject)
{
	using namespace DSProjectSystem;

	long lNumConfigs;
	IConfigurationsPtr pConfigs;
	IBuildProjectPtr pProj;
	CString sTemp;
	// Needed to convert IBuildProject to the DSProjectSystem namespace
	pProj.Attach((DSProjectSystem::IBuildProject*)pProject, true);

	pProj->get_Configurations(&pConfigs);
	pConfigs->get_Count(&lNumConfigs);
	//Get each individual configuration
	for (long j = 1 ; j < lNumConfigs+1 ; j++)
	{
		_bstr_t varTool;
		_bstr_t varSwitch;
		IConfigurationPtr pConfig;
		_variant_t varj = j;

		pConfig = pConfigs->Item(varj);

		varTool = "link.exe";
		if(OGLWizaw.m_Dictionary.Lookup("opengl", sTemp))
			varSwitch = "User32.lib Gdi32.lib opengl32.lib glu32.lib";
		else
			varSwitch = "User32.lib Gdi32.lib";
		pConfig->AddToolSettings(varTool, varSwitch, varj);
	}   
}


// Here we define one instance of the COGLWizAppWiz class.  You can access
//  m_Dictionary and any other public members of this class through the
//  global OGLWizaw.
COGLWizAppWiz OGLWizaw;

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Ulf Öhlén

Sweden Sweden
No Biography provided

| Advertise | Privacy | Mobile
Web02 | 2.8.140926.1 | Last Updated 20 May 2003
Article Copyright 2001 by Ulf Öhlén
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid