Usage of PtSetResource() API with Pt_ARG_FLAGS

Hi

not sure of the usage of the 3rd and 4th arguments in PtSetResource() while setting Pt_ARG_FLAGS.

which one of these is correct

error = PtSetResource( Widget_ID , Pt_ARG_FLAGS, *flags & ~Pt_BLOCKED , Pt_TRUE );

or

error = PtSetResource( Widget_ID , Pt_ARG_FLAGS, Pt_TRUE, *flags & ~Pt_BLOCKED);

Regards
Sheran

simple PtSetResource( Widget_ID , Pt_ARG_FLAGS, Pt_TRUE, Pt_BLOCKED) - to set flag,
PtSetResource( Widget_ID , Pt_ARG_FLAGS, Pt_FALSE, Pt_BLOCKED); to unset flag

is it ok to use

error = PtSetResource( Widget_ID , Pt_ARG_FLAGS, *flags & ~Pt_BLOCKED , Pt_TRUE );

the 3rd and the 4th arguments interchanged?

I think yes, (bit operation, that function do, may be interchanged), but this method not documented in help (look at topic: Manipulating Resources in Application Code)

how do u say yes?

I don’t get it. That won’t be possible, to my knowledge.

Yes i went through that Manipulating Resources in Application Code. It doesn’t show that it can be used as above. I found one such usage in my code. I’m not sure what effect would it have. but everything seem to work fine.

Can you provide me more info on that.

Regards
Sheran

The first parm is the values you want and the 2nd is a mask. If you want to turn a bit on and you switch them it will work. If you want to turn a bit off and you switch them it will not.