Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!src.honeywell.com!msi.umn.edu!cs.umn.edu!kksys!edgar!mmug!p510.f22.n282.z1.mmug.edgar.mn.org!jspencer From: jspencer@p510.f22.n282.z1.mmug.edgar.mn.org (Jim Spencer) Newsgroups: comp.sys.mac.programmer Subject: Disabling menus when DA's are closed Message-ID: <1.27D17B52@mmug.edgar.mn.org> Date: 3 Mar 91 00:04:44 GMT Sender: ufgate@mmug.edgar.mn.org (newsout1.26) Organization: FidoNet node 1:282/22.510 - mmug UUCP-Fido Gate, Twin Cities, MN USA Lines: 29 Eric Hicks writes in a message to All EH> Just a quick question that is quite probably rather simply solved. EH> An application I'm writing never uses the edit menu while my EH> main window is frontmost. (ie active) I've dimmed the menu, which EH> is easily accomplished in ResEdit. My problem occurs with DA EH> suppport. I can enable the menu when the DA comes up easily, EH> and I also figured out how to tell when the user has chosen close EH> from my file menu as a way to close a DA. My Problem occurs when EH> the user, clicks the close box of a DA. How can I find out when EH> this has happened so that I can dim the edit menu? I have a solution EH> that "works" but it's so ugly that it's not worth posting. E-mail EH> response is fine and I'll summarize to the net if there seems EH> to be a need and the solution isn't obvious. Code fragments in EH> either Pascal or C are fine, as they are relatively easy to inter-translate. EH> If it's any help, I'm using THINK C 4.0. Thanks in advance... You should be disabling the menu whenever the DA's window is not in front. In your main event loop, check FrontWindow. If it is your window, then disable the menu. -- Jim Spencer (jspencer@mmug.edgar.mn.org) [Do not use the @p510.f22.n282.z1.mmug.edgar.mn.org to reply - bounces mail] UUCP: ...jhereg!tcnet!vware!edgar!mmug!jspencer FidoNet: 1:282/22.510 --