Hi to all,
I want to get resources of a PtMultiText on an callback but reading out does not work! The code looks like this, but what I get from the print is a very big number but it should be 1.
long line = 0;
PtGetResource( ABW_ibox_info_ber_result, Pt_ARG_MULTITEXT_Y_SCROLL_POS, &line, 0 );
printf(“line 2 %d\n”, line);
Setting the resource is no problem that works! But I also want to read it out.
Any ideas what I doing wrong???
Thanks
Servusaperat:
Hi to all,
I want to get resources of a PtMultiText on an callback but reading out does not work! The code looks like this, but what I get from the print is a very big number but it should be 1.
long line = 0;
PtGetResource( ABW_ibox_info_ber_result, Pt_ARG_MULTITEXT_Y_SCROLL_POS, &line, 0 );
printf(“line 2 %d\n”, line);
Setting the resource is no problem that works! But I also want to read it out.
Any ideas what I doing wrong???
Thanks
try:
long * line = NULL;
PtGetResource(ABW_ibox_info_ber_result, Pt_ARG_MULTITEXT_Y_SCROLL_POS, &line, 0);
printf(“line 2 %d\n”, *line);
Hi Gabriel,
thanks for your reply, it really helped me out !
I wouldn’t have thought that it is so tricky with this…
Here is how I did it finally just to decrease the scroll posistion:
long *line1 = NULL, line2 = 0;
PtGetResource( ABW_ibox_info_ber_result, Pt_ARG_MULTITEXT_Y_SCROLL_POS, &line1, 0 );
line2 = *line1 - 1;
PtSetResource( ABW_ibox_info_ber_result, Pt_ARG_MULTITEXT_Y_SCROLL_POS, line2, 0 );
I don’t know if it goes easier, but this is how it works and I’m glad about this.
Thanks a lot