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. Queue Mouse event till process completes.

Queue Mouse event till process completes.

Scheduled Pinned Locked Moved C / C++ / MFC
c++data-structurestutorial
5 Posts 3 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.
  • U Offline
    U Offline
    User 3831761
    wrote on last edited by
    #1

    Hello, I have an MFC dialog based application which does come sequence of tasks one after other. Each process takes few minutes to complete. I popup a dialog with cancel button on it with status of current task. If use selects cancel on the popup dialog. The process has to wait till the current task complete and then stop executing next task. Can someone tell me how to wait on process till it complete and then execute the mouse event. Thanks in advance.

    S L 2 Replies Last reply
    0
    • U User 3831761

      Hello, I have an MFC dialog based application which does come sequence of tasks one after other. Each process takes few minutes to complete. I popup a dialog with cancel button on it with status of current task. If use selects cancel on the popup dialog. The process has to wait till the current task complete and then stop executing next task. Can someone tell me how to wait on process till it complete and then execute the mouse event. Thanks in advance.

      S Offline
      S Offline
      Sauro Viti
      wrote on last edited by
      #2

      You can do something like this: when the user presses Cancel, set a flag about it, then disable the button and optionally setup a label on you progress dialog that advice "Cancel in progress...", finally at the end of each task check the flag and if it is set stop processing the remaining ones.

      1 Reply Last reply
      0
      • U User 3831761

        Hello, I have an MFC dialog based application which does come sequence of tasks one after other. Each process takes few minutes to complete. I popup a dialog with cancel button on it with status of current task. If use selects cancel on the popup dialog. The process has to wait till the current task complete and then stop executing next task. Can someone tell me how to wait on process till it complete and then execute the mouse event. Thanks in advance.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        The IProgressDialog[^] interface provides everything you need for such a situation.

        It's time for a new signature.

        U 1 Reply Last reply
        0
        • L Lost User

          The IProgressDialog[^] interface provides everything you need for such a situation.

          It's time for a new signature.

          U Offline
          U Offline
          User 3831761
          wrote on last edited by
          #4

          Thanks for the suggestion.. Any pointers for IProgressDialog example, would be of great help. As i am getting errors during compilation. Else have to follow the other method. Thanks a lot for the help.. Regards..

          L 1 Reply Last reply
          0
          • U User 3831761

            Thanks for the suggestion.. Any pointers for IProgressDialog example, would be of great help. As i am getting errors during compilation. Else have to follow the other method. Thanks a lot for the help.. Regards..

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            Member 3834630 wrote:

            Any pointers for IProgressDialog example,

            I gave you the link in my previous message; it's a fairly simple one to implement.

            Member 3834630 wrote:

            i am getting errors during compilation.

            Well, unless you tell us what the errors are we cannot help much.

            It's time for a new signature.

            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