Prev: GetSystemMetrics and SM_CXPADDEDBORDER
Next: Dialog creation from resource failed & Control creation failed errors
From: Mathias on 11 Sep 2008 04:29 A closer look in the SDK tells me that if the owner window is a handle it is just passed on through to the super:init, which eventually is the window:init, so it should work as long as it is allowed for a win32 window to have a .net window as parent. Just try it and see what happens... The SDK that I've been looking in is the SDK for VO2.8 sp1. Mathias ninad...(a)gmail.com skrev: > 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() |