Hi, Yuri -
I always pass to the opened window a generalized parameters structure that contains a special-purpose boolean along with unbounded arrays of many different datatypes:
Boolean b_cancel
Boolean b_val[]
Integer i_val[]
UInt ui_val[]
Long l_val[]
ULong ul_val[]
Decimal dec_val[]
String s_val[]
DataWindow dw_val[]
.
.
.
You get the idea. I populate the arrays as needed before passing the structure in to a window via OpenWithParm or OpenSheetWithParm, and I pass back another parameters structure that has been populated as needed via CloseWithReturn.
The opened window must set the "b_cancel" structure member to TRUE if the user closes the window by canceling. The structure is returned as Message.PowerObjectParm. I always open/close windows with this convention so that the opened window can notify the calling window/object if the user closed the window by canceling.
HTH
John