[Lazarus] Linux Window Handles

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Aug 5 01:29:02 CEST 2008


On Sun, 03 Aug 2008 21:30:35 +1000
SteveG <steveg at nevets.com.au> wrote:

> Found the code necessary to get the GTK handle from a Lazarus handle 
> (for GTK2)
> fWindow(int64) := GDK_WINDOW_XWINDOW( pointer( 
> PGtkWidget(Form1.Handle)^.Window ) );
> 
> add gtk2, gdk2x  to the 'uses' section

More generic:

uses gtkproc, gdk2x;

  XWindow:=GDK_WINDOW_XWINDOW(GetControlWindow(PGtkWidget(Control.Handle)));

Mattias




More information about the Lazarus mailing list