[lazarus] More Native Win32 stuff(Pascal,canyouhelphere?)
Shane Miller
SMiller1 at stvgb.org
Tue Aug 10 16:33:29 EDT 1999
Here is a basic map of how it's done:
We call gtkint.pp and send it a "message" or "command" LM_CREATE.
gtkint.pp says 'Hey, I received a LM_CREATE so they want me to create something!" (That's the English version of gtkint.pp talking of course)
gtkint then checks the SELF parameter (as a tcontrol) and check's it's compstyle and says "Hey, it's a compstyle is csFORM so I'll create a FORM!'. (gtkint.pp is very excitable, that's why it talks that way.)
So, now in order to detect when someone clicks on the form, TControl (for TForm) calls SetCAllBack(LM_CLICKED) and that's passed onto gtkint.pp.
GtKINT.PP get's it's SetCallBack called with a SELF and a LM_CLICKED so it sets a callback procedure up to be called when a clicked event occurs. In that callback, it uses the SELF to call DISPATCH(LM_CLICKED).
The LM_CLICKED is dispatch to TOBJECT, and it climbs UP the object tree looking for a procedure defined as
Procedure Something(var Message) message LM_CLICKED;
and when it sees that, it calls that procedure....
Basically that's how the messaging works. You should be able to do the exact same thing with WIN32.
I hope this helps.
Shane
More information about the Lazarus
mailing list