Saturday, April 21st 2018, 3:54am UTC+2

You are not logged in.

  • Login
  • Register



Date of registration: Oct 5th 2017

Posts: 30


Saturday, November 25th 2017, 12:03pm

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

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 561


Tuesday, November 28th 2017, 10:23am


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.