First, Introduction
Sygui is a functional extension of the MFC interface Library, I introduced in the previous article how to use the interface library to implement the VC interface, in this article will introduce you to use the new features provided by SYGUI4.0 to achieve similar interface features like Windows Media Player. The interface customization function refers to the programming interface with different appearance styles for program design without modifying the program code. For example, the example program attached to this article contains three different interfaces as shown in the following illustration, and three interfaces can be dynamically switched through the appearance selection buttons on the interface:
Figure One example three kinds of interfaces when the program is running
Of course, through the interface customization can also design more interfaces for the example.
SYGUI4.0 is the interface customization through the separation of interface design and program functionality, so the following two processes are included in the development of programs with interface customization features:
1. Software developers to add interface customization function for the program
2. Interface designers for the design of a variety of interfaces, where the interface designer can be either a program developer or an end user.
Second, add interface customization function for the program
Because SYGUI4.0 hides almost all the details of the program's custom functionality, developers can add interface customization to the program simply by determining the interface object that the program outputs and creating an irregular form template file.
The interface objects that are allowed to be exported in SYGUI4.0 include:
1. Windows can be any type of window, such as combo box, list box, etc.
2.SYItem Object The Sygui class control provided by the library, such as the Sygui progress bar, scroll bar, etc.
3. Commands implemented in the command program, generally correspond to the buttons in the Custom interface window
4. Menu resources can be used for menu bars or button pull-down menus
5. Text objects can be used to display text on the interface
6. The state object can be used as an optional control variable for interface design