Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-04

How get a handle for a TComponent descendant under GTK2

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Fabio Luis Girardi

I'm trying to get a handle for a TComponent descendent class under GTK2.

On Tmyclass.Create(..) I did:

begin
   ...
   fHandle := AllocateHWnd(wndMessagesMethod);
   ...
end;

But when I call

   PostMessage(objectofMyClass.fhandle, LM_MYMESSAGE,0,0);

I got the exception:

"GetLCLObject=nil"

So, what's the correct way to get a handle for a TComponent?

The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com

Reply by email