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. dialog

dialog

Scheduled Pinned Locked Moved C / C++ / MFC
question
7 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.
  • D Offline
    D Offline
    danag
    wrote on last edited by
    #1

    where do i validate the dialogs data? Is it in the views member function? pl give me an idea. Thanks dana

    C C 2 Replies Last reply
    0
    • D danag

      where do i validate the dialogs data? Is it in the views member function? pl give me an idea. Thanks dana

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      i usually override OnOK in the dialog and do any validation there. if the validation fails, tell the user what happened and then return, don't call CDialog::OnOK. -c


      WWJD? JWRTFM.
         found on /.

      image effects!

      D 1 Reply Last reply
      0
      • D danag

        where do i validate the dialogs data? Is it in the views member function? pl give me an idea. Thanks dana

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        Validate how ? If you're using DDE, then the data validates itself at the time of entry. Christian We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum ) Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002

        D 1 Reply Last reply
        0
        • C Christian Graus

          Validate how ? If you're using DDE, then the data validates itself at the time of entry. Christian We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum ) Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002

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

          it is for validating the string entented in the textbox? to my knowledge, i think we can validate only the max. length of the string in DDX functions? am i correct or not?

          C 1 Reply Last reply
          0
          • D danag

            it is for validating the string entented in the textbox? to my knowledge, i think we can validate only the max. length of the string in DDX functions? am i correct or not?

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            Yes. DDX sucks in any case, you should probably follow Chris' advice and validate in OnOK. Christian We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum ) Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002

            1 Reply Last reply
            0
            • C Chris Losinger

              i usually override OnOK in the dialog and do any validation there. if the validation fails, tell the user what happened and then return, don't call CDialog::OnOK. -c


              WWJD? JWRTFM.
                 found on /.

              image effects!

              D Offline
              D Offline
              danag
              wrote on last edited by
              #6

              Ok, I can override the OnOk function to do my validation, but how to i make the users data to be transferred to the dialog's member variable? do i have to call the DoDataExchange function??

              C 1 Reply Last reply
              0
              • D danag

                Ok, I can override the OnOk function to do my validation, but how to i make the users data to be transferred to the dialog's member variable? do i have to call the DoDataExchange function??

                C Offline
                C Offline
                Chris Losinger
                wrote on last edited by
                #7

                in OnOK, call UpdateData, first. this will send all the data through the DDX functions and into whatever variables you've attached to the controls. then you can look at the member variables and do your other validation. -c


                WWJD? JWRTFM.
                   found on /.

                image effects!

                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