In the previous tutorial, we generated a xtml document and generated a TUTORIAL1 dialog box program using Microsoft Visual C + + 6.0, in which I'll show you how to install objects of interest to you on the build framework.
First, let me first explain how the Tangramminictrl component installs an object in a blank area. This component provides a method Setwnd () To install a Window object, in a later introduction I unified the empty area is called a Tangram node object, each such blank area corresponds to Tangrammini component's one Tangramobjectinfo object.
BOOL SetWnd(LPCTSTR strObjName, long hHostWnd);
The method requires two parameters, the first parameter is the Tangram node object name (String type), and the second parameter is the window handle (integer). Returns a Boolean value that indicates whether the setting was successful. In the Tangrammini component, as long as the Tangram node is related to the Tangram node name, we can use the Tangramminictrl component as soon as we know this basic method, OK, let's start the real installation.
The first page of the xtml document we designed in the previous article contains three regional sections, where we will be in three areas:
The first area installs a list control,
The second area installs a tree control,
The third area installs an edit Box,
First, we draw three controls separately in the main dialog box, regardless of position and size, as long as the painting can be, and then use ClassView ... (View-> ClassView ... ) define three control variables: m_wndlist, M_wndtree, M_wndedit, respectively, correspond to the above three controls. Let's take a look at the results of the example we're working on now: