Skip navigation.
Home
The QNX Community Portal

View topic - Usage of PtSetResource() API with Pt_ARG_FLAGS

Usage of PtSetResource() API with Pt_ARG_FLAGS

Isn't the name clear?

Usage of PtSetResource() API with Pt_ARG_FLAGS

Postby sheran.vaz » Tue May 25, 2010 11:26 am

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
sheran.vaz
Active Member
 
Posts: 98
Joined: Mon May 11, 2009 9:17 am

RE: Usage of PtSetResource() API with Pt_ARG_FLAGS

Postby qnxloader » Tue May 25, 2010 11:39 am

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
qnxloader
Senior Member
 
Posts: 206
Joined: Mon Oct 06, 2003 8:29 am

RE: Usage of PtSetResource() API with Pt_ARG_FLAGS

Postby sheran.vaz » Tue May 25, 2010 11:49 am

is it ok to use

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

the 3rd and the 4th arguments interchanged?
sheran.vaz
Active Member
 
Posts: 98
Joined: Mon May 11, 2009 9:17 am

RE: Usage of PtSetResource() API with Pt_ARG_FLAGS

Postby qnxloader » Tue May 25, 2010 12:16 pm

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)
qnxloader
Senior Member
 
Posts: 206
Joined: Mon Oct 06, 2003 8:29 am

RE: Usage of PtSetResource() API with Pt_ARG_FLAGS

Postby sheran.vaz » Tue May 25, 2010 3:36 pm

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
sheran.vaz
Active Member
 
Posts: 98
Joined: Mon May 11, 2009 9:17 am

RE: Usage of PtSetResource() API with Pt_ARG_FLAGS

Postby maschoen » Tue May 25, 2010 4:24 pm

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.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm


Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 3 guests