Re: activate the eventloop

I have tried this on "Micro$oft-ish so called operating systems"  it worked when
I addionally made the window visible.
    if (!(HTSocketWin = CreateWindow(className, "stop loop with ESC",
WS_POPUP|WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
0, 0, wc.hInstance,0)))

Eventloop:
    while (!HTEndLoop && GetMessage(&msg,0,0,0)) {
  if ((msg.message == WM_CHAR) && (msg.wParam == ESC))  { //linn
   if (MessageBox(HTSocketWin,"Stop the Loop ?","Loop
Control",MB_OKCANCEL|MB_ICONSTOP) == IDOK) {
 //   HTHost_killAll();
    HTEndLoop = -1;
   }
  }
     TranslateMessage(&msg);
     DispatchMessage(&msg);
    }



Karl-Otto

Peter Stamfest wrote:

> On Thu, 21 Sep 2000, Derruau, Mathias wrote:
>
> > Date: Thu, 21 Sep 2000 16:46:45 +0100
> > From: "Derruau, Mathias" <Mathias_Derruau@hplb.hpl.hp.com>
> > To: "'www-lib@w3.org'" <www-lib@w3.org>
> > Subject: Re: activate the eventloop
> > Resent-Date: Thu, 21 Sep 2000 11:47:07 -0400 (EDT)
> > Resent-From: www-lib@w3.org
> >
> > I probably miss something, but I can't find a proper declaration of these
> > methods GetMessage(), TranslateMessage() and DispatchMessage(). What tpe of
> > messages are they supposed to be?
>
> They only exist on Micro$oft-ish so called "operating systems". If you try
> to use libwww on a *ix [Looking at your e-mail address, I guess you use
> HP-UX], you won't have them.
>
> >
> > Concerning the sockets with HTEvent_register and HTEvent_new, it is what I
> > did, and it works...once. I don't really know why.
> >
>
> Strange, I did it just like that. I guess you are just "read"-ing the data
> you sent to the socket in your Event callback - you shouldn't do anything
> else, I guess.

Received on Thursday, 21 September 2000 15:33:01 UTC