Discussion of article "Graphical Interfaces I: Form for Controls (Chapter 2)"

To add comments, please log in or register
MetaQuotes Software Corp.
MetaQuotes Software Corp.  

New article Graphical Interfaces I: Form for Controls (Chapter 2) has been published:

This article is the continuation of the first part of the series about graphical interfaces. The first article Graphical Interfaces I: Preparation of the Library Structure (Chapter 1) considers in detail what this library is for. A full list of the links to the articles of the first part is at the end of each chapter. There you can also find and download a complete version of the library at the current stage of development. The files must be located in the same directories as in the archive.

In the previous chapter we discussed a library structure for creating graphical interfaces. There (1) derived classes for primitive objects, (2) a base class for all controls, (3) principle classes for storing control pointers and managing those controls in the common event handler were created.

In this article we shall create the first and main element of the graphical interface — a form for controls. Multiple controls can be attached to this form anywhere and in any combination. The form will be movable and all controls attached to it will be moved together with it.

What parts will constitute the window that we are going to create?

  1. Background. All the controls will be located in this area.
  2. Header. This part enables moving the window and contains the interface controls listed below.
  3. Icon. Additional attributes for visual identification.
  4. Caption. Window name.
  5. The "Tooltip" button. Pressing this button enables the mode of showing control tooltips where they are present.
  6. Button for minimizing/maximizing the window.
  7. Button for closing the window.

Fig. 1. Compound parts of the form for controls

Fig. 1. Compound parts of the form for controls

Author: Anatoli Kazharski

To add comments, please log in or register