Skip to content

OnCreate - cCJSkinFramework

Event is called when the skin COM object is created

Type: Event

Syntax

Procedure OnCreate

Description

OnCreate is called when the skin COM object is created. This is augmented to:

  1. Define the standard DataFlex skins class mappings.
  2. Call the OnAddCustomWindowClasses event. This is event is provided for the developer to create their own custom class mapping.
  3. Load a skin preference if pbLoadPreference is true
  4. Apply a skin if psSkinFile is not blank.

If you augment this event you must forward it.

Note that the peAutoCreate property is set to peAutoCreate. This means that the COM object is created when the object is created (within End_Construct_Object). The skin COM object is destroyed when the program ends. This means that skins are applied when this object is created (step 4). If the skin object is placed at the top of your program, this skin is applied before most of your other objects are created or paged. Normally this is desired.

We recommend that the skin object be placed directly below your cApplication object. Normally, the application object must be created and a workspace initialized before skinning can be used. The loading of preferences (LoadSkinPreference) and the applying of relativel skin file (psSkinFile) requires a workspace object.