SKINNING - ways to pass a value (text) to a skinning callback

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

  • SKINNING - ways to pass a value (text) to a skinning callback

    Dear all

    How can I pass a text to a common skinning callback without having to check what widget it has been?
    I would like to do it without using:
    - globals
    - WM_GetId();
    - <WIDGET>_GetUserData to get, for example, the index


    Thanks very much for support so far
  • Hi,

    There is no way to pass a string directly to a skinning routine. You can set a string to most widgets are receive this string by calling the GetText function of this widget.

    For example, set a string to a button with BUTTON_SetText() and receive it inside the skinning function with a call of BUTTON_GetText(). You can use the handle which is past to the skinning routine in the WIDGET_ITEM_DRAW_INFO structure, pDrawItemInfo->hWin. This is always the widget this skinning function belongs to.

    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.