how do I disable my app when running % done modeless dialog box?

how do I disable my app when running % done modeless dialog box?

Post by Christian Ghisl » Thu, 11 Nov 1993 22:36:00




Quote:>how do I disable my app when running % done modeless dialog box

> The title pretty well sums it up.  I have a cancellable, modeless dialog
> box that displays a % done status.  That's pretty standard stuff.
> While doing this processing, I want to prevent the user from doing
> anthing else in my app (but of course, allowing them to use other apps).

> What's the standard way of doing this:

When creating your status dialog, disable your main window:

EnableWindow(hwindow,0)

When closing the dialog, reenable it:

EnableWindow(hwindow,1)

Where hwindow is your main window's WINDOW handle.


----
Christian Ghisler
Institute of Applied Physics
University of Bern, Switzerland          

 
 
 

how do I disable my app when running % done modeless dialog box?

Post by David Braba » Fri, 12 Nov 1993 00:13:46


>The title pretty well sums it up.  I have a cancellable, modeless dialog
>box that displays a % done status.  That's pretty standard stuff.
>While doing this processing, I want to prevent the user from doing
>anthing else in my app (but of course, allowing them to use other apps).
>What's the standard way of doing this:
>  (a) switch focus back to the modeless dialog box each time the main
>      window gets the focus?
>  (b) disable all of the menu items, so they can't be selected
>  (c) other?
>When using the modeless 'search' dialog box in Notepad, you can switch back
>to the main window and pull down menu items and run all of the selections,
>including exit, help, edit/cut etc.  The don't seem to concerned about
>whether or not the search dialog box is running.
>However, when doing the same thing in Word, you can't touch the main
>window at all while running the search dialog box.  You get a beep, so
>either Windows is preventing it or the main window gets the focus,
>beeps and switches the focus back to the dialog box.
>--

>Airborne Geophysics
>Geological Survey of Canada, Ottawa

Uhhh ? I don't understand ... You want to use a modeless dialog box as a modal
one ?

David

      +---------------------------+----------------------------------+

      | Siemens Nixdorf,          | Phone  : +32 41 201 609          |
      | Centre Software de Liege, | FAX    : +32 41 201 642          |
      | 2, rue des Fories,        +----------------------------------+
      | 4020 Liege, Belgium.      |     #include "disclaim.hpp"      |
      +---------------------------+----------------------------------+

 
 
 

how do I disable my app when running % done modeless dialog box?

Post by Cedric J. Si » Fri, 12 Nov 1993 02:18:53




>>The title pretty well sums it up.  I have a cancellable, modeless dialog
>>box that displays a % done status.  That's pretty standard stuff.
>>While doing this processing, I want to prevent the user from doing
>>anthing else in my app (but of course, allowing them to use other apps).

>Uhhh ? I don't understand ... You want to use a modeless dialog box as a modal
>one ?

Of course he does...  The implementation of a modal dialog box in Windows
does not allow background processing.  You must use a modeless dialog
and disable all other commands in your application while doing background
processing.  To do this, display the modeless dialog and disable the
main window (with EnableWindow).

Cheers,
Cedric.
-------------------------------------------------------------------
 Cedric J. Sims                               Texas A&M University

 +1 409 862 4104                    College Station, Tx 77843-3142
-------------------------------------------------------------------

 
 
 

how do I disable my app when running % done modeless dialog box?

Post by David Braba » Tue, 16 Nov 1993 16:22:40




>>>The title pretty well sums it up.  I have a cancellable, modeless dialog
>>>box that displays a % done status.  That's pretty standard stuff.
>>>While doing this processing, I want to prevent the user from doing
>>>anthing else in my app (but of course, allowing them to use other apps).

>>Uhhh ? I don't understand ... You want to use a modeless dialog box as a modal
>>one ?

>Of course he does...  The implementation of a modal dialog box in Windows
>does not allow background processing.  You must use a modeless dialog
>and disable all other commands in your application while doing background
>processing.  To do this, display the modeless dialog and disable the
>main window (with EnableWindow).
>Cheers,
>Cedric.
>-------------------------------------------------------------------
> Cedric J. Sims                               Texas A&M University

> +1 409 862 4104                    College Station, Tx 77843-3142
>-------------------------------------------------------------------

 Ooopsss ! I've missed the point ...

 In french, we say "J'ai encore rate' une occasion de me taire" :-)

 David

      +---------------------------+----------------------------------+

      | Siemens Nixdorf,          | Phone  : +32 41 201 609          |
      | Centre Software de Liege, | FAX    : +32 41 201 642          |
      | 2, rue des Fories,        +----------------------------------+
      | 4020 Liege, Belgium.      |     #include "disclaim.hpp"      |
      +---------------------------+----------------------------------+