Contributed by: Doug Rickman, Global Hydrology and Climate Center, MSFC, NASA
This is aimed at beginning REXX users.
/*****************************************************************************/
/**************** To get the window number of a VisPro window ***************/
This is poorly documented by Hockware.
The WINDOW variable at the top of every event contains the Presentation Manager (PM) window handle for the current form.
For the Main form you can store the window handle into a variable in the When opened event. "MainWindowHandle=window"
For secondary forms you can get the handle when the secondary form is opened from an event, and store that into a special variable:
PMHandle=VpOpenForm(window, 258, 'topic name')
Now, the variable PMHandle contains the PM handle for the form that was just opened and MainWindowHandle contains the handle for the main window. This can be used from the Main form to manipulate objects on the newly opened form. For example, if the form that was just opened has an entry field object with an ID number of 1011, then you could issue the following call from the Main form:
Call VpSetItemValue PMHandle, 1011, 'This entered from Main form'