Skip to content

CreateStateOptions - cCJCommandBarSystem

Creates a StateOptions object, initializes it based on the passed layout type and returns its handle

Type: Function
Return Data Type: Handle

Parameters

Parameter Type Description
eLayout Integer The layout style. Possible values are:ConstantMeaning

Syntax

Function CreateStateOptions Integer eLayout Returns Handle

Call Example

Get CreateStateOptions eLayout to HandleVariable

Description

CreateStateOptions creates a cCJStateOptions object, initializes it based on the passed layout type and returns its handle.

The StateOptions object is used to save and restore layout information. It determines what kind of information will be saved to the registry or XML resource. The eLayout type passed will determine what information is saved or restored. If you need to save and restore information that is normally not used for a particular type you can augment this message.

Normally, this is not something you would do. The property peRestoreLayout allows you to load and restore layout information automatically.

// Augment so that you can see when a layout is loaded and 
// so that images are saved in the layout.
Function CreateStateOptions Integer eLayout Returns Handle
    Handle hoStateOptions

    Forward Get CreateStateOptions eLayout to hoStateOptions        

    // If True, the images stored in the ImageManager will be saved.
    // You probably would never want to do this. This is just an example
    Set ComSerializeImages of hoStateOptions to True

    Set ComLoadSilent of hoStateOptions to False

    Function_Return hoStateOptions
End_Function

If you call this function, it creates an object. It is your responsibility to destroy this object when you are done with it.

Return Value

Returns a newly created cCJStateOptions object.