Overwriting GUIBuilder Window Creation Callback

  • Hello
    How Can I overwrite GUIBuilder window creation callback. I want to draw a window with gradient background color.

    I tried the following modification on GUIBuilder output, but i did not work.

    (Compiler warning is included at the bottom of code)

    Thanks in advance

  • Hi,

    the GUI_WIDGET_CREATE_INFO structure is defined as follows:

    As last parameter you passed a pointer to a callback function, where the number of extra bytes to be allocated should be. So instead of _cbWin, you can just pass 0 as last parameter.
    The WINDOW widget in your _aDialogCreate structure is not a separate window widget, it is the dialog. So, to draw a gradient you don't need another callback, you can just copy the WM_PAINT case from _cbWin0 into the _cbDialog callback.

    Best regards,

    Florian

    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: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!