Load

>>-aUserDialog~Load(--resourceFileName--,--dialogId------------->

>--+------------------------------------------------------+----->
   +-,--+------------------------------+--+-------------+-+
        |    .--------------------.    |  +-,--expected-+
        |    V                    |    |
        +-"----+-CENTER---------+-+--"-+
               +-CONNECTBUTTONS-+
               +-CONNECTRADIOS--+
               +-CONNECTCHECKS--+

>--)-----------------------------------------------------------><


The Load method creates the dialog based on the data of a given resource script (a file with the extension .RC). It calls the LoadFrame and LoadItems methods to retrieve the dialog data from the file.

Return code:

The return code is 0 for a successful load and 1 otherwise

Arguments:

The arguments are:

resourceFileName

The name of the resource script of the dialog

dialogId

The ID (number) of the dialog. Note that each dialog has a unique ID assigned to it. There can be more than one dialog definition in one resource file. If there is only one dialog resource in the resource file, you do not have to indicate the ID.

options

One or more of the keywords listed in the syntax diagram, separated by blanks:

CENTER

The dialog is positioned in the center.

CONNECTBUTTONS

For each button a connection to an object method is established automatically. See ConnectControl for a description of connecting buttons to a method.

CONNECTRADIOS

Similar to CONNECTBUTTONS, this option enforces the method to connect the radio buttons.

CONNECTCHECKS

This option connects the check box controls.

expected

This is the maximum number of dialog elements the dialog object can handle. See Create.

Example:

The following example creates a dialog based on the values for dialog 100 in Dialog1.rc. It also connects the push and radio buttons to a message named after the buttons' title.

MyDlg = .UserDialog~new()
MyDlg~Load("Dialog1.rc", 100, "CONNECTBUTTONS CONNECTRADIOS")