The following methods are general purpose dialog control methods.
>>-aDialogControl~ProcessMessage(--message--,--firstParam--,--secondParam--)-><
The ProcessMessage method sends a Windows message to a dialog control.
The arguments are:
The number of the message to be sent to the dialog control.
Additional arguments specific to the message.
The return values are message-specific.
The following example erases the background of the edit control with the resource ID (symbolic ID) of IDC_EDIT1:
dlgc = MyDialog~GetEditControl("IDC_EDIT1") WM_ERASEBACKGROUND = "14"~x2d hdc = dlgc~GetDc dlgc~ProcessMessage(WM_ERASEBACKGROUND, hdc, 0) dlgc~FreeDC(hdc)
Note: Use the Windows documentation and Platform SDK to obtain the Window message numbers.
>>-aDialogControl~Value----------------------------------------><
The Value method retrieves the current value of a dialog control.
The current value set in the dialog control.
Note: See GetValue for more information.
>>-aDialogControl~Value=--new_value----------------------------><
The Value= method sets a value for a dialog control.
The only argument is:
The value assigned to the dialog control.
The following example selects check box RESTART and deselects check box VERIFY:
MyDialog~GetCheckControl("RESTART")~Value=1 MyDialog~GetCheckControl("VERIFY")~Value=0
Note: See SetValue for more information.
>>-aDialogControl~AssignWindow(--hwnd--)-----------------------><
The AssignWindow method connects a dialog or dialog control with an existing object of the PlainBaseDialog or DialogControl class. Note that the connected dialog or dialog control might not support all methods provided by the DialogControl class.
The AssignWindow method is used internally to connect ooRexx objects (a DialogControl object) to the underlying Windows dialog control. It is not recommended that the programmer use this method unless he throughly understands the ooDialog framework. Otherwise, using this method has the potential for causing unpredictable behavior.
The only argument is:
The handle to the dialog or dialog control that you want to assign to the DialogControl object.
The handle to the dialog or dialog control that has been assigned, or 0 if the connection failed.
The following example searches the desktop for a dialog with the title "Monitoring Applications", connects it to the object dlgc of the DialogControl class, and then hides the dialog:
dlgc = .DialogControl~new ... whnd = FindWindow("Monitoring Application") if whnd \= 0 then do dlgc~AssignWindow(whnd) dlgc~Display("HIDE") end