PtButton

Hi all

i’m new of QNX so is easy this question is too much idiot for you :slight_smile:

how can i arm a PtButton widget from code?

i try to force the Pt_SET bit of Pt_ARG_FLAGS, via PtSetResource but nothing
happen.

long flag=PtWidgetFlags( widget ); flag |= Pt_SET; PtSetResource( widget,Pt_ARG_FLAGS,flag,0 ); \ \ thank in advance donCiccio

donCiccio <donCiccio@hotmail.com> wrote:

Hi all

i’m new of QNX so is easy this question is too much idiot for you > :slight_smile:

how can i arm a PtButton widget from code?

i try to force the Pt_SET bit of Pt_ARG_FLAGS, via PtSetResource but nothing
happen.

CODE
long flag=PtWidgetFlags( widget );
flag |= Pt_SET;
PtSetResource( widget,Pt_ARG_FLAGS,flag,0 );
/CODE>A

PtSetResource(widget, Pt_ARG_FLAGS, flag, flag);

In your example, you just turned “off” all the flags.
For Pt_ARG_FLAGS, the ‘val’ parameter is the value,
the ‘len’ parameter is the mask.


thank in advance
donCiccio

PtSetResource(widget, Pt_ARG_FLAGS, Pt_SET, Pt_SET);

is even better - more concise, and doesn’t affect flags you don’t want to,
so you don’t have to read the flags first.

<dleach@qnx.com> wrote in message news:aabv5i$l9a$1@nntp.qnx.com

donCiccio <> donCiccio@hotmail.com> > wrote:
Hi all

i’m new of QNX so is easy this question is too much idiot for you > :slight_smile:

how can i arm a PtButton widget from code?

i try to force the Pt_SET bit of Pt_ARG_FLAGS, via PtSetResource but
nothing
happen.

CODE
long flag=PtWidgetFlags( widget );
flag |= Pt_SET;
PtSetResource( widget,Pt_ARG_FLAGS,flag,0 );
/CODE>A

PtSetResource(widget, Pt_ARG_FLAGS, flag, flag);

In your example, you just turned “off” all the flags.
For Pt_ARG_FLAGS, the ‘val’ parameter is the value,
the ‘len’ parameter is the mask.


thank in advance
donCiccio
\