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. my cancel button is not working

my cancel button is not working

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
9 Posts 2 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.
  • M Offline
    M Offline
    Mr Bose Dayala
    wrote on last edited by
    #1

    Hai all Iam working on a telelcom project...while reading from or wroting to a node we use to show a progress control and a "Cancel" button on it.Focus will be set ot this button while the process goes on in order to give the user to cancel the process at any time.but my button is not working(not responding) for the mouse click and is working fine if we press the space bar.can anybody solve my problem?? ThomasKennedyBose

    D 1 Reply Last reply
    0
    • M Mr Bose Dayala

      Hai all Iam working on a telelcom project...while reading from or wroting to a node we use to show a progress control and a "Cancel" button on it.Focus will be set ot this button while the process goes on in order to give the user to cancel the process at any time.but my button is not working(not responding) for the mouse click and is working fine if we press the space bar.can anybody solve my problem?? ThomasKennedyBose

      D Offline
      D Offline
      Debs 0
      wrote on last edited by
      #2

      Could you give some more information? Is this a dialog box you are talking about, in which case did you create it using MFC, Class Wizard etc. and using the default id IDCANCEL for it? Debbie

      M 1 Reply Last reply
      0
      • D Debs 0

        Could you give some more information? Is this a dialog box you are talking about, in which case did you create it using MFC, Class Wizard etc. and using the default id IDCANCEL for it? Debbie

        M Offline
        M Offline
        Mr Bose Dayala
        wrote on last edited by
        #3

        ya.....this is a dialog box , using the default id IDCANCEL for it....progressbar will be running in special thread.... ThomasKennedyBose

        D 1 Reply Last reply
        0
        • M Mr Bose Dayala

          ya.....this is a dialog box , using the default id IDCANCEL for it....progressbar will be running in special thread.... ThomasKennedyBose

          D Offline
          D Offline
          Debs 0
          wrote on last edited by
          #4

          Sounds weird then. Are you sure the OnCancel is being called by the spacebar action? I'd override it to double check. Are there any other buttons on the dialog? Are they similarly affected? Debbie

          M 1 Reply Last reply
          0
          • D Debs 0

            Sounds weird then. Are you sure the OnCancel is being called by the spacebar action? I'd override it to double check. Are there any other buttons on the dialog? Are they similarly affected? Debbie

            M Offline
            M Offline
            Mr Bose Dayala
            wrote on last edited by
            #5

            ya....OnCancel is being called by the spacebar action......there are no other buttons on it.... ThomasKennedyBose

            D 1 Reply Last reply
            0
            • M Mr Bose Dayala

              ya....OnCancel is being called by the spacebar action......there are no other buttons on it.... ThomasKennedyBose

              D Offline
              D Offline
              Debs 0
              wrote on last edited by
              #6

              Is the mouse working at all in the rest of the dialog box? Could you try putting in, say, a radio button and seeing whether that works? Debbie

              M 1 Reply Last reply
              0
              • D Debs 0

                Is the mouse working at all in the rest of the dialog box? Could you try putting in, say, a radio button and seeing whether that works? Debbie

                M Offline
                M Offline
                Mr Bose Dayala
                wrote on last edited by
                #7

                no debbi..... no other control is responding. ThomasKennedyBose

                D 1 Reply Last reply
                0
                • M Mr Bose Dayala

                  no debbi..... no other control is responding. ThomasKennedyBose

                  D Offline
                  D Offline
                  Debs 0
                  wrote on last edited by
                  #8

                  Well, I'm stating the b. obvious here, so apologies, but at least you've got the cancel button out of the equation! You could try GetCapture to see which window has the mouse capture, but other than that I'm all out of ideas, I'm afraid. Debbie

                  M 1 Reply Last reply
                  0
                  • D Debs 0

                    Well, I'm stating the b. obvious here, so apologies, but at least you've got the cancel button out of the equation! You could try GetCapture to see which window has the mouse capture, but other than that I'm all out of ideas, I'm afraid. Debbie

                    M Offline
                    M Offline
                    Mr Bose Dayala
                    wrote on last edited by
                    #9

                    Hi,, I tried with this code and it is working fine now AfxGetMainWnd()->GetTopLevelParent()->GetLastActivePopup()->EnableWindow(TRUE); ThomasKennedyBose

                    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