home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: alt.toolkits.xview
- Path: sparky!uunet!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!fstop.csc.ti.com!droopy!a909937
- From: a909937@tiuk.ti.com (Graham Barr (0004 bodg))
- Subject: Re: trying to load xview .icon files during
- Message-ID: <1993Jan25.143906.1417@csc.ti.com>
- Sender: usenet@csc.ti.com
- Nntp-Posting-Host: 134.183.11.38
- Reply-To: a909937@tiuk.ti.com
- Organization: Texas Instruments Ltd.
- References: <1993Jan25.135236.9441@email.tuwien.ac.at>
- Date: Mon, 25 Jan 1993 14:39:06 GMT
- Lines: 41
-
- In article 24301@riogrande.cs.tcu.edu, cinnamon@sabine.cs.tcu.edu (Todd Cinnamon) writes:
- >Here's the problem: I'm trying to create a Server_image from data contained
- >in a .icon file. The files are usually (but not always) in a C source
- >readable form, but I want to do this process during runtime and do not
- >wish to invoke the C compiler everytime I need a new icon.
- >
- >For example, I have "$OPENWINHOME/include/images/GILfile_glyph.icon" and
- >want to create a Server_image, but can't do:
- >
- >short image_bits[] = {
- >#include <images/GILfile_glyph.icon>
- >};
- >
- >since I need to determine the icon I really need during runtime.
- >
- >How can I create the Server_image using one of these .icon files?
- >
- >Thanks in advance for your kind and thoughtful responses.
-
- #include <xview/icon_load.h>
-
- char error_msg[256];
- Server_image image = (Server_image)icon_load_svrim("images/GILfile_glyph.icon",
- error_msg);
-
- if(!image)
- {
- fprintf(stderr,"%s\n",error_msg);
- exit(1);
- }
-
-
- Hope this helps!
-
- ***************************************************************************
- Graham Barr Email: a909937@server1.tiuk.ti.com
-
- You don't get anywhere without Risc's !!!
- ***************************************************************************
-
-
-