mystone@sol.engin.umich.edu (Dean (The Mysterious One) Yu) (02/08/89)
I'm writing a program for a class, and I want to change the cursor depending on where the mouse is. If it's in a window, I want the cross cursor. If it's somewhere else, I want the arrow cursor. Theoretically speaking, it should be no problem. I've done similar things before in MPW and Turbo Pascal. Do a GetMouse, and depending on the point, do a SetCursor(crsr), and so on. My problem is that LightSpeed Pascal 2.0 won't let me access the QuickDraw global arrow. I do a SetCursor(arrow); and it gives me a type incompatibility, or something along that line. I thought THINK might have made it into a CursHandle, and tried dereferncing it, and it comes back with 'Too many ^...'. I've looked all over the manual, and it doesn't say a thing about it. I've resorted to making my own arrow CURS resource, but it seems silly to have to do that when it's already done for me. Anyone know what I'm doing wrong, or how to work around it? Many thanks. ______________________________________________________________________________ Dean Yu | E-mail: mystone@caen.engin.umich.edu University of Michigan | Real-mail: Dean Yu Computer Aided Engineering Network | 2413 Kelsey House ===================================| 600 E Madison "These are MY opinions." (My | Ann Arbor, MI 48109 employer doesn't want them. |========================================== Actually, they don't really care | what I think. But President | This space intentionally left blank. Duderstadt does...) | ------------------------------------------------------------------------------
jkjl@munnari.oz (John Lim) (02/10/89)
In article <41565bdb.a590@mag.engin.umich.edu> mystone@sol.engin.umich.edu (Dean (The Mysterious One) Yu) writes: > I'm writing a program for a class, and I want to change the cursor depending >on where the mouse is. If it's in a window, I want the cross cursor. If it's >somewhere else, I want the arrow cursor. Just do an InitCursor() when you want to get the arrowcursor. Hope this helps. john lim
leonardr@uxe.cso.uiuc.edu (02/14/89)
jkjl@munnari.oz in comp.sys.mac.programmer >In article <41565bdb.a590@mag.engin.umich.edu> mystone@sol.engin.umich.edu (Dean (The Mysterious One) Yu) writes: >> I'm writing a program for a class, and I want to change the cursor depending >>on where the mouse is. If it's in a window, I want the cross cursor. If it's >>somewhere else, I want the arrow cursor. > >Just do an InitCursor() when you want to get the arrowcursor. Hope this >helps. > Although this will work, just remember that calling InitCursor does all sorts of other things IN ADDITION to setting the cursor to Arrow. +---------------------------------+-----------------------------------+ + Leonard Rosenthol + fact, then again you might decide+ + President, LazerWare, inc. + that it really isn't, so you + + + never know, do you?? + + leonardr@uxe.cso.uiuc.edu + + + GEnie: MACgician + MacNET: MACgician + + Delphi: MACgician + AppleLink: D0025 + +---------------------------------+-----------------------------------+
tim@hoptoad.uucp (Tim Maroney) (02/15/89)
In article <226000060@uxe.cso.uiuc.edu> leonardr@uxe.cso.uiuc.edu writes: >>Just do an InitCursor() when you want to get the arrowcursor. Hope this >>helps. >> > Although this will work, just remember that calling InitCursor does all >sorts of other things IN ADDITION to setting the cursor to Arrow. Only one is documented -- the cursor level is set to zero. This is only of concern to people who are making ShowCursor/HideCursor calls, which are fortunately rare. The meaning of this side effect is that you should make sure that the cursor is shown (cursor level 0) before calling InitCursor. -- Tim Maroney, Consultant, Eclectic Software, sun!hoptoad!tim "Don't talk to me about disclaimers! I invented disclaimers!" - The Censored Hacker
leonardr@uxe.cso.uiuc.edu (02/16/89)
tim@hoptoad.uucp(Tim Maroney) writes in comp.sys.mac.programmer >In article <226000060@uxe.cso.uiuc.edu> leonardr@uxe.cso.uiuc.edu writes: >>>Just do an InitCursor() when you want to get the arrowcursor. Hope this >>>helps. >>> >> Although this will work, just remember that calling InitCursor does all >>sorts of other things IN ADDITION to setting the cursor to Arrow. > >Only one is documented -- the cursor level is set to zero. ^^^^^^^^^^ You hit the nail on the head, Tim! Remember we are talking about programming the Macintosh and the wonderful documentation that that entails... +---------------------------------+-----------------------------------+ + Leonard Rosenthol + fact, then again you might decide+ + President, LazerWare, inc. + that it really isn't, so you + + + never know, do you?? + + leonardr@uxe.cso.uiuc.edu + + + GEnie: MACgician + MacNET: MACgician + + Delphi: MACgician + AppleLink: D0025 + +---------------------------------+-----------------------------------+ Disclaimer: I sleep with Inside Mac under my pillow hoping I'll learn something!