[fpc-pascal]Ummmm... anyone know why this doesn't work...
L D Blake
ldblake at sympatico.ca
Wed Jul 23 16:03:56 CEST 2003
In reply to your message of July 23, 2003
> The answer is simple, but very illusive!!!
> while (GetMessage(wmsg, FWindowHandle, 0, 0)) do begin
> if not ( IsDialogMessage(FWindowHandle, wmsg) ) then ///this is the
> line you nees to add
> TranslateMessage(wmsg);
> DispatchMessage(wmsg);
> end;
> If you look at what TranslateMessage actually does it all becomes clear.
THANKS! ... I never would have stumbled on that one without some help.
The final version is this:
while GetMessage(@oMsg,0, 0, 0) do
begin
if not (IsDialogMessage(OHandle,omsg)) then
begin
TranslateMessage(oMsg);
DispatchMessage(oMsg);
end;
end;
I had to bracket both translatemessage and dispatchmessage before it would work.
Now the ws_group and ws_defpushbutton work too.
-----
L D Blake
More information about the fpc-pascal
mailing list