Construct your own software development platform using Tangram (2)
Grandchildren
Brilliant
Related Articles: Construct your own software development platform using Tangram (1)
Create the first MFC CVIEW
Component library
Tangram
The MFC CVIEW component library is a COM component library containing a set of MFC CView class objects. First, create a Tangram MFC component library in VS 2003IDE, for this, select Tangram Component (Tangram2 Component DLL) in the VS 2003IDE Wizard Manager:
In this way, a dynamic connection library project based on MFC / ATL is established. This project provides the most basic mechanism for Tangram supported MFC CVIEW object library. In fact, this library is relatively independent of the development framework of Tangram, minimal support conditions do not rely on TangRam development framework, not with Tangram. Connect, it is a COM component library that does not depend on Tangram.
Select the project you created in the Solution Manager, click the right mouse button, a context menu appears:
In this menu, select the Add Class menu item to get the following dialog:
Select "Tangram Component" to get:
Enter "Short Name" (Production of the ATL object corresponding to the Tangram object), and click on the "View Class" on the left with the mouse:
Enter the name of the MFC View, select the base class you need so you successfully create a TangRam object library containing a CFormView object. If you need to add multiple CVIEW objects, repeat the above operation, you can add any more Objects, of course, you can also create any multiple object libraries to enrich your Tangram application.
Edit the CFORMVIEW corresponding dialog template:
Compile this library, you have achieved the first Tangram library!
You can use the libraries created above for the TangRam program created by anyone. Start a tangram program, design a new document template, or create a new document (requires a designable view object):
As shown above: Select a design object and select "CREATE MFC Window in the Design Toolbox, click" CREATE "to get the dialog:
In the "Category" combo box, you select "TangramsampleMfclib.cn.1" and select "TangramsampleMfclib.cn.1" and select the object you need in "MFC Class", then OK:
Generally speaking, as above, a TangRAM program can support a series of MFC object libraries as clicked, which form a part of a public repository. If the MFC CVIEW object running is equivalent to the "View" that you actually created in the code: You can observe the window structure through the SPY program:
In subsequent articles, we will introduce these view objects to interactive operation ... (to be continued)