[comp.sys.mac] How to Plot Icons??

snell@orstcs2.cs.ORST.EDU (05/07/87)

I need some help placing Icons on the desktop in my program.  No one seems to
understand how to do it.  Can any one help me with it??

I'm using Lightspeed Pascal and I'm trying to put Clickable Icons on the desktop
of my program. 

This is what we have tried.  
	1) GetPort(globalportvariable)
	executed after InitGraf,
	2) when I'm ready to put the Icons on the desktop I do
	GetPort(oldport)
	SetPort(globalportvariable)
	IconHandle := GetIcon(IconID)
	PlotIcon(IconHandle,destinationrectange)
	SetPort(oldport)

If anyone can respond I'd appreciate it.
I don't have an email account so respond on the notes file.

Vance Snell
A true Beaver Beleiver

snell@orstcs2.cs.ORST.EDU (05/09/87)

The solution to the problem was provided by an old Vitex programmer.

If you want to put Icons on the desktop you need to write an assembly language
routine and call it using DeskHook (a low level call)

I don't have an assembler so I 
1) Made a plain window 
2) Filled it with the current pattern on the screen
3) Plotted the Icons in the window 
4) Then treated the window as part of the desktop in my interface
   but picked of double clicks using GetDBLtime, and PtinRect etc.

   Vance Snell