Prev: GetSystemMetrics and SM_CXPADDEDBORDER
Next: Dialog creation from resource failed & Control creation failed errors
From: ninadunn on 10 Sep 2008 01:23 Hi, I am using pinvoke from C# to call a function that is in VO. The function in VO opens a window. The function in VO also accepts a parent parameter as so: FUNCTION FunctionName(oParent as ptr) as ptr PASCAL local oWindow as TheWindow oWindow := TheWindow {} oWindow :Show(SHOWCENTERED) I can pass through the pointer of the oParent from C# ok. But I need some how to create the window in VO with the parent as the oParent parameter. I have been looking at SetParent but it doesn't seem to do I what I need. What I need is for oWindow to be modal with oParent as the owner/parent.
From: Mathias on 10 Sep 2008 04:20 You are not telling ut what kind of window "TheWindow" is. A peek in the Window:Init in the SDK tells me that you can submit the owner window as a handle (data type: ptr). The SDK automatically encapsulates the handle in a class called _ForeignWindow. oWindow := TheWindow{oParent} Mathias ninad...(a)gmail.com skrev: > Hi, > > I am using pinvoke from C# to call a function that is in VO. The > function in VO opens a window. The function in VO also accepts a > parent parameter as so: > > FUNCTION FunctionName(oParent as ptr) as ptr PASCAL > > local oWindow as TheWindow > > oWindow := TheWindow {} > > oWindow :Show(SHOWCENTERED) > > I can pass through the pointer of the oParent from C# ok. But I need > some how to create the window in VO with the parent as the oParent > parameter. I have been looking at SetParent but it doesn't seem to do > I what I need. What I need is for oWindow to be modal with oParent as > the owner/parent.
From: ninadunn on 10 Sep 2008 17:40 On Sep 10, 6:20 pm, Mathias <mathias.hakans...(a)consultec.se> wrote: > You are not telling ut what kind of window "TheWindow" is. A peek in > the Window:Init in the SDK tells me that you can submit the owner > window as a handle (data type: ptr). The SDK automatically > encapsulates the handle in a class called _ForeignWindow. > > oWindow := TheWindow{oParent} > > Mathias > > ninad...(a)gmail.com skrev: > > > > > Hi, > > > I am using pinvoke from C# to call a function that is in VO. The > > function in VO opens a window. The function in VO also accepts a > > parent parameter as so: > > > FUNCTION FunctionName(oParent as ptr) as ptr PASCAL > > > local oWindow as TheWindow > > > oWindow := TheWindow {} > > > oWindow :Show(SHOWCENTERED) > > > I can pass through the pointer of the oParent from C# ok. But I need > > some how to create the window in VO with the parent as the oParent > > parameter. I have been looking at SetParent but it doesn't seem to do > > I what I need. What I need is for oWindow to be modal with oParent as > > the owner/parent.- Hide quoted text - > > - Show quoted text - "TheWindow" is a VO type "Window". What SDK are you looking at all mine says is: Window:Init() Method Purpose Construct a Window object. Syntax Window{<oOwner>} ---> SELF Init(<oOwner>) ---> SELF Arguments <oOwner> The window that owns this window. Description The window initialization code generated by the Window Editor calls PreInit() and PostInit() at the beginning and the end, respectively, of the Init() method. The default implementation returns NIL. Implementation of PreInit()/PostInit(), however, results in customized initialization code which is not overridden by the Window Editor's code generation. See Also Window:PreInit(), Window:PostInit()
From: Stephen Quinn on 10 Sep 2008 19:01 > "TheWindow" is a VO type "Window". What SDK are you looking at all > mine says is: Probably the VO SDK that comes with the product (in versions > 2.0<g>). > > oWindow := TheWindow {} Somewhere in your VO app/DLL you'll have a definition of 'TheWindow{}' Eg CLASS TheWindow INHERIT <This is the KIND of Window> // KIND being = DataDialog{} or Dialog{} or DataWindow{} CYA Steve
From: John Martens on 11 Sep 2008 01:54
What you are quoting is the help file. As part of the VO install there is a folder SDK where the source code of VO is. There you can see how the owner is set in the Init (or other methods) John ninadunn(a)gmail.com schreef: > On Sep 10, 6:20 pm, Mathias <mathias.hakans...(a)consultec.se> wrote: >> You are not telling ut what kind of window "TheWindow" is. A peek in >> the Window:Init in the SDK tells me that you can submit the owner >> window as a handle (data type: ptr). The SDK automatically >> encapsulates the handle in a class called _ForeignWindow. >> >> oWindow := TheWindow{oParent} >> >> Mathias >> >> ninad...(a)gmail.com skrev: >> >> >> >>> Hi, >>> I am using pinvoke from C# to call a function that is in VO. The >>> function in VO opens a window. The function in VO also accepts a >>> parent parameter as so: >>> FUNCTION FunctionName(oParent as ptr) as ptr PASCAL >>> local oWindow as TheWindow >>> oWindow := TheWindow {} >>> oWindow :Show(SHOWCENTERED) >>> I can pass through the pointer of the oParent from C# ok. But I need >>> some how to create the window in VO with the parent as the oParent >>> parameter. I have been looking at SetParent but it doesn't seem to do >>> I what I need. What I need is for oWindow to be modal with oParent as >>> the owner/parent.- Hide quoted text - >> - Show quoted text - > > "TheWindow" is a VO type "Window". What SDK are you looking at all > mine says is: > > > Window:Init() Method > > > > Purpose > > Construct a Window object. > > > > Syntax > > Window{<oOwner>} ---> SELF > > Init(<oOwner>) ---> SELF > > > > Arguments > > <oOwner> The window that owns this window. > > > > Description > > The window initialization code generated by the Window Editor calls > PreInit() and PostInit() at the beginning and the end, respectively, > of the Init() method. The default implementation returns NIL. > Implementation of PreInit()/PostInit(), however, results in customized > initialization code which is not overridden by the Window Editor's > code generation. > > > > See Also > > Window:PreInit(), Window:PostInit() > > |