how can i unblock the button from within the code?


i want to block and to unblock a button from within the code of a qnx appbuilder project. I found out, how the blocking works:

PtArg_t FlagArgs[2];

PtSetResources(button, 2, (PtArg_t *) &FlagArgs );

At another position in the code, i want to unblock / unghost this button.
How does this works?
I didn´t find something in the documentation and tried it with “Pt_UNBLOCK”, but of course it does not work :laughing: .


enable flags:
PtSetArg(&args[0], Pt_ARG_FLAGS, Pt_TRUE, Pt_BLOCKED | Pt_GHOST);

disable flags:
PtSetArg(&args[0], Pt_ARG_FLAGS, Pt_FALSE, Pt_BLOCKED | Pt_GHOST);

also can be used to enable/disable in one arg (eg: enable Pt_BLOCKED and disable Pt_GHOST):
PtSetArg(&args[0], Pt_ARG_FLAGS, Pt_BLOCKED, Pt_BLOCKED | Pt_GHOST);


it works