1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to avoid EN_CHANGE notifications when sending WM_SETTEXT ?

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

  1. IvanVecerina

    IvanVecerina New Member

    Sep 14, 2006
    Likes Received:
    Trophy Points:
    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 ?


Share This Page