On Sat, 10 Nov 2007 14:41:18 +0100
Christian Budde <[EMAIL PROTECTED]> wrote:

> Right now I have made it very simple and as expected it doesn't work.
> I implemented it as:
> 
> {------------------------------------------------------------------------------
>   TWinControl CreateParentedControl
> ------------------------------------------------------------------------------}
> class function TWinControl.CreateParentedControl(ParentWindow: hwnd): 
> TWinControl;
> begin
>   Result := TWinControl.CreateParented(ParentWindow);
> end;
> 
> I guess I have to dig a bit deeper into the OS-APIs to see how the 
> handle stuff works. For Windows I can probably use the 
> Windows.SetParent(...), but I'm not sure.
> 
> Any hints? Do I really need to implement a new TForeignHandleControl
> class?

If you only need a reparented control, that will not get focus,
get incorrect mouse and keyboard events and will likely crash, then it
is easier to implement only CreateParented. ;)
That's because the biggest part of the LCL and the LCL interfaces
expects LCL controls.


Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to