home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / alt / toolkits / xview / 1240 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.8 KB  |  55 lines

  1. Newsgroups: alt.toolkits.xview
  2. Path: sparky!uunet!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!fstop.csc.ti.com!droopy!a909937
  3. From: a909937@tiuk.ti.com (Graham Barr          (0004 bodg))
  4. Subject: Re: trying to load xview .icon files during
  5. Message-ID: <1993Jan25.143906.1417@csc.ti.com>
  6. Sender: usenet@csc.ti.com
  7. Nntp-Posting-Host: 134.183.11.38
  8. Reply-To: a909937@tiuk.ti.com
  9. Organization: Texas Instruments Ltd.
  10. References: <1993Jan25.135236.9441@email.tuwien.ac.at>
  11. Date: Mon, 25 Jan 1993 14:39:06 GMT
  12. Lines: 41
  13.  
  14. In article 24301@riogrande.cs.tcu.edu, cinnamon@sabine.cs.tcu.edu (Todd Cinnamon) writes:
  15. >Here's the problem: I'm trying to create a Server_image from data contained
  16. >in a .icon file.  The files are usually (but not always) in a C source
  17. >readable form, but I want to do this process during runtime and do not
  18. >wish to invoke the C compiler everytime I need a new icon.
  19. >
  20. >For example, I have "$OPENWINHOME/include/images/GILfile_glyph.icon" and
  21. >want to create a Server_image, but can't do:
  22. >
  23. >short image_bits[] = {
  24. >#include <images/GILfile_glyph.icon>
  25. >};
  26. >
  27. >since I need to determine the icon I really need during runtime.
  28. >
  29. >How can I create the Server_image using one of these .icon files?
  30. >
  31. >Thanks in advance for your kind and thoughtful responses.
  32.  
  33. #include <xview/icon_load.h>
  34.  
  35. char error_msg[256];
  36. Server_image image = (Server_image)icon_load_svrim("images/GILfile_glyph.icon",
  37.                                                     error_msg);
  38.  
  39. if(!image)
  40.  {
  41.   fprintf(stderr,"%s\n",error_msg);
  42.   exit(1);
  43.  }
  44.  
  45.  
  46. Hope this helps!
  47.  
  48. ***************************************************************************
  49.        Graham Barr               Email: a909937@server1.tiuk.ti.com
  50.  
  51.                  You don't get anywhere without Risc's !!!
  52. ***************************************************************************
  53.  
  54.  
  55.