Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!udel!haven.umd.edu!mimsy!mojo!russotto From: russotto@eng.umd.edu (Matthew T. Russotto) Newsgroups: comp.sys.mac.programmer Subject: Re: How do I get the slot number for the _MAIN_ Screen? Message-ID: <1991May7.202841.23551@eng.umd.edu> Date: 7 May 91 20:28:41 GMT References: <1991May7.145602.21514@milton.u.washington.edu> Sender: news@eng.umd.edu (C-News) Organization: College of Engineering, Maryversity of Uniland, College Park Lines: 23 In article <1991May7.145602.21514@milton.u.washington.edu> busey@milton.u.washington.edu (Thomas Busey) writes: >I'm sure that this question has been asked before, but how do I get >the slot number for the Main screen (i.e. the one with the menu >bar in it). Thanks for responding. foo() { GDHandle gd; int mainslot gd = GetMainDevice(); mainslot = (*GetADCtlEntry((*gd)->gdRefNum))->dCtlSlot } AuxDCEHandle GetADCtlEntry(refnum) unsigned long refnum; { return *(*((AuxDCEHandle **)0x11c) + (refnum ^ 0xFFFFFFFF)); } -- Matthew T. Russotto russotto@eng.umd.edu russotto@wam.umd.edu .sig under construction, like the rest of this campus.