Static controls are used in applications as labels or to separate groups of controls. Although static controls are child windows, they cannot be selected. Because of that, they do not receive the keyboard focus and do not have a keyboard interface. A static control can have a notify style. With this style the control will receive mouse input and then notifies its parent dialog when the user clicks or double clicks the control.
There are four basic types of static controls. Each type has one or more styles.
Simple graphic static controls draw a filled rectangle or a frame. Text static controls display text. Image static controls display an image, icon, bitmap or enhanced metafile. ooDialog does not have much, if any, support for owner-drawn static controls.
The StaticControl class provides methods to query and modify static controls. By default, static controls are assigned a resource ID of -1. There is no way to query or modify static controls unless the control has a positive resource ID. Which in most circumstances is fine, usually static controls do not need to be modified. Be sure to assign a positive resource ID to static controls that will be modified during the execution of a dialog.
The StaticControl class requires the class definition file oodWin32.cls:
The static control class is a subclass of the DialogControl Class and therefore inherits all methods of that class.
The static control class inherits from the following mixin classes, (indirectly through the DialogControl class.)
Use the getStaticControl() method to retrieve an object of the static control class. To use this method, the static control must have a positive ID.
To recieve notification of static control events use the connectStaticNotify)() method.
The StaticControl class implements the class and instance methods listed in the following table: