Hello Chris,
Chris wrote: About the toolbox, you can choose to add a CustomControl to the window (from the VO toolbox), make it as large as you want and position it accordingly on the window, and then when you use SetParent(), use the handle of that custom control, instead of the handle of the window. That should do the trick.
.
In Frank's sample program with the Winforms control on it, the PostInit says:
SetParent(Self:pictureBox1:Handle, Self:Handle())
When I add a Customcontrol in the VO style Window editor, change the name to PICT and change the above line to:
SetParent(self:oDCPict:Handle())
I get a compiler as error 1 below and with
SetParent(Self:pictureBox1:Handle, Self:oDCPict:Handle())
I get a runtime error 2).
What parameter(s) am I suppose to add? Or should I do something else?
1 Severity Code Description Project File Line Suppression State
Error XS7036 There is no argument given that corresponds to the required formal parameter 'hWndNewParent' of 'VOWin32APILibrary.Functions.SetParent(PTR, PTR)' VOMDIApp2 C:\Temp\VOMDIApp2\Window1.prg 51
2 System.NullReferenceException: Object reference not set to an instance of an object.
Dick