[Lazarus] SendMessage Bug Work Around.

José Mejuto joshyfun at gmail.com
Thu Apr 22 18:34:05 CEST 2010


Hello Lazarus-List,

Thursday, April 22, 2010, 5:41:37 PM, you wrote:

MS> So what does SendMessage do in GTK and what is the difference between
MS> PostMessage and SendMessage ? (AFAIK, in Delphi and Lazarus-Windows
MS> there is none (but performance), if the target handle is associated to
MS> the same process.) The documentation and the wiki does not seem to
MS> provide this information.

As far as I know (and I could be wrong) LCL SendMessage only handles
(passes) messages that it could understand and WM_COPYDATA is not one
of them, while Delphi SendMessage is just exactly the same as
Windows.SendMessage.

So, LCL.SendMessage is a compatibility layer that transform the
windows message style in an operation over the current widgetset. In
GTK a message like WM_SHOW will be "converted" in a sequence of GTK
operations to show or hide a window/control. This way inside an
application there is (or better should not be) any difference to the
application running in Windows, GTK, etc...

Of course maybe is reasonable to allow plain SendMessage
(LCL.SendMessage) to send a plain (whichever) message when the target
is not an LCL handle :-? in Windows platform, but them a lot of posts
like WM_COPYDATA works in Windows but fails in Linux will fill the
bugtracker.

-- 
Best regards,
 José





More information about the Lazarus mailing list