[fpc-pascal]Ummmm... anyone know why this doesn't work...
Matt Emson
memsom at interalpha.co.uk
Wed Jul 23 16:24:27 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.
Cool. I'll amend my code too. It semed to work fine with the DispatchMessage
still available, but I'm using multiple threads and a hack to get the
compiler to treat methods as callback procs, so that could be the reason.
It was a pleasure because it stumped me too, to begin with ;-)
Matt
More information about the fpc-pascal
mailing list