CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    Detecting changes of Controls

    Hi there,

    in my FormView-based application, i have to store the contents/the state of editcontrols, comboboxes and other controls in a database, if the contents of the control
    has been changed by the user.
    Is there a very common way to detect, if the contents of a control has been changed ??
    I tried to overwrite the PreTranslateMessage(..) function, but i do not find a way to detect if for example a user drags a text in a Editfield....

    so i would be very happy if someone could give me a hint for solving this problem.

    Thanks in advance

    Thomas.


  2. #2

    Re: Detecting changes of Controls

    Could you store the original values in OnCreate( ), and then compare them when you need to?

    LA Leonard - Definitive Solutions, Inc.

  3. #3
    Join Date
    May 1999
    Location
    Atlanta, GA, USA
    Posts
    443

    Re: Detecting changes of Controls

    Hi.

    You can check what kind of messages each control has by class wizard.
    For example,
    Edit box has EN_CHANGE and Listbox has LBN_SELCHANGE.

    I just use EN_CHANGE to make the button enabled when I input something in editbox.
    So check the content of each message in order to be satisfied with your desire.

    Hope for help.
    -Masaak Onishi-


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured