diff options
Diffstat (limited to 'examples/14.Win32Window')
| -rw-r--r-- | examples/14.Win32Window/Makefile | 38 | ||||
| -rw-r--r-- | examples/14.Win32Window/Win32Window.cbp | 43 | ||||
| -rw-r--r-- | examples/14.Win32Window/Win32Window.dev | 59 | ||||
| -rw-r--r-- | examples/14.Win32Window/Win32Window.vcproj | 165 | ||||
| -rw-r--r-- | examples/14.Win32Window/Win32Window_vc10.vcxproj | 239 | ||||
| -rw-r--r-- | examples/14.Win32Window/Win32Window_vc11.vcxproj | 239 | ||||
| -rw-r--r-- | examples/14.Win32Window/Win32Window_vc12.vcxproj | 239 | ||||
| -rw-r--r-- | examples/14.Win32Window/Win32Window_vc8.vcproj | 232 | ||||
| -rw-r--r-- | examples/14.Win32Window/Win32Window_vc9.vcproj | 232 | ||||
| -rw-r--r-- | examples/14.Win32Window/main.cpp | 251 | ||||
| -rw-r--r-- | examples/14.Win32Window/tutorial.html | 210 |
11 files changed, 1947 insertions, 0 deletions
diff --git a/examples/14.Win32Window/Makefile b/examples/14.Win32Window/Makefile new file mode 100644 index 0000000..e76f2ff --- /dev/null +++ b/examples/14.Win32Window/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples
+# It's usually sufficient to change just the target name and source file list
+# and be sure that CXX is set to a valid compiler
+Target = 14.Win32Window
+Sources = main.cpp
+
+# general compiler settings
+CPPFLAGS = -I../../include -I/usr/X11R6/include
+CXXFLAGS = -O3 -ffast-math
+#CXXFLAGS = -g -Wall
+
+#default target is Linux
+all: all_linux
+
+ifeq ($(HOSTTYPE), x86_64)
+LIBSELECT=64
+endif
+
+# target specific settings
+all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
+all_linux clean_linux: SYSTEM=Linux
+all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
+all_win32 clean_win32: SYSTEM=Win32-gcc
+all_win32 clean_win32: SUF=.exe
+# name of the binary - only valid for targets which set SYSTEM
+DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
+
+all_linux all_win32:
+ $(warning Building...)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
+
+clean: clean_linux clean_win32
+ $(warning Cleaning...)
+
+clean_linux clean_win32:
+ @$(RM) $(DESTPATH)
+
+.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/examples/14.Win32Window/Win32Window.cbp b/examples/14.Win32Window/Win32Window.cbp new file mode 100644 index 0000000..06f310b --- /dev/null +++ b/examples/14.Win32Window/Win32Window.cbp @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht Example 14 Win32 Window" /> + <Option platforms="Windows;" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="..\..\bin\Win32-gcc\Win32Window" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectCompilerOptionsRelation="0" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add library="opengl32" /> + <Add library="gdi32" /> + <Add directory="..\..\lib\Win32-gcc" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="..\..\include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/examples/14.Win32Window/Win32Window.dev b/examples/14.Win32Window/Win32Window.dev new file mode 100644 index 0000000..6192563 --- /dev/null +++ b/examples/14.Win32Window/Win32Window.dev @@ -0,0 +1,59 @@ +[Project]
+FileName=example.dev
+Name=Irrlicht Example 14 Win32 Window
+UnitCount=1
+Type=1
+Ver=1
+ObjFiles=
+Includes=..\..\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=
+CppCompiler=
+Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_
+IsCpp=1
+Icon=
+ExeOutput=../../bin/Win32-gcc
+ObjectOutput=obj
+OverrideOutput=1
+OverrideOutputName=14.Win32Window.exe
+HostApplication=
+Folders=
+CommandLine=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+UseCustomMakefile=0
+CustomMakefile=
+
+[Unit1]
+FileName=main.cpp
+CompileCpp=1
+Folder=Projekt1
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Irrlicht Engine example compiled using DevCpp and gcc
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
diff --git a/examples/14.Win32Window/Win32Window.vcproj b/examples/14.Win32Window/Win32Window.vcproj new file mode 100644 index 0000000..c8576c7 --- /dev/null +++ b/examples/14.Win32Window/Win32Window.vcproj @@ -0,0 +1,165 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="14.Win32Window"
+ ProjectGUID="{3A73BAFE-60DE-4E40-9E37-710760BC25C6}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/Win32Window.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="opengl32.lib"
+ OutputFile="..\..\bin\Win32-VisualStudio\14.Win32Window.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/Win32Window.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Win32Window.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/Win32Window.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="opengl32.lib"
+ OutputFile="..\..\bin\Win32-VisualStudio\14.Win32Window.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/Win32Window.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Win32Window.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/14.Win32Window/Win32Window_vc10.vcxproj b/examples/14.Win32Window/Win32Window_vc10.vcxproj new file mode 100644 index 0000000..0ea47db --- /dev/null +++ b/examples/14.Win32Window/Win32Window_vc10.vcxproj @@ -0,0 +1,239 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>14.Win32Window</ProjectName>
+ <ProjectGuid>{772FBE05-D05A-467B-9842-BEC409EEA8D0}</ProjectGuid>
+ <RootNamespace>Win32Window</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win32-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win64-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win32-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win64-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/14.Win32Window/Win32Window_vc11.vcxproj b/examples/14.Win32Window/Win32Window_vc11.vcxproj new file mode 100644 index 0000000..0ea47db --- /dev/null +++ b/examples/14.Win32Window/Win32Window_vc11.vcxproj @@ -0,0 +1,239 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>14.Win32Window</ProjectName>
+ <ProjectGuid>{772FBE05-D05A-467B-9842-BEC409EEA8D0}</ProjectGuid>
+ <RootNamespace>Win32Window</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win32-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win64-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win32-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win64-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/14.Win32Window/Win32Window_vc12.vcxproj b/examples/14.Win32Window/Win32Window_vc12.vcxproj new file mode 100644 index 0000000..814a398 --- /dev/null +++ b/examples/14.Win32Window/Win32Window_vc12.vcxproj @@ -0,0 +1,239 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>14.Win32Window</ProjectName>
+ <ProjectGuid>{772FBE05-D05A-467B-9842-BEC409EEA8D0}</ProjectGuid>
+ <RootNamespace>Win32Window</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win32-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>.\Debug/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win64-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win32-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>.\Release/Win32Window.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c07</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin\Win64-VisualStudio\14.Win32Window.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/examples/14.Win32Window/Win32Window_vc8.vcproj b/examples/14.Win32Window/Win32Window_vc8.vcproj new file mode 100644 index 0000000..efbf43d --- /dev/null +++ b/examples/14.Win32Window/Win32Window_vc8.vcproj @@ -0,0 +1,232 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="14.Win32Window_vc8"
+ ProjectGUID="{772FBE05-D05A-467B-9842-BEC409EEA8D0}"
+ RootNamespace="Win32Window_vc8"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Win32Window.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/Win32Window.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="kernel32.lib user32.lib gdi32.lib opengl32.lib"
+ OutputFile="..\..\bin\Win32-VisualStudio\14.Win32Window.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/Win32Window.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Win32Window.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/Win32Window.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\Win32-VisualStudio\14.Win32Window.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/Win32Window.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/14.Win32Window/Win32Window_vc9.vcproj b/examples/14.Win32Window/Win32Window_vc9.vcproj new file mode 100644 index 0000000..2902fba --- /dev/null +++ b/examples/14.Win32Window/Win32Window_vc9.vcproj @@ -0,0 +1,232 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="14.Win32Window_vc9"
+ ProjectGUID="{772FBE05-D05A-467B-9842-BEC409EEA8D0}"
+ RootNamespace="Win32Window_vc9"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Win32Window.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Debug/Win32Window.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="kernel32.lib user32.lib gdi32.lib opengl32.lib"
+ OutputFile="..\..\bin\Win32-VisualStudio\14.Win32Window.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/Win32Window.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Win32Window.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/Win32Window.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3079"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="opengl32.lib"
+ OutputFile="..\..\bin\Win32-VisualStudio\14.Win32Window.exe"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
+ ProgramDatabaseFile=".\Release/Win32Window.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/14.Win32Window/main.cpp b/examples/14.Win32Window/main.cpp new file mode 100644 index 0000000..33d111e --- /dev/null +++ b/examples/14.Win32Window/main.cpp @@ -0,0 +1,251 @@ +/** Example 014 Win32 Window
+
+This example only runs under MS Windows and demonstrates that Irrlicht can
+render inside a win32 window. MFC and .NET Windows.Forms windows are possible,
+too.
+
+In the beginning, we create a windows window using the windows API. I'm not
+going to explain this code, because it is windows specific. See the MSDN or a
+windows book for details.
+*/
+
+#include <irrlicht.h>
+#ifndef _IRR_WINDOWS_
+#error Windows only example
+#else
+#include <windows.h> // this example only runs with windows
+#include <iostream>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#pragma comment(lib, "irrlicht.lib")
+
+HWND hOKButton;
+HWND hWnd;
+
+static LRESULT CALLBACK CustomWndProc(HWND hWnd, UINT message,
+ WPARAM wParam, LPARAM lParam)
+{
+ switch (message)
+ {
+ case WM_COMMAND:
+ {
+ HWND hwndCtl = (HWND)lParam;
+ int code = HIWORD(wParam);
+
+ if (hwndCtl == hOKButton)
+ {
+ DestroyWindow(hWnd);
+ PostQuitMessage(0);
+ return 0;
+ }
+ }
+ break;
+ case WM_DESTROY:
+ PostQuitMessage(0);
+ return 0;
+
+ }
+
+ return DefWindowProc(hWnd, message, wParam, lParam);
+}
+
+
+/*
+ Now ask for the driver and create the Windows specific window.
+*/
+int main()
+{
+ // ask user for driver
+ video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+ if (driverType==video::EDT_COUNT)
+ return 1;
+
+ printf("Select the render window (some dead window may exist too):\n"\
+ " (a) Window with button (via CreationParam)\n"\
+ " (b) Window with button (via beginScene)\n"\
+ " (c) Own Irrlicht window (default behavior)\n"\
+ " (otherKey) exit\n\n");
+
+ char key;
+ std::cin >> key;
+ if (key != 'a' && key != 'b' && key != 'c')
+ return 1;
+
+ HINSTANCE hInstance = 0;
+ // create dialog
+
+ const char* Win32ClassName = "CIrrlichtWindowsTestDialog";
+
+ WNDCLASSEX wcex;
+ wcex.cbSize = sizeof(WNDCLASSEX);
+ wcex.style = CS_HREDRAW | CS_VREDRAW;
+ wcex.lpfnWndProc = (WNDPROC)CustomWndProc;
+ wcex.cbClsExtra = 0;
+ wcex.cbWndExtra = DLGWINDOWEXTRA;
+ wcex.hInstance = hInstance;
+ wcex.hIcon = NULL;
+ wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW);
+ wcex.lpszMenuName = 0;
+ wcex.lpszClassName = Win32ClassName;
+ wcex.hIconSm = 0;
+
+ RegisterClassEx(&wcex);
+
+ DWORD style = WS_SYSMENU | WS_BORDER | WS_CAPTION |
+ WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SIZEBOX;
+
+ int windowWidth = 440;
+ int windowHeight = 380;
+
+ hWnd = CreateWindow( Win32ClassName, "Irrlicht Win32 window example",
+ style, 100, 100, windowWidth, windowHeight,
+ NULL, NULL, hInstance, NULL);
+
+ RECT clientRect;
+ GetClientRect(hWnd, &clientRect);
+ windowWidth = clientRect.right;
+ windowHeight = clientRect.bottom;
+
+ // create ok button
+
+ hOKButton = CreateWindow("BUTTON", "OK - Close", WS_CHILD | WS_VISIBLE | BS_TEXT,
+ windowWidth - 160, windowHeight - 40, 150, 30, hWnd, NULL, hInstance, NULL);
+
+ // create some text
+
+ CreateWindow("STATIC", "This is Irrlicht running inside a standard Win32 window.\n"\
+ "Also mixing with MFC and .NET Windows.Forms is possible.",
+ WS_CHILD | WS_VISIBLE, 20, 20, 400, 40, hWnd, NULL, hInstance, NULL);
+
+ // create window to put irrlicht in
+
+ HWND hIrrlichtWindow = CreateWindow("BUTTON", "",
+ WS_CHILD | WS_VISIBLE | BS_OWNERDRAW,
+ 50, 80, 320, 220, hWnd, NULL, hInstance, NULL);
+ video::SExposedVideoData videodata((key=='b')?hIrrlichtWindow:0);
+
+ /*
+ So now that we have some window, we can create an Irrlicht device
+ inside of it. We use Irrlicht createEx() function for this. We only
+ need the handle (HWND) to that window, set it as windowsID parameter
+ and start up the engine as usual. That's it.
+ */
+ // create irrlicht device in the button window
+
+ irr::SIrrlichtCreationParameters param;
+ param.DriverType = driverType;
+ if (key=='a')
+ param.WindowId = reinterpret_cast<void*>(hIrrlichtWindow);
+
+ irr::IrrlichtDevice* device = irr::createDeviceEx(param);
+ if (!device)
+ return 1;
+
+ // setup a simple 3d scene
+
+ irr::scene::ISceneManager* smgr = device->getSceneManager();
+ video::IVideoDriver* driver = device->getVideoDriver();
+
+ if (driverType==video::EDT_OPENGL)
+ {
+ HDC HDc=GetDC(hIrrlichtWindow);
+ PIXELFORMATDESCRIPTOR pfd={0};
+ pfd.nSize=sizeof(PIXELFORMATDESCRIPTOR);
+ int pf = GetPixelFormat(HDc);
+ DescribePixelFormat(HDc, pf, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
+ pfd.dwFlags |= PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW;
+ pfd.cDepthBits=16;
+ pf = ChoosePixelFormat(HDc, &pfd);
+ SetPixelFormat(HDc, pf, &pfd);
+ videodata.OpenGLWin32.HDc = HDc;
+ videodata.OpenGLWin32.HRc=wglCreateContext(HDc);
+ wglShareLists((HGLRC)driver->getExposedVideoData().OpenGLWin32.HRc, (HGLRC)videodata.OpenGLWin32.HRc);
+ }
+ scene::ICameraSceneNode* cam = smgr->addCameraSceneNode();
+ cam->setTarget(core::vector3df(0,0,0));
+
+ scene::ISceneNodeAnimator* anim =
+ smgr->createFlyCircleAnimator(core::vector3df(0,15,0), 30.0f);
+ cam->addAnimator(anim);
+ anim->drop();
+
+ scene::ISceneNode* cube = smgr->addCubeSceneNode(20);
+
+ cube->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
+ cube->setMaterialTexture(1, driver->getTexture("../../media/water.jpg"));
+ cube->setMaterialFlag( video::EMF_LIGHTING, false );
+ cube->setMaterialType( video::EMT_REFLECTION_2_LAYER );
+
+ smgr->addSkyBoxSceneNode(
+ driver->getTexture("../../media/irrlicht2_up.jpg"),
+ driver->getTexture("../../media/irrlicht2_dn.jpg"),
+ driver->getTexture("../../media/irrlicht2_lf.jpg"),
+ driver->getTexture("../../media/irrlicht2_rt.jpg"),
+ driver->getTexture("../../media/irrlicht2_ft.jpg"),
+ driver->getTexture("../../media/irrlicht2_bk.jpg"));
+
+ // show and execute dialog
+
+ ShowWindow(hWnd , SW_SHOW);
+ UpdateWindow(hWnd);
+
+ // do message queue
+
+ /*
+ Now the only thing missing is the drawing loop using
+ IrrlichtDevice::run(). We do this as usual. But instead of this, there
+ is another possibility: You can also simply use your own message loop
+ using GetMessage, DispatchMessage and whatever. Calling
+ Device->run() will cause Irrlicht to dispatch messages internally too.
+ You need not call Device->run() if you want to do your own message
+ dispatching loop, but Irrlicht will not be able to fetch user input
+ then and you have to do it on your own using the window messages,
+ DirectInput, or whatever.
+ */
+
+ while (device->run())
+ {
+ driver->beginScene(true, true, 0, videodata);
+ smgr->drawAll();
+ driver->endScene();
+ }
+
+ /*
+ The alternative, own message dispatching loop without Device->run()
+ would look like this:
+ */
+
+ /*MSG msg;
+ while (true)
+ {
+ if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
+ {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+
+ if (msg.message == WM_QUIT)
+ break;
+ }
+
+ // advance virtual time
+ device->getTimer()->tick();
+
+ // draw engine picture
+ driver->beginScene(true, true, 0, (key=='c')?hIrrlichtWindow:0);
+ smgr->drawAll();
+ driver->endScene();
+ }*/
+
+ device->closeDevice();
+ device->drop();
+
+ return 0;
+}
+#endif // if windows
+
+/*
+That's it, Irrlicht now runs in your own windows window.
+**/
diff --git a/examples/14.Win32Window/tutorial.html b/examples/14.Win32Window/tutorial.html new file mode 100644 index 0000000..819e8ec --- /dev/null +++ b/examples/14.Win32Window/tutorial.html @@ -0,0 +1,210 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Tutorial 14: Win32 Window</title> +<html xmlns="http://www.w3.org/1999/xhtml"> +<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit. + Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder. + Feel free to improve :) + --> +<style> +body, table, div, p, dl { + font: 400 14px/22px; +} +body { + background-color: #F0F0F0; + color: black; + margin-left: 5%; + margin-right: 5%; +} +p.reference, p.definition { + font: 400 14px/22px; +} +.title { + font: 400 14px/28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} +caption { + font-weight: bold; +} +h3.version { + font-size: 90%; + text-align: center; +} +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} +.contents a:visited { + color: #4665A2; +} +a:hover { + text-decoration: underline; +} +a.el { + font-weight: bold; +} +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} +div.center img { + border: 0px; +} +span.keyword { + color: #008000 +} +span.keywordtype { + color: #604020 +} +span.keywordflow { + color: #e08000 +} +span.comment { + color: #800000 +} +span.preprocessor { + color: #806020 +} +span.stringliteral { + color: #002080 +} +span.charliteral { + color: #008080 +} +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} +address { + font-style: normal; + color: #2A3D61; +} +div.header { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} +div.headertitle { + padding: 5px 5px 5px 10px; +} +.image { + text-align: center; +} +.caption { + font-weight: bold; +} +div.zoom { + border: 1px solid #90A5CE; +} +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} +</style> +</head> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<!--END TITLEAREA--> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">Tutorial 14: Win32 Window </div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><div class="image"> +<img src="../../media/014shot.jpg" alt="014shot.jpg"/> +</div> + <p>This example only runs under MS Windows and demonstrates that Irrlicht can render inside a win32 window. MFC and .NET Windows.Forms windows are possible, too.</p> +<p>In the beginning, we create a windows window using the windows API. I'm not going to explain this code, because it is windows specific. See the MSDN or a windows book for details. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div><div class="line"><span class="preprocessor">#ifndef _IRR_WINDOWS_</span></div><div class="line"><span class="preprocessor">#error Windows only example</span></div><div class="line"><span class="preprocessor">#else</span></div><div class="line"><span class="preprocessor">#include <windows.h></span> <span class="comment">// this example only runs with windows</span></div><div class="line"><span class="preprocessor">#include <iostream></span></div><div class="line"><span class="preprocessor">#include "driverChoice.h"</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span>irr;</div><div class="line"></div><div class="line"><span class="preprocessor">#pragma comment(lib, "irrlicht.lib")</span></div><div class="line"></div><div class="line">HWND hOKButton;</div><div class="line">HWND hWnd;</div><div class="line"></div><div class="line"><span class="keyword">static</span> LRESULT CALLBACK CustomWndProc(HWND hWnd, UINT message,</div><div class="line"> WPARAM wParam, LPARAM lParam)</div><div class="line">{</div><div class="line"> <span class="keywordflow">switch</span> (message)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> WM_COMMAND:</div><div class="line"> {</div><div class="line"> HWND hwndCtl = (HWND)lParam;</div><div class="line"> <span class="keywordtype">int</span> code = HIWORD(wParam);</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (hwndCtl == hOKButton)</div><div class="line"> {</div><div class="line"> DestroyWindow(hWnd);</div><div class="line"> PostQuitMessage(0);</div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> WM_DESTROY:</div><div class="line"> PostQuitMessage(0);</div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line"></div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> DefWindowProc(hWnd, message, wParam, lParam);</div><div class="line">}</div></div><!-- fragment --><p> Now ask for the driver and create the Windows specific window. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line"> <span class="comment">// ask user for driver</span></div><div class="line"> video::E_DRIVER_TYPE driverType=driverChoiceConsole();</div><div class="line"> <span class="keywordflow">if</span> (driverType==video::EDT_COUNT)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> printf(<span class="stringliteral">"Select the render window (some dead window may exist too):\n"</span>\</div><div class="line"> <span class="stringliteral">" (a) Window with button (via CreationParam)\n"</span>\</div><div class="line"> <span class="stringliteral">" (b) Window with button (via beginScene)\n"</span>\</div><div class="line"> <span class="stringliteral">" (c) Own Irrlicht window (default behavior)\n"</span>\</div><div class="line"> <span class="stringliteral">" (otherKey) exit\n\n"</span>);</div><div class="line"></div><div class="line"> <span class="keywordtype">char</span> key;</div><div class="line"> std::cin >> key;</div><div class="line"> <span class="keywordflow">if</span> (key != <span class="charliteral">'a'</span> && key != <span class="charliteral">'b'</span> && key != <span class="charliteral">'c'</span>)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"> HINSTANCE hInstance = 0;</div><div class="line"> <span class="comment">// create dialog</span></div><div class="line"></div><div class="line"> <span class="keyword">const</span> <span class="keywordtype">char</span>* Win32ClassName = <span class="stringliteral">"CIrrlichtWindowsTestDialog"</span>;</div><div class="line"></div><div class="line"> WNDCLASSEX wcex;</div><div class="line"> wcex.cbSize = <span class="keyword">sizeof</span>(WNDCLASSEX);</div><div class="line"> wcex.style = CS_HREDRAW | CS_VREDRAW;</div><div class="line"> wcex.lpfnWndProc = (WNDPROC)CustomWndProc;</div><div class="line"> wcex.cbClsExtra = 0;</div><div class="line"> wcex.cbWndExtra = DLGWINDOWEXTRA;</div><div class="line"> wcex.hInstance = hInstance;</div><div class="line"> wcex.hIcon = NULL;</div><div class="line"> wcex.hCursor = LoadCursor(NULL, IDC_ARROW);</div><div class="line"> wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW);</div><div class="line"> wcex.lpszMenuName = 0;</div><div class="line"> wcex.lpszClassName = Win32ClassName;</div><div class="line"> wcex.hIconSm = 0;</div><div class="line"></div><div class="line"> RegisterClassEx(&wcex);</div><div class="line"></div><div class="line"> DWORD style = WS_SYSMENU | WS_BORDER | WS_CAPTION |</div><div class="line"> WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SIZEBOX;</div><div class="line"></div><div class="line"> <span class="keywordtype">int</span> windowWidth = 440;</div><div class="line"> <span class="keywordtype">int</span> windowHeight = 380;</div><div class="line"></div><div class="line"> hWnd = CreateWindow( Win32ClassName, <span class="stringliteral">"Irrlicht Win32 window example"</span>,</div><div class="line"> style, 100, 100, windowWidth, windowHeight,</div><div class="line"> NULL, NULL, hInstance, NULL);</div><div class="line"></div><div class="line"> RECT clientRect;</div><div class="line"> GetClientRect(hWnd, &clientRect);</div><div class="line"> windowWidth = clientRect.right;</div><div class="line"> windowHeight = clientRect.bottom;</div><div class="line"></div><div class="line"> <span class="comment">// create ok button</span></div><div class="line"></div><div class="line"> hOKButton = CreateWindow(<span class="stringliteral">"BUTTON"</span>, <span class="stringliteral">"OK - Close"</span>, WS_CHILD | WS_VISIBLE | BS_TEXT,</div><div class="line"> windowWidth - 160, windowHeight - 40, 150, 30, hWnd, NULL, hInstance, NULL);</div><div class="line"></div><div class="line"> <span class="comment">// create some text</span></div><div class="line"></div><div class="line"> CreateWindow(<span class="stringliteral">"STATIC"</span>, <span class="stringliteral">"This is Irrlicht running inside a standard Win32 window.\n"</span>\</div><div class="line"> <span class="stringliteral">"Also mixing with MFC and .NET Windows.Forms is possible."</span>,</div><div class="line"> WS_CHILD | WS_VISIBLE, 20, 20, 400, 40, hWnd, NULL, hInstance, NULL);</div><div class="line"></div><div class="line"> <span class="comment">// create window to put irrlicht in</span></div><div class="line"></div><div class="line"> HWND hIrrlichtWindow = CreateWindow(<span class="stringliteral">"BUTTON"</span>, <span class="stringliteral">""</span>,</div><div class="line"> WS_CHILD | WS_VISIBLE | BS_OWNERDRAW,</div><div class="line"> 50, 80, 320, 220, hWnd, NULL, hInstance, NULL);</div><div class="line"> video::SExposedVideoData videodata((key==<span class="charliteral">'b'</span>)?hIrrlichtWindow:0);</div></div><!-- fragment --><p> So now that we have some window, we can create an Irrlicht device inside of it. We use Irrlicht createEx() function for this. We only need the handle (HWND) to that window, set it as windowsID parameter and start up the engine as usual. That's it. </p><div class="fragment"><div class="line"><span class="comment">// create irrlicht device in the button window</span></div><div class="line"></div><div class="line">irr::SIrrlichtCreationParameters param;</div><div class="line">param.DriverType = driverType;</div><div class="line"><span class="keywordflow">if</span> (key==<span class="charliteral">'a'</span>)</div><div class="line"> param.WindowId = <span class="keyword">reinterpret_cast<</span><span class="keywordtype">void</span>*<span class="keyword">></span>(hIrrlichtWindow);</div><div class="line"></div><div class="line">irr::IrrlichtDevice* device = irr::createDeviceEx(param);</div><div class="line"><span class="keywordflow">if</span> (!device)</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line"><span class="comment">// setup a simple 3d scene</span></div><div class="line"></div><div class="line">irr::scene::ISceneManager* smgr = device->getSceneManager();</div><div class="line">video::IVideoDriver* driver = device->getVideoDriver();</div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (driverType==video::EDT_OPENGL)</div><div class="line">{</div><div class="line"> HDC HDc=GetDC(hIrrlichtWindow);</div><div class="line"> PIXELFORMATDESCRIPTOR pfd={0};</div><div class="line"> pfd.nSize=<span class="keyword">sizeof</span>(PIXELFORMATDESCRIPTOR);</div><div class="line"> <span class="keywordtype">int</span> pf = GetPixelFormat(HDc);</div><div class="line"> DescribePixelFormat(HDc, pf, <span class="keyword">sizeof</span>(PIXELFORMATDESCRIPTOR), &pfd);</div><div class="line"> pfd.dwFlags |= PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW;</div><div class="line"> pfd.cDepthBits=16;</div><div class="line"> pf = ChoosePixelFormat(HDc, &pfd);</div><div class="line"> SetPixelFormat(HDc, pf, &pfd);</div><div class="line"> videodata.OpenGLWin32.HDc = HDc;</div><div class="line"> videodata.OpenGLWin32.HRc=wglCreateContext(HDc);</div><div class="line"> wglShareLists((HGLRC)driver->getExposedVideoData().OpenGLWin32.HRc, (HGLRC)videodata.OpenGLWin32.HRc);</div><div class="line">}</div><div class="line">scene::ICameraSceneNode* cam = smgr->addCameraSceneNode();</div><div class="line">cam->setTarget(core::vector3df(0,0,0));</div><div class="line"></div><div class="line">scene::ISceneNodeAnimator* anim =</div><div class="line"> smgr->createFlyCircleAnimator(core::vector3df(0,15,0), 30.0f);</div><div class="line">cam->addAnimator(anim);</div><div class="line">anim->drop();</div><div class="line"></div><div class="line">scene::ISceneNode* cube = smgr->addCubeSceneNode(20);</div><div class="line"></div><div class="line">cube->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/wall.bmp"</span>));</div><div class="line">cube->setMaterialTexture(1, driver->getTexture(<span class="stringliteral">"../../media/water.jpg"</span>));</div><div class="line">cube->setMaterialFlag( video::EMF_LIGHTING, <span class="keyword">false</span> );</div><div class="line">cube->setMaterialType( video::EMT_REFLECTION_2_LAYER );</div><div class="line"></div><div class="line">smgr->addSkyBoxSceneNode(</div><div class="line">driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_up.jpg"</span>),</div><div class="line">driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_dn.jpg"</span>),</div><div class="line">driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_lf.jpg"</span>),</div><div class="line">driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_rt.jpg"</span>),</div><div class="line">driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_ft.jpg"</span>),</div><div class="line">driver->getTexture(<span class="stringliteral">"../../media/irrlicht2_bk.jpg"</span>));</div><div class="line"></div><div class="line"><span class="comment">// show and execute dialog</span></div><div class="line"></div><div class="line">ShowWindow(hWnd , SW_SHOW);</div><div class="line">UpdateWindow(hWnd);</div><div class="line"></div><div class="line"><span class="comment">// do message queue</span></div></div><!-- fragment --><p> Now the only thing missing is the drawing loop using IrrlichtDevice::run(). We do this as usual. But instead of this, there is another possibility: You can also simply use your own message loop using GetMessage, DispatchMessage and whatever. Calling Device->run() will cause Irrlicht to dispatch messages internally too. You need not call Device->run() if you want to do your own message dispatching loop, but Irrlicht will not be able to fetch user input then and you have to do it on your own using the window messages, DirectInput, or whatever. </p><div class="fragment"><div class="line"><span class="keywordflow">while</span> (device->run())</div><div class="line">{</div><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, 0, videodata);</div><div class="line"> smgr->drawAll();</div><div class="line"> driver->endScene();</div><div class="line">}</div></div><!-- fragment --><p> The alternative, own message dispatching loop without Device->run() would look like this: </p><div class="fragment"></div><!-- fragment --><p> MSG msg; while (true) { if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg);</p> +<p>if (msg.message == WM_QUIT) break; }</p> +<p>advance virtual time device->getTimer()->tick();</p> +<p>draw engine picture driver->beginScene(true, true, 0, (key=='c')?hIrrlichtWindow:0); smgr->drawAll(); driver->endScene(); }</p><div class="fragment"><div class="line"> device->closeDevice();</div><div class="line"> device->drop();</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div><div class="line"><span class="preprocessor">#endif // if windows</span></div></div><!-- fragment --><p> That's it, Irrlicht now runs in your own windows window. </p> +</div></div><!-- contents --> +<!-- HTML footer for doxygen 1.8.13--> +<!-- start footer part --> +<p> </p> +</body> +</html> |
