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. CANCEL BUTTON

CANCEL BUTTON

Scheduled Pinned Locked Moved C / C++ / MFC
question
6 Posts 4 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.
  • A Offline
    A Offline
    Adnan Merter
    wrote on last edited by
    #1

    I need to add a button to my form which stops the process, just like cancel button in install applications. which way do i have to use? please somei-one hel me!!!

    CPalliniC D 2 Replies Last reply
    0
    • A Adnan Merter

      I need to add a button to my form which stops the process, just like cancel button in install applications. which way do i have to use? please somei-one hel me!!!

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      Adnan Merter wrote:

      I need to add a button to my form which stops the process, just like cancel button in install applications.

      What process do you need to stop?

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

      In testa che avete, signor di Ceprano?

      1 Reply Last reply
      0
      • A Adnan Merter

        I need to add a button to my form which stops the process, just like cancel button in install applications. which way do i have to use? please somei-one hel me!!!

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

        Adnan Merter wrote:

        I need to add a button to my form which stops the process,

        So what do you need help with, adding a button, responding to a button click, or stopping a process?

        "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

        "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

        A 1 Reply Last reply
        0
        • D David Crow

          Adnan Merter wrote:

          I need to add a button to my form which stops the process,

          So what do you need help with, adding a button, responding to a button click, or stopping a process?

          "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

          "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

          A Offline
          A Offline
          Adnan Merter
          wrote on last edited by
          #4

          i need help about stopping the process the prcess is driving a stepper motor i mean the button must stop all actions while my program sending data to parallel port, just like an emergency "stop button" or "cancel button in install application" thanks

          D L 2 Replies Last reply
          0
          • A Adnan Merter

            i need help about stopping the process the prcess is driving a stepper motor i mean the button must stop all actions while my program sending data to parallel port, just like an emergency "stop button" or "cancel button in install application" thanks

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

            Ok, then you'll need at least one other thread for this. Do the work of communicating with the parallel port in the secondary thread. This will free up the primary thread to handle the UI. See here for the way to gracefully stop a thread.

            "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

            "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

            1 Reply Last reply
            0
            • A Adnan Merter

              i need help about stopping the process the prcess is driving a stepper motor i mean the button must stop all actions while my program sending data to parallel port, just like an emergency "stop button" or "cancel button in install application" thanks

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

              Try some of the following depending on your compiler and environment. standard: exit(-1); Microsoft: ExitProcess(-1); TerminateProcess(GetCurrentProcess(),-1); Microsoft Window: PostMessage(WM_CLOSE,0,0);

              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