home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / windows / x / 20220 < prev    next >
Encoding:
Internet Message Format  |  1992-12-15  |  1.1 KB

  1. Path: sparky!uunet!mcsun!uknet!edcastle!castle.ed.ac.uk!jlothian
  2. From: jlothian@castle.ed.ac.uk (J Lothian)
  3. Newsgroups: comp.windows.x
  4. Subject: Re: Set background color.
  5. Message-ID: <29586@castle.ed.ac.uk>
  6. Date: 15 Dec 92 16:32:09 GMT
  7. References: <1992Dec14.113420.22072@sparc4.ncu.edu.tw>
  8. Sender: nntpusr@castle.ed.ac.uk
  9. Organization: Edinburgh University Computing Service
  10. Lines: 16
  11.  
  12. In article <1992Dec14.113420.22072@sparc4.ncu.edu.tw>, u438813@imux120.ncu.edu.tw (Lin Wei-Ting) writes:
  13. |> dpy=(Display *)xv_get(canvas_paint_window(obj),XV_DISPLAY);
  14. |> gc=DefaultGC(dpy,DefaultScreen(dpy));
  15. |> XSetBackground(dpy,gc,pixvalue=(unsigned long)XGetPixel(ximage,k,j));
  16. |> I use the function to set a canvas background color but failed.Why?
  17.  
  18. Because all this does is set the background attribute in the
  19. graphics context. If you want to set the background for a 
  20. window, use XChangeWindowAttributes(). Read the manual.
  21.  
  22. James 
  23. -- 
  24.  
  25. -------------------------------------------------------
  26. James Lothian        |      "It's life, Jim, 
  27. james@uk.ac.ed.caad  |   but not as we know it"
  28.