[Lazarus] How get a handle for a TComponent descendant under GTK2

Fabio Luis Girardi fluisgirardi at gmail.com
Mon Apr 9 14:48:31 CEST 2012


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




More information about the Lazarus mailing list