home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / hp / 10174 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  1.2 KB

  1. Path: sparky!uunet!mcsun!uknet!mucs!meehpa01.ee.man.ac.uk!mbheprg
  2. From: mbheprg@meehpa01.ee.man.ac.uk (Raju Gurung)
  3. Newsgroups: comp.sys.hp
  4. Subject: xwd of a motif widget window
  5. Message-ID: <6043@m1.cs.man.ac.uk>
  6. Date: 8 Sep 92 15:35:24 GMT
  7. Sender: news@cs.man.ac.uk
  8. Reply-To: mbheprg@meehpa01.ee.man.ac.uk (Raju Gurung)
  9. Organization: Department of Electrical Engineering, University of Manchester
  10. Lines: 25
  11.  
  12. Hi Netters,
  13.     I'm having problems doing xwdump of a window within a motif application
  14. program. The program goes something like this
  15.     
  16.             Widget xwdump;
  17.         int winnum;
  18.         char winid[10];
  19.  
  20.         winnum =  XtWindow(xwdump);
  21.         
  22.         sprintf(winid,"%d",minnum); /* to convert int into char string */
  23.         execlp("xwd","xwd","-id",winid,"-out","out.xwd",(char *)0);
  24.                    
  25. the xwd gives an error as follows:
  26.              X Error of failed request:  BadWindow (invalid Window parameter)
  27.              Major opcode of failed request:  3 (X_GetWindowAttributes)
  28.              Resource id in failed request:  0x33be198
  29.              Serial number of failed request:  7
  30.              Current serial number in output stream:  7
  31.  
  32.  
  33. but if I note the value of winnum, and type xwd -id winnum -out xwd.out 
  34. on the command line, it works fine. 
  35.  
  36.         Any idea what I'm doing wrong ?
  37.