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. CDialog close, if i press Enter - Why???

CDialog close, if i press Enter - Why???

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
9 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.
  • K Offline
    K Offline
    Koep
    wrote on last edited by
    #1

    Hi again, my CDialog close if i press Enter. I have removed the standard buttons and the current focus is on a CEdit Control. If i press enter i want to validate the CEdit Content. But i can't catch the "close" message. Can anybody help me ? Marco

    N M 2 Replies Last reply
    0
    • K Koep

      Hi again, my CDialog close if i press Enter. I have removed the standard buttons and the current focus is on a CEdit Control. If i press enter i want to validate the CEdit Content. But i can't catch the "close" message. Can anybody help me ? Marco

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #2

      Override OnOK() and do not call the base class Nish


      Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

      K 1 Reply Last reply
      0
      • N Nish Nishant

        Override OnOK() and do not call the base class Nish


        Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

        K Offline
        K Offline
        Koep
        wrote on last edited by
        #3

        Hi, i have removed the standard Buttons, so i don't have a OnOK Routine ! Marco

        N 1 Reply Last reply
        0
        • K Koep

          Hi, i have removed the standard Buttons, so i don't have a OnOK Routine ! Marco

          N Offline
          N Offline
          Nish Nishant
          wrote on last edited by
          #4

          It doesnt matter at all whether you have or havent removed the OK button. If you press the ENTER key, OnOK will get called. Override it and dont call the base class. Nish


          Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

          K 1 Reply Last reply
          0
          • K Koep

            Hi again, my CDialog close if i press Enter. I have removed the standard buttons and the current focus is on a CEdit Control. If i press enter i want to validate the CEdit Content. But i can't catch the "close" message. Can anybody help me ? Marco

            M Offline
            M Offline
            Michael Dunn
            wrote on last edited by
            #5

            See the VC forum FAQ --Mike-- Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer My really out-of-date homepage Sonork-100.19012 Acid_Helm

            K 1 Reply Last reply
            0
            • M Michael Dunn

              See the VC forum FAQ --Mike-- Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer My really out-of-date homepage Sonork-100.19012 Acid_Helm

              K Offline
              K Offline
              Koep
              wrote on last edited by
              #6

              Why? There's nothing about that! Marco Marco

              R 1 Reply Last reply
              0
              • N Nish Nishant

                It doesnt matter at all whether you have or havent removed the OK button. If you press the ENTER key, OnOK will get called. Override it and dont call the base class. Nish


                Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

                K Offline
                K Offline
                Koep
                wrote on last edited by
                #7

                Thanxs, now it works ! I hate it, if I do not have control of the program sequence. Marco Marco

                1 Reply Last reply
                0
                • K Koep

                  Why? There's nothing about that! Marco Marco

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

                  Koep wrote: Why? There's nothing about that! I would not be that sure. Click here and enjoy ... :-D ~RaGE();

                  K 1 Reply Last reply
                  0
                  • R Rage

                    Koep wrote: Why? There's nothing about that! I would not be that sure. Click here and enjoy ... :-D ~RaGE();

                    K Offline
                    K Offline
                    Koep
                    wrote on last edited by
                    #9

                    Ahh thanxs, i had pressed the "FAQ" link between "What's New". Marco

                    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