Professional User Interface Suite, Copyright FOSS Software Inc. Help Published with Permission.

If you have a great number of controls on a dialog, it may take quite a time to subclass all these items manually. Starting from version 2.80, there is a new method SubclassChildControls() in the CExtWS template that subclasses automatically all the child controls of CExtResizableDialog and CExtResizablePropertyPage dialogs. The method also eliminates the problem with an incorrect tab order of group boxes on a dialog. There is also a SubclassChildControls() global function, which you can use for any window.

You should invoke SubclassChildControls() after the window has been created. It subclasses the following standard controls:

  •    Static labels including icons
  •    Edit controls
  •    Combo boxes
  •    Push buttons
  •    Check buttons
  •    Radio buttons
  •    Group boxes
  •    Progress controls
  •    Scroll bar controls
  •    Up-down (spin) controls

Another way of subclassing controls with CExtWS is to invoke SetAutoSubclassChildControls(true) before the window is created, i.e. in the class constructor. In this case, each control will be automatically subclassed when needed.