Click here to Skip to main content
15,892,005 members
Articles / Desktop Programming / ATL

How to add OpenGL support to ATL controls

Rate me:
Please Sign up or sign in to vote.
4.57/5 (7 votes)
28 Sep 2002CPOL2 min read 111.9K   1.4K   44  
An article describing the step-by-step process of adding basic OpenGL support to an ATL control
<?xml version="1.0" encoding = "windows-1251"?>
<VisualStudioProject
	ProjectType="Visual C++"
	Version="7.00"
	Name="MyProjectPS"
	ProjectGUID="{D971327D-5BBA-4F8F-9C71-3FA1CC53318F}"
	Keyword="AtlPSProj">
	<Platforms>
		<Platform
			Name="Win32"/>
	</Platforms>
	<Configurations>
		<Configuration
			Name="Debug|Win32"
			OutputDirectory="DebugPS"
			IntermediateDirectory="DebugPS"
			ConfigurationType="2">
			<Tool
				Name="VCCLCompilerTool"
				PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;REGISTER_PROXY_DLL;_DEBUG"
				RuntimeLibrary="3"/>
			<Tool
				Name="VCCustomBuildTool"/>
			<Tool
				Name="VCLinkerTool"
				AdditionalDependencies="kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib"
				ModuleDefinitionFile="MyProjectPS.def"/>
			<Tool
				Name="VCMIDLTool"/>
			<Tool
				Name="VCPostBuildEventTool"
				Description="Performing registration"
				CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;"/>
			<Tool
				Name="VCPreBuildEventTool"
				Description="Checking for required files"
				CommandLine="if exist dlldata.c goto :END
echo Error: MIDL will not generate DLLDATA.C unless you have at least 1 interface in the main project.
Exit 1
:END
"/>
			<Tool
				Name="VCPreLinkEventTool"/>
			<Tool
				Name="VCResourceCompilerTool"/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"/>
			<Tool
				Name="VCWebDeploymentTool"/>
		</Configuration>
		<Configuration
			Name="Release|Win32"
			OutputDirectory="ReleasePS"
			IntermediateDirectory="ReleasePS"
			ConfigurationType="2">
			<Tool
				Name="VCCLCompilerTool"
				Optimization="3"
				PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;REGISTER_PROXY_DLL;NDEBUG"
				RuntimeLibrary="2"/>
			<Tool
				Name="VCCustomBuildTool"/>
			<Tool
				Name="VCLinkerTool"
				AdditionalDependencies="kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib"
				ModuleDefinitionFile="MyProjectPS.def"
				OptimizeReferences="2"
				EnableCOMDATFolding="2"/>
			<Tool
				Name="VCMIDLTool"/>
			<Tool
				Name="VCPostBuildEventTool"
				Description="Performing registration"
				CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;"/>
			<Tool
				Name="VCPreBuildEventTool"
				Description="Checking for required files"
				CommandLine="if exist dlldata.c goto :END
echo Error: MIDL will not generate DLLDATA.C unless you have at least 1 interface in the main project.
Exit 1
:END
"/>
			<Tool
				Name="VCPreLinkEventTool"/>
			<Tool
				Name="VCResourceCompilerTool"/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"/>
			<Tool
				Name="VCWebDeploymentTool"/>
		</Configuration>
	</Configurations>
	<Files>
		<Filter
			Name="Source Files"
			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
			<File
				RelativePath="MyProjectps.def">
			</File>
		</Filter>
		<Filter
			Name="Generated Files"
			SourceControlFiles="FALSE">
			<File
				RelativePath="MyProject_i.c">
			</File>
			<File
				RelativePath="MyProject_p.c">
			</File>
			<File
				RelativePath="dlldata.c">
			</File>
		</Filter>
	</Files>
	<Globals>
	</Globals>
</VisualStudioProject>

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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder ActiveMesa
United Kingdom United Kingdom
I work primarily with the .NET technology stack, and specialize in accelerated code production via code generation (static or dynamic), aspect-oriented programming, MDA, domain-specific languages and anything else that gets products out the door faster. My languages of choice are C# and C++, though I'm open to suggestions.

Comments and Discussions