>>-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.
The return code is 0 for a successful load and 1 otherwise
The arguments are:
The name of the resource script of the dialog
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.
One or more of the keywords listed in the syntax diagram, separated by blanks:
The dialog is positioned in the center.
For each button a connection to an object method is established automatically. See ConnectControl for a description of connecting buttons to a method.
Similar to CONNECTBUTTONS, this option enforces the method to connect the radio buttons.
This option connects the check box controls.
This is the maximum number of dialog elements the dialog object can handle. See Create.
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")