Could not find any example how I actually get the return value of the _SendMessage call...
I've got (testing) simple message handler which would just put integer to the Message result value depending on the situation.
procedure TWindow.WmStatus(var Msg: TMessage);
var
LResult: NativeInt;
begin
LResult := 1;
if Assigned(FObjectReference) then
if FObjectReference.Status = mpFinished then
LResult := 2;
Msg.Result
I've done some tests with Lazarus, but i'm not familiar enought with Pascal, anyway i guess you need to override something like that (Delphi):
procedure TWindow.WndProc(var Msg: TMessage);
begin
// do your stuff
Inherited WndProc(Msg);
end;
Short example in pure AutoIt:
One programm to create a window with a custom WindowProc handling a custom 0x401 msg :
#cs
FROM MSDN:
Application-Defined Messages
An application can create message