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. Find changed Control on Dialog.

Find changed Control on Dialog.

Scheduled Pinned Locked Moved C / C++ / MFC
databasecomhelptutorialquestion
3 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.
  • S Offline
    S Offline
    Sumit Kapoor
    wrote on last edited by
    #1

    Hi.. How to find any control on dialog has changed without tracking setfocus() lostFocus() of each control. As there are too many screens & too many controls on those screens. I just find out, if need for Save on OK Button or not needed. I'm saving data when user press OK.. I want to check that if user changed something then only I run sql to update otherwise nothing should be done... Can anybody help me? Regards Sumit Kapoor Never consider anything impossible before trying to solve that..---Sumit Kapoor--- sumit_kapoor1980@hotmail.com

    C 1 Reply Last reply
    0
    • S Sumit Kapoor

      Hi.. How to find any control on dialog has changed without tracking setfocus() lostFocus() of each control. As there are too many screens & too many controls on those screens. I just find out, if need for Save on OK Button or not needed. I'm saving data when user press OK.. I want to check that if user changed something then only I run sql to update otherwise nothing should be done... Can anybody help me? Regards Sumit Kapoor Never consider anything impossible before trying to solve that..---Sumit Kapoor--- sumit_kapoor1980@hotmail.com

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      Maybe another solution would be to have a member variable in your Dialog class that will be at TRUE hen something changed. So at initialization, this variable is set at FALSE and whenever you change something, set this variable to TRUE.

      S 1 Reply Last reply
      0
      • C Cedric Moonen

        Maybe another solution would be to have a member variable in your Dialog class that will be at TRUE hen something changed. So at initialization, this variable is set at FALSE and whenever you change something, set this variable to TRUE.

        S Offline
        S Offline
        Sumit Kapoor
        wrote on last edited by
        #3

        Sir Ji, That's what I'm asking, When to set this variable TRUE, as your suggestion showing that I need to track all controls for changes..that I don't want to do. I just want to find out, User changed any control's value or Not? if changed then I have to save otherwise Ignore on OK Button. Just Think & let mw know if any idea? Thanks Sumit Kapoor Never consider anything impossible before trying to solve that..---Sumit Kapoor--- sumit_kapoor1980@hotmail.com

        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