Path: utzoo!attcan!uunet!bu.edu!rpi!zaphod.mps.ohio-state.edu!ub!rutgers!cbmvax!peter From: peter@cbmvax.commodore.com (Peter Cherna) Newsgroups: comp.sys.amiga Subject: Re: Activating Gadgets in C Message-ID: <13581@cbmvax.commodore.com> Date: 2 Aug 90 14:36:20 GMT References: <2384@ryn.esg.dec.com> Reply-To: peter@cbmvax (Peter Cherna) Organization: Commodore, West Chester, PA Lines: 33 In article <2384@ryn.esg.dec.com> barrett@meridn.enet.dec.com (Keith Barrett) writes: >I need help with gadgets in C. I created a database that uses string gadgets >as input. The problem is I can't get the gadgets to auto-activate so that you >don't have to click the mouse on the string gadget to activate it. Two of my colleagues already mentioned the ActivateGadget() function that was added to Intuition in 1.2. If you do any significant work with gadgets you should buy a copy of the 1.3 Libraries and Devices volume of the ROM Kernal Manual, and get the 1.3 Includes and Autodocs book or order the disk-version from CATS. There are a number of gadget functions added in 1.2 that are not documented in the 1.1 RKMs. The 1.1 volumes are white with a colored stripe. The 1.3 editions are blue. As well, if you intend to activate the first gadget when your window opens, you should know that you should wait for the ACTIVEWINDOW IntuiMessage before activating your gadget. This is because a lot of Intuition work happens asynchronously to your task, so when you call OpenWindow(...); ActivateGadget(...); the window may not yet be open or active when ActivateGadget() is called. So add ACTIVEWINDOW to your NewWindow.IDCMPFlags and rock on. >Keith G. Barrett - Software Specialist Internet: barrett@meridn.enet.dec.com Peter -- Peter Cherna, Software Engineer, Commodore-Amiga, Inc. {uunet|rutgers}!cbmvax!peter peter@cbmvax.cbm.commodore.com My opinions do not necessarily represent the opinions of my employer. "This is a one line proof...if we start sufficiently far to the left."