Operating System - HP-UX
1833803 Members
2422 Online
110063 Solutions
New Discussion

OSF/Motif & XT - XtGetValues question

 
SOLVED
Go to solution
Joan Coleman
Occasional Contributor

OSF/Motif & XT - XtGetValues question

If this is not the correct forum for Motif - please excuse me - and let me know where I should post it.

I am using the XtGetValues call to try and determine the width of a RowCol widget which is contained in a popup shell. The shell is displayed on the screen before I make the call, as follows:
ac = 0;
XtSetArg(al[ac],XmNwidth, &rcwidth);
ac++;
XtgetValues(rcwidget,al,ac);

The problem is the returned value in rcwidth is a VERY large number (26083318). I believe the width should be in pixels. Am I doing something wrong here?? Thanks in advance for any help
3 REPLIES 3
Wodisch_1
Honored Contributor
Solution

Re: OSF/Motif & XT - XtGetValues question

Hi Joan,

this forum is alright I guess, but you might want to try the HP Developer's list, too...

Assuming that you defined "al" and "rcwidget" like:
XtValues al[1];
Widget rcwidget; /* or similiar */

the resolution would be in pixels. But did your "XtGetValues" succeed?
Run your program inside a terminal window and check the error output...
Oh, and check wether "rcwidget" is actually a NULL pointr :-(

HTH,
Wodisch
Joan Coleman
Occasional Contributor

Re: OSF/Motif & XT - XtGetValues question

Thanks Wodisch for taking time to reply. I followed your suggestions and everything looked good - come to find out I had the return value declared as an integer instead of 'Dimension'. I have to remember to use the Xm typedefs!

(When I figure out how to supply a rating I'll assign you some points - thanks again)
Wodisch_1
Honored Contributor

Re: OSF/Motif & XT - XtGetValues question

Hi again,

"Dimension" should be one of the *unsigned* integer types, maybe even 16bit (i.e. "short"), so may have got garbage from the following bytes...
You can assign points as soon as you are logged in - then you'll see blue buttons on the top right of each reply. Click on these to assign the points for that reply. At the bottom of the page should be another blue button to send all your assigned points at once to forums-server...

Regards,
Wodisch