The realization of software skin-changing technology in BCB

Source: Internet
Author: User

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>

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.