Path: utzoo!mnetor!uunet!husc6!tut.cis.ohio-state.edu!osu-cis!att-cb!att-ih!ihnp4!inuxc!iuvax!pur-ee!uiucdcs!uxc.cso.uiuc.edu!uxe.cso.uiuc.edu!leonardr From: leonardr@uxe.cso.uiuc.edu Newsgroups: comp.sys.mac.programmer Subject: Re: referencing pointers to resources i Message-ID: <226000003@uxe.cso.uiuc.edu> Date: 20 Mar 88 01:58:00 GMT References: <1474@puff.cs.wisc.edu> Lines: 31 Nf-ID: #R:puff.cs.wisc.edu:1474:uxe.cso.uiuc.edu:226000003:000:1870 Nf-From: uxe.cso.uiuc.edu!leonardr Mar 19 19:58:00 1988 geraldn@puff.UUCP(Gerald Ngui) writes in comp.sys.mac.programmer >Following is some source code that obtains the FKEY resource to >dump the screen to the printer. From the fkeyhandle, >I get a pointer(fkeyptr) to the FKEY resource that prints the screen. One thing that I have seen in this article and in all the others that have to do with screen printing is that they ALL assume that FKEY ID#4 will ALWAYS be the one that prints the screen. Since the Mac can be modified to use ANY FKEYs you want (except for ID#1 and ID#2), you should not make this assump- tion as some user may have another FKEY in ID#4 and he/she will get strange results. There was period of time when I did not own a printer, and so I removed the FKEY#4 from my system and replaced it with something else, and had I executed your application which made this assumption, I would have been QUITE surprised!! A better method might be to just put the existing Printing FKEY or a modified version of it under a different ResType (like PROC for example) in your application and then referencing it from your program using a KNOWN entity like this rather than an unknown one. +---------------------------------+-----------------------------------+ + + Any thing I say may be taken as + + Leonard Rosenthol + fact, then again you might decide+ + President, LazerWare, inc. + that it really isn't, so you + + + never know, do you?? + + leonardr@uxe.cso.uiuc.edu + + + GEnie: MACgician + + + Delphi: MACgician + + + + + +---------------------------------+-----------------------------------+