home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / acorn / tech / 990 < prev    next >
Encoding:
Text File  |  1992-12-12  |  2.4 KB  |  56 lines

  1. Newsgroups: comp.sys.acorn.tech
  2. 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
  3. From: idg10@cl.cam.ac.uk (I.D. Griffiths)
  4. Subject: Re: Indirected icons in templates and resspr.
  5. Message-ID: <1992Dec13.020107.28690@infodev.cam.ac.uk>
  6. Sender: news@infodev.cam.ac.uk (USENET news)
  7. Nntp-Posting-Host: hall.cl.cam.ac.uk
  8. Organization: U of Cambridge Computer Lab, UK
  9. References: <1992Dec10.093501.25007@westminster.ac.uk>
  10. Date: Sun, 13 Dec 1992 02:01:07 GMT
  11. Lines: 43
  12.  
  13. In article <1992Dec10.093501.25007@westminster.ac.uk>, gpcec@westminster.ac.uk (Tom Kirby-Green) writes:
  14. |> Folks,
  15. |>     Can someone clear something up for me. Using the resspr library
  16. |> ( Desktop C ) I've placed my application's iconbar-icon and window
  17. |> icons in a Sprite file, now, in my Template I have sprite icons, button
  18. |> type 3. BUT NOT indirected. When I do...
  19. |> 
  20. |>     w_handle = template_syshandle( "legoWin" );
  21. |> 
  22. |>     the icons appear ok. However, if I create a indirect sprite
  23. |> icon in a template file, and then use the above to read the template nothing
  24. |> appears (!!?!!).
  25. |> How ( having dynamicly created a sprite area ) do I access the icon
  26. |> definitions that follow the wimp_wind pointed to by w_handle. According
  27. |> to the PRMs I need to get hold of the indirected icon's and plug in my
  28. |> user sprite area before wimp_create_wind'ing the window.
  29. |> 
  30.  
  31.  
  32. Have you tried setting the sprite area in the window template definition to
  33. point to your dynamically created sprite area?
  34.  
  35. How are you doing your indirected sprite exactly?  Is it an "Sspritename"
  36. type thing in the validation string, or actually a direct pointer to the
  37. sprite?  If the former you will definately need to have the sprite area
  38. referenced in the template before creating the window, and if the latter,
  39. it is still possible...
  40.  
  41.  
  42. The way tto get to icon definitions is gettinga pointer to 88 + 32*icno
  43. where icno is the number of the iccon you require.   The template_syshandle
  44. does (I think) return you a pointer to an actual genuine Wimp_ type
  45. window definition, so you can access it as you would in any convenient
  46. language like assembler...  C will merely make things difficult for you
  47. by being awkward about letting you do pointer maths.  Something like
  48. this may work:
  49.  
  50.   icon = (wimp_icon *) (((char *) w_handle) + 88 + 32 * icno );
  51.  
  52. although I'm not sure if wimp_icon is the type you want, not having my
  53. C manual to hand.
  54.  
  55. Ian Griffiths
  56.