Home
Developer Resources
QNX RTOS v4
QNX RTOS v4 Knowledge Base

QNX RTOS v4 Knowledge Base

Foundry27
Foundry27
QNX RTOS v4 project
Resources

QNX RTOS v4 Knowledge Base

Title Dynamically changing the small SIcon that shows up in the taskbar.
Ref. No. QNX.000009944
Category(ies) Development
Issue Is it possible for an application to dynamically change the small SIcon that shows up at the bottom of screen while it is running?
Solution Yes, it is possible. You need to set the Pt_ARG_LABEL_DATA resource of the SIcon widget.
For example this is how the dialer blinks its lights on the icom:
x09ApDBase_t *icons_db;
x09icons_db = ApOpenDBase(ABM_icons);
/*'"icons" is a picture module containing PtLabel widgets named CIcon1, CIcon2, ...*/
x09char wgt[8];
x09PhImage_t *image;
x09PtArg_t arg;
x09sprintf( wgt, "CIcon%d", index);
x09image = ApGetImageRes(icons_db, wgt);
x09PtSetArg(&arg, Pt_ARG_LABEL_DATA, image, sizeof(*image));
x09PtSetResources(ABW_SIcon, 1, &arg);