How to avoid EN_CHANGE notifications when sending WM_SETTEXT ?

Discussion in 'Win32' started by IvanVecerina, Sep 14, 2006.

  1. IvanVecerina

    IvanVecerina New Member

    Joined:
    Sep 14, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi,
    In an MFC application, I have several text edit controls that are monitored (through the EN_CHANGE event / ON_EN_CHANGE handler) to immediately update some output values. However, as a result of a change of one field, I may have to 'automatically' change the content of another field.

    To avoid any callbacks (and potentially infinite recursion), I would like to be able to set the contents of a text edit field without triggering the ON_EN_CHANGE callback of the containing dialog.

    Do you know of a proper way to do so ?
    An approach I could think of is to temporarily change the parent of the text field (e.g. to NULL), but it's kind of ugly. Any other ideas ?

    Thanks,
    Ivan
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice