discolo@ucsbcsl.UUCP (Anthony V. Discolo) (01/26/86)
In IM, on pp. 33 of the Standard File Package chapter, there is a table which shows the standard dialog box for SFGetFile. The table looks like this: Item number Item Standard display rectangle ----------- ---- -------------------------- 1 Open button (152, 28, 232, 46) 2 Invisible button (1152, 59, 1232, 77) 3 Cancel button (152, 90, 232, 108) 4 UserItem for disk name (248, 28, 344, 46) 5 Eject button (256, 59, 336, 77) 6 Drive button (256, 90, 336, 108) 7 UserItem for file name list (12, 11, 125, 125) 8 UserItem for scroll bar (124, 11, 140, 125) 9 UserItem for gray line (244, 20, 245, 116) 10 Invisible text (statText) (1044, 20, 1145, 116) My question is: "How do I define more items in this list with the Resource Maker?" For starters, I have tried using SFPPutFile to similuate the original dialog box, like this: SFPPutfile(&where, "", NULL, -1, NULL, NULL, &reply, 258, NULL) (in MegaMax C) where the input for Resource Maker is as follows: TYPE DLOG ,258(4) 0 0 136 348 1 0 258 TYPE DITL ,258(32) 10 button ; item #1: Open button 28 152 232 46 Open button ; item #2: Invisible 59 1152 77 1232 button ; item #3: Cancel button 90 152 108 232 Cancel userItem ; item #4: Disk name 28 248 46 344 button ; item #5: Eject button 59 256 336 77 Eject button ; item #6: Drive button 90 256 108 336 Drive userItem ; item #7: File name list 11 12 125 125 useritem ; item #8: Scroll bar 11 12 125 140 useritem ; item #9: Gray line 20 244 116 245 staticText ; item #10: Invisible 20 1044 116 1145 This does not work. I am probably missing something. When I run the program, the buttons appear and work correctly, but the items defined as "userItem" appear as garbage. Can someone help me out? If you have an idea or another reference, please send me mail. Thanks in advance. -- uucp: {ucbvax,cepu}!ucsbcsl!discolo arpa: ucsbcsl!discolo@BERKELEY csnet: discolo@ucsb USMail: U.C. Santa Barbara Department of Computer Science Santa Barbara, CA 93106 GTE: (805) 961-4178
mkg@lzaz.UUCP (Marsh Gosnell) (01/31/86)
To make up a non-standard dialog, you must include all of the standard stuff before you add your new stuff. I tried to make a .r file and compile it with Rmaker but I kept crashing when I tried to view or edit at the dialog with ResEdit (1.0D4). I finally gave up on Rmaker and used ResEdit to cut the "standard" DLOG and DITL resources out of the system and add on my own new items. This works just fine. Marsh Gosnell ihnp4!lzma!mkg