This article supporting source code
Look at a software is outstanding, in addition to the function of sound, stable performance, easy to operate, the appearance of software interface more and more people's attention. People are not satisfied with the traditional rectangular Windows Forms, irregular form of software everywhere visible, and further developed to the software interface by the user according to their own hobby free control, the real realization of the user-friendly software. and to achieve this function, the software is the foundation of skin-changing technology. Here I will introduce a simple and straightforward way to make a login dialog box, this program programming environment C++builder:
First, programmers define interface elements (controls) based on functional requirements, especially the name of the control. The following figure:
Figure I: Element interface
Second, the artist is drawing on the interface elements. The bridge between the programmer and the art designer is through an XML description file, which means that the artist will fill in an XML file after each drawing a picture. The XML file needs to include: the coordinates of each interface element in the diagram, the size of the elements, the coordinates of the elements in the form, the position of the image in the entire picture when the mouse is placed, pressed, bounced, and ordinary, invalidated. The following figure:
Figure II: Graphic design of the landing window element map
next to fill in the XML description file, as follows: <?xml Version = "1.0" encoding= "UTF-8"
<root>
< Control>
<ctrlName>BMin</ctrlName>//Control name
<size>//Control dimensions
<width>18</width>//Control width
</size>
<formPos>//control position in form
&L t;left>302</left>//x coordinates
<top>2</top>//y coordinates
</formpos>
<action>/ /event effects Picture position
<normal>//normal
<left>0</left>//x coordinates
<top>268</top>//y coordinates
</ Normal>
<mouseUp>//mouse over
<left>0</left>
<top>291</top>
</ Mouseup>
<mousedown>//mouse down
<left>0</left>
<top>314</top>
</ Mousedown>
<disable/>//Fail
<focus/>//Get focus
</action>
</control>
< Control>
<ctrlname>bclose</ctrlName>
<size>
<width>18</width>
</size>
<formpos>
<left>327</left>
<top>2</top>
</formpos>
< Action>
<normal>
<left>28</left>
<top>268</top>
</normal>
<mouseup>
<left>28</left>
<top>291</top>
</mouseup>
< Mousedown>
<left>28</left>
<top>314</top>
</mousedown>
</ Action>
</control>
...//omitted some other elements "<controls/>"
</root>