home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.acorn.tech
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!doc.ic.ac.uk!warwick!pavo.csi.cam.ac.uk!idg10
- From: idg10@cl.cam.ac.uk (I.D. Griffiths)
- Subject: Re: Indirected icons in templates and resspr.
- Message-ID: <1992Dec13.020107.28690@infodev.cam.ac.uk>
- Sender: news@infodev.cam.ac.uk (USENET news)
- Nntp-Posting-Host: hall.cl.cam.ac.uk
- Organization: U of Cambridge Computer Lab, UK
- References: <1992Dec10.093501.25007@westminster.ac.uk>
- Date: Sun, 13 Dec 1992 02:01:07 GMT
- Lines: 43
-
- In article <1992Dec10.093501.25007@westminster.ac.uk>, gpcec@westminster.ac.uk (Tom Kirby-Green) writes:
- |> Folks,
- |> Can someone clear something up for me. Using the resspr library
- |> ( Desktop C ) I've placed my application's iconbar-icon and window
- |> icons in a Sprite file, now, in my Template I have sprite icons, button
- |> type 3. BUT NOT indirected. When I do...
- |>
- |> w_handle = template_syshandle( "legoWin" );
- |>
- |> the icons appear ok. However, if I create a indirect sprite
- |> icon in a template file, and then use the above to read the template nothing
- |> appears (!!?!!).
- |> How ( having dynamicly created a sprite area ) do I access the icon
- |> definitions that follow the wimp_wind pointed to by w_handle. According
- |> to the PRMs I need to get hold of the indirected icon's and plug in my
- |> user sprite area before wimp_create_wind'ing the window.
- |>
-
-
- Have you tried setting the sprite area in the window template definition to
- point to your dynamically created sprite area?
-
- How are you doing your indirected sprite exactly? Is it an "Sspritename"
- type thing in the validation string, or actually a direct pointer to the
- sprite? If the former you will definately need to have the sprite area
- referenced in the template before creating the window, and if the latter,
- it is still possible...
-
-
- The way tto get to icon definitions is gettinga pointer to 88 + 32*icno
- where icno is the number of the iccon you require. The template_syshandle
- does (I think) return you a pointer to an actual genuine Wimp_ type
- window definition, so you can access it as you would in any convenient
- language like assembler... C will merely make things difficult for you
- by being awkward about letting you do pointer maths. Something like
- this may work:
-
- icon = (wimp_icon *) (((char *) w_handle) + 88 + 32 * icno );
-
- although I'm not sure if wimp_icon is the type you want, not having my
- C manual to hand.
-
- Ian Griffiths
-