[lazarus] application, forms, win32

Michael Van Canneyt michael.vancanneyt at wisa.be
Tue Aug 26 07:01:56 EDT 2003




On Tue, 26 Aug 2003, Marco van de Voort wrote:

> This is more of a Delphi and/or win32 question, BUT.
>
> I'm playing with ICS, and got some console programs running.
>
> However one of the demoes uses unit forms, but only to keep messages
> flowing. (it is a console unit)
>
>  { session is connecting or application terminated.               }
>     while WSocket1.State in [wsConnecting] do begin
>         Application.ProcessMessages;
>         if Application.Terminated then
>             break;
>     end;
>     if WSocket1.State = wsConnected then begin
>         WSocket1.ReadLine(15, Buffer);
>
>
> (those application lines are probably the only forms stuff used)
>
> Can I fake this easily?

Yes. It's essentially a loop.

While PeekMessage() do
  begin
  TranslateMessage();
  DispatchMessage();
  end;

But there is a version of ICS that has a 'custommessageloop' procedure
which does exactly that.

> Anybody have a skeleton win32 application object ?

See custapp.pp in FCL.

Michael.






More information about the Lazarus mailing list