Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rutgers!news.cs.indiana.edu!ux1.cso.uiuc.edu!uxh.cso.uiuc.edu!johnsone From: johnsone@uxh.cso.uiuc.edu (Erik A. Johnson) Newsgroups: comp.sys.mac.programmer Subject: how to handle a mouseDown in another program's windows? Keywords: mouse down Message-ID: <1990Nov27.105828.1396@ux1.cso.uiuc.edu> Date: 27 Nov 90 10:58:28 GMT Sender: news@ux1.cso.uiuc.edu (News) Organization: University of Illinois at Urbana Lines: 30 I am writing a program (Think C 4.0) that in one part uses a modeless dialog. while (not_done) { WaitNextEvent( ... ); if (it_is_a_dialog_event) do_dialog_stuff(); else { if (it_is_a_mouseDown) thePart = FindWindow( ... ); { if (thePart==inMenuBar) do_menu_stuff(); else if (thePart==inSysWindow) SystemClick( ... ); /* here */ } } } What is not working the way I want it to is changing to another program (under MultiFinder, of course) by clicking on another program's window. Do I need to put something else where I marked "/* here */" in the code? Perhaps checking if (mouseDown_inDesk)? Thanks for the help. Erik A. Johnson, Graduate Student \ Internet: johnsone@uxh.cso.uiuc.edu Aeronautical & Astronautical Engineering \ University of Illinois at Urbana-Champaign \ AmericaOnline: ErikAJ