Introduction
Abstract
This article provides an introduction to TangramLittle, a C++ Framework for MFC and the .NET Framework. Knowledge in MFC and the .NET Framework is assumed.
Install Wizard
At first, you must download �TangramLittle.zip�, then decompress this file, we obtained a directory �Program Files�, this directory have two sub-directories, copy all sub-directories of this directory into your computer�s �Program Files� directory, thus, you have installed the Wizard.
Config your VC++ Environment Variable
There is a Static Library Project �MfcDotNetExtLib� in directory �Program Files\ Microsoft Visual Studio .NET 2003\ TangramLittle\ MfcDotNetExtLib�, please set Include Path to this directory and set Lib Path �Program Files\ Microsoft Visual Studio .NET 2003\ TangramLittle\ MfcDotNetExtLib\lib�.
Build a TangramLittle Application
This is very simple, just use the wizard to create a TangramLittle Project.
This is an MFC project which has no Main window.
Create a MainFrame Project
You can create a MainFrame Project by wizard:
Create a Doc/View Project
You can create a Doc/View Project by wizard:
Use TangramLittle, MainFrame Project and Doc/View Project to Compose an Application
Using the program config file, we can compose an Application. A typical config file is:
="1.0" ="utf-8"
<configuration>
<appSettings>
</appSettings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;usercontrol;component;doctemplate"/>
</assemblyBinding>
</runtime>
<Tangram
MainAppType = ".net"
MainAssemblyLib = "mainframe1"
MainAssemblyCategory= "mainframe1"
MainFrameAssembly = "mainframe1.AppObject"
ExternalAppAssembly = ""
WorkSpaceGUID = "{9905F281-9C5D-440b-89AF-EE61D3FA548A}"
>
<Caption>Welcome To Tangram World!</Caption>
<WorkSpace>MSDNDocIntegrationSample.App</WorkSpace>
<BackgroundType>mfcview</BackgroundType>
<BackgroundFile></BackgroundFile>
<RegistryKey>MSDNDocIntegrationSample</RegistryKey>
<StdProfileSettings>4</StdProfileSettings>
<RunModel></RunModel>
<Skin>Merlin ENI\Merlin ENI.uis</Skin>
</Tangram>
</configuration>
In a config file, MainAssemblyLib = "mainframe1"
assigns a mainframe object assembly, MainAssemblyCategory= "mainframe1"
assignd a sub-directory in the directory �Program Files\TangramUniverseDocument� which stores TangramLittle application�s MainFrame data, MainFrameAssembly = "mainframe1.AppObject"
assigns mainframe object ID in the assembly which is assigned by MainAssemblyLib = "mainframe1"
. <BackgroundType>mfcview</BackgroundType>
assigns MDI Client Type, TangramLittle Support use HTML, Flash Movie, and other Views (.NET Control) as MDI Client Background Window.
Demo
We supply a Demo (Demo.zip and MSDNDocIntegrationSample.zip) which shows how to use a config file to config a TangramLittle application, each mainframe object corresponds an MFC Document (a .app file, for detail information please observe the directory �Program Files\TangramUniverseDocument�), for each mainframe, there exists a directory (name: �Program Files\TangramUniverseDocument\ Your Company Name\ mainframe\DocumentTemplate�), this directory consists of XML files, each XML file descripts a document template.
Some Snapshots
If you have any question, please contact me.