Use Tangram to construct your own software development platform (2)

Source: Internet
Author: User
UseTangramBuild your own software development platform (2) Sun Hui

Related Articles:Use Tangram to construct your own software development platform (1)

Create the first MFC cview Component LibraryTangram MFC cviewThe component library is a COM Component Library that contains a group of MFC cview class objects. First, create a Tangram MFC component library in vs 2003ide. Therefore, select Tangram component (tangram2 component DLL) in the Wizard manager of vs 2003ide, A dynamic Connection Library Project Based on MFC/ATL is established. This project provides the most basic mechanism of the MFC cview Object Library Supported by Tangram. In fact, this library has nothing to do with the development framework of Tangram, the minimal support condition does not depend on the Tangram development framework and is not connected to the library provided by Tangram. It is a COM Component Library that does not depend on Tangram. In solution manager, select the project you created and right-click it. A context menu is displayed. In this menu, select "add class". The following dialog box is displayed: select "Tangram component" and enter "short name" (The ATL object corresponding to the production Tangram object). Click "View class" on the left and enter the name of the MFC view, select the required base class, so that you have successfully created a Tangram object library containing a cformview object. If you need to add multiple cview objects, repeat the preceding operations, you can add any number of objects. Of course, you can also create any number of object libraries to enrich your Tangram applications. Edit the dialog box template corresponding to the above cformview: compile this library and you will implement the first Tangram library! You can use the created library to create a Tangram program by anyone. Start a Tangram program, design a new document template, or create a new document (a design view object is required). For example, select a design object, select "create MFC window" in the design toolbox and click "CREATE". In the displayed dialog box, list all the MFC libraries supported by Tangram in the "category" combo box. Select "tangramsamplemfclib. cnn.1 ", select the desired object in" MFC class ", and then confirm: Generally, in the above method, a Tangram program can support a series of MFC object libraries created above, these libraries form part of a public resource library. The above-created MFC cview object Runtime is equivalent to the "View" you actually created in the Code: Through the spy program, you can observe the window structure: in subsequent articles, we will introduce how these view objects interact with each other ...... (To be continued)
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.