Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. "please wait" window

"please wait" window

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++
7 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Desmo16
    wrote on last edited by
    #1

    Hi all, I need do open a "please wait" window in order to keep blocked my MFC application (i mean that the user can do nothing) until a time-expensive routine ends. Then i need to close this "please wait" window. I need a modal dialog i suppose. How can i do that ? Should i launch the time-expensive routine from the modal dialog ? Thanx in advance, Desmo16.

    W D H 3 Replies Last reply
    0
    • D Desmo16

      Hi all, I need do open a "please wait" window in order to keep blocked my MFC application (i mean that the user can do nothing) until a time-expensive routine ends. Then i need to close this "please wait" window. I need a modal dialog i suppose. How can i do that ? Should i launch the time-expensive routine from the modal dialog ? Thanx in advance, Desmo16.

      W Offline
      W Offline
      Waldermort
      wrote on last edited by
      #2

      All you need to do is create a new dialog window, open it before runnning your expensive routine and close it after. In my opinion, having a "please wait" and forcing your user to sit there twiddling there thumbs is bad programming. Why not use a thread instead?

      M D 2 Replies Last reply
      0
      • W Waldermort

        All you need to do is create a new dialog window, open it before runnning your expensive routine and close it after. In my opinion, having a "please wait" and forcing your user to sit there twiddling there thumbs is bad programming. Why not use a thread instead?

        M Offline
        M Offline
        Maximilien
        wrote on last edited by
        #3

        yes and no, if you create a Modal dialog, your long task will not be done unless you make it part of the dialog itself.

        waldermort wrote:

        and forcing your user to sit there twiddling there thumbs is bad programming. Why not use a thread instead?

        There are some tasks in some software that will ALWAYS make a user wait, whether it's in a different thread or not.


        Maximilien Lincourt Your Head A Splode - Strong Bad

        1 Reply Last reply
        0
        • W Waldermort

          All you need to do is create a new dialog window, open it before runnning your expensive routine and close it after. In my opinion, having a "please wait" and forcing your user to sit there twiddling there thumbs is bad programming. Why not use a thread instead?

          D Offline
          D Offline
          Desmo16
          wrote on last edited by
          #4

          Because the user knows he has to wait so long and he wants the results that can be shown only AFTER the computation in the routine. ( The routine i'm talkin' about is a multi-objective genetic algorithm that finds a pareto-front of solution after searching the causative bodies of seismic/volcanic effetcs)

          R 1 Reply Last reply
          0
          • D Desmo16

            Because the user knows he has to wait so long and he wants the results that can be shown only AFTER the computation in the routine. ( The routine i'm talkin' about is a multi-objective genetic algorithm that finds a pareto-front of solution after searching the causative bodies of seismic/volcanic effetcs)

            R Offline
            R Offline
            Rage
            wrote on last edited by
            #5

            Desmo16 wrote:

            The routine i'm talkin' about is a multi-objective genetic algorithm that finds a pareto-front of solution after searching the causative bodies of seismic/volcanic effetcs

            :omg: Ohhh this is gonna be my new sig... :cool:

            ~RaGE();

            I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus

            1 Reply Last reply
            0
            • D Desmo16

              Hi all, I need do open a "please wait" window in order to keep blocked my MFC application (i mean that the user can do nothing) until a time-expensive routine ends. Then i need to close this "please wait" window. I need a modal dialog i suppose. How can i do that ? Should i launch the time-expensive routine from the modal dialog ? Thanx in advance, Desmo16.

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              See here.


              "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

              "Judge not by the eye but by the heart." - Native American Proverb

              1 Reply Last reply
              0
              • D Desmo16

                Hi all, I need do open a "please wait" window in order to keep blocked my MFC application (i mean that the user can do nothing) until a time-expensive routine ends. Then i need to close this "please wait" window. I need a modal dialog i suppose. How can i do that ? Should i launch the time-expensive routine from the modal dialog ? Thanx in advance, Desmo16.

                H Offline
                H Offline
                Hamid Taebi
                wrote on last edited by
                #7

                I think you can see an example on http://www.codersource.net/ about this object but i cant remember its name.


                WhiteSky


                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups