Invalidating a widget

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Invalidating a widget

    I am using WM_InvalidateWindow() to invalidate a customized button widget. With this API, only the button will get invalidated or will the adjacent area will get refreshed too? I need only that button to change appearance (color of text on button to blue) and area other than this button should remain unaffected.

    Also, What exactly is the difference between WM_Invalidate() and WM_InvalidateWindow().
  • Hi,

    There is no difference between WM_Invalidate() and WM_InvalidateWindow(). WM_Invalidate() is a macro mapped to WM_InvalidateWindow().

    Calling this function marks a window/widget as invalid and gets redrawn the next time you call GUI_Exec() (or GUI_Delay()).

    If the window/widget has no transparency (e.g. not using WM_CF_HASTRANS) only the window/widget gets redrawn.

    As soon as the window/widget has transparency also its background gets redrawn, but in this case only the area behind the window/widget.

    Regards,
    Sven