Lewis_P@cc.curtin.edu.au (Peter Lewis) (09/21/90)
Hi All, How can a DA own a CDEF resource? I wish to write a DA with a pop-up menu. After looking at some sample code, I now have a working CDEF resource for pop-up menus (that was fairly easy). But to put in in a DA, it must have a resource ID of: 1000 0ddd dddv vvvv where dddddd is the DA driver number, and vvvvv is a variation code. Meanwhile, to call NewControl, you must pass it rrrr rrrr rrrr vvvv where rrr...rrr is a 12-bit resource number, and vvvv is a variation code. So a DA owned resource number must be slightly more that -16384, while a CDEF resource number is 12-bits (I dont even know if it sign-extends, but it wont work either way!). So how can I get arround this? I could kludge it by including the CDEF as an owned resource, and then at run time making a copy of it (either in the System File (probably causing virus detectors to go ape), in my DA file (probably inviting a visit of Apple's thought police), or in a temporary resource file created in the system folder (messy)) with an appropriate CDEF resource ID, but I would preffer a simpler solution. Any help greatly appreciated, Peter. Disclaimer:Curtin & I have an agreement:Neither of us listen to either of us. *-------+---------+---------+---------+---------+---------+---------+-------* Internet: Lewis_P@cc.curtin.edu.au I Peter Lewis ACSnet: Lewis_P@cc.cut.oz.au I NCRPDA, Curtin University Bitnet: Lewis_P%cc.curtin.edu.au@cunyvm.bitnet I GPO Box U1987 UUCP: uunet!munnari.oz!cc.curtin.edu.au!Lewis_P I Perth, WA, 6001, AUSTRALIA