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
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.