🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.windows.ms.programmer
3 messages
3 total messages Started by Jeff Witzer Wed, 15 Apr 1992 13:56
Dialog Box message loops
#402
Author: Jeff Witzer
Date: Wed, 15 Apr 1992 13:56
15 lines
1075 bytes
Gee, the further I get into Windows programming, the quicker the roadblocks
come...

To monitor a communications port, I have been using a PeekMessage () loop
instead of a GetMessage () loop and, if no messages existed, calling a
quick function to check the port.  That worked fine while my main window
was up, however, when the user was presented with a dialog box for some
reason, the PeekMessage () loop was not in control.  I suspected this would
happen, reasoning that dialog boxes had thier own message loop, but I still
need to check the port even during dialog boxes.  How can I gain access to
the dialog box message loop?  I hope I don't have to use regular windows 
and kludge them to look and act like dialog boxes...

Thanks,
Jeff
Re: Dialog Box message loops
#432
Author: Richard Hancock
Date: Thu, 16 Apr 1992 10:30
7 lines
690 bytes
/ hpopd:comp.windows.ms.programmer / jeff@tct.com (Jeff Witzer) /  2:56 pm  Apr 15, 1992 /

>How can I gain access to
>the dialog box message loop?  I hope I don't have to use regular windows 
>and kludge them to look and act like dialog boxes...

You could process WM_ENTERIDLE in the parent WndProc.
Re: Dialog Box message loops
#439
Author: Rick Masters
Date: Thu, 16 Apr 1992 19:16
18 lines
1163 bytes
Jeff Witzer:

You write that have been checking a communications port
inside your applications PeekMessage loop. I suggest
that you set a timer and check the port every time
you get a WM_TIMER message. In this way you have more control
over how often you check the port.

If you use your message loop, you may run into problems
because when your application yields you may not get
another message for a long time. The only way around
this is to not yield correctly which I suspect you
may be doing if you are using PeekMessage instead
of GetMessage in your main application's message loop.

Rick Masters

P.S. My first post. No scathing flames please.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads