Dialog background

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

    • Dialog background

      Hi,

      is there a way to change dialog background color? I've tried with function calls to GUI_SetBkColor( GUI_BLACK ) and GUI_Clear() in message WM_PRE_PAINT, but with no luck: background still remain white. Any idea?

      Many thanks
      Andrea
    • Hi,

      Yes, without an overwritten WM_PAINT event you can call WINDOW_SetBkColor().

      But you can also react on WM_PAINT in the dialogs callback function and call GUI_SetBkColor() and GUI_Clear().

      The WM_PRE_PAINT message shouldn't be used for drawing operations. This message (as well as WM_POST_PAINT) is just for preparing the paint event.

      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.