Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcvax!kth!draken!tut!santra!s29749s From: s29749s@saha.hut.fi (Olli Johannes Arnberg) Newsgroups: comp.sys.mac.programmer Subject: Re: Making a control in the Print Job Dialog inactive Message-ID: Date: 3 Aug 89 15:16:09 GMT References: <56212@tut.cis.ohio-state.edu> <12928@well.UUCP> Sender: news@santra.UUCP Distribution: all Organization: Helsinki University of Technology Lines: 53 In-reply-to: odawa@well.UUCP's message of 30 Jul 89 18:05:08 GMT Michael Odawa writes: > We had to do the same thing in DocuComp, and we used the techniques > outlined in Tech Note #95. The Draft Mode button is Item #8 in the > ImageWriter PrJobDialog. Hilite it as Inactive. In the MyDlgInit procedure > this would entail (in Pascal): > > if PrintHdl^^.PrStl.wDev = BitShift(bDevCItoh,8) { Imagewriter.. } > then begin > GetDItem(PrintDlg, 8, Junk, H, ItemRect); { Draft printing btn.. } > HiliteControl(ControlHandle(H), Inactive); > end; OH NO! Not again. As authors of the HPDJ printer driver for HP DeskJet we would dare to strongly suggest against manipulating ANYTHING in the print record or print dialogs. Although in principle you can tell which printer is used by examining the xxxxxDev (I don't remember which field it was, and the documentation isn't handy now) field, nobody has ever told you that a specific printer does not "support" this or that method of printing. It is YOU that have found out by previous experiences that an ImageWriter does not (currently!) print graphics very well in draft mode. This is something that every ImageWriter user has experienced so that they don't expect graphics output when they have selected draft printing. And as everyone knows, there are several other printers: LaserWriter (in fact, several of them), ImageWriter LQ, Hewlett-Packard DeskJet (there are several drivers for it), Hewlett-Packard PaintJet and so on. When we wrote our driver, the biggest problem rose when using programs that "knew" something of the printer driver (most notorius ones were from Microsoft). Printer records contain several for-driver-only fields that are not to be fiddled with. Nearly every driver uses them for different purposes. So, when writing a program, use only things that are given in Inside Macintosh and in Technical notes. Then everything works. So, why protect a user against expected results? If the user wants to be stupid, let her/him be so. Why prevent your application from working with a future version of ImageWriter driver which prints graphics ok in draft mode (using virtual memory :-)? Why mess up HPDJ's print dialog by inactivating "All"-button? (That is our item 8). There is no reason. Don't do it. Ari Mujunen Olli Arnberg s29851c@taltta.hut.fi s29749s@saha.hut.fi