Announcement

Collapse
No announcement yet.

MouseCursor

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Guest's Avatar
    Guest replied
    You da' man Lance, you da' man...

    Thanks,
    Adam

    ------------------

    Leave a comment:


  • Lance Edmonds
    replied
    The problem is that the class cursor for the control/dialog is restored by Windows. The solution is to either create the control/dialog with a NULL cursor and change it with SetCursor(), or...

    Use SetClassLong(...%GCL_HCURSOR...) once and windows will use that cursor until you change it again.

    It's a good idea to restore the original cursor when your control/dialog is destroyed, and if necessary release the handle for the cursor. ie, always clean up after yourself.

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Guest's Avatar
    Guest started a topic MouseCursor

    MouseCursor

    Hi y'all
    I am currently in the process of translating all the petzold examples to ddt code. I thought it would make a good reference for the future. I am in chapter 9 working with the resource1.bas example. Everything is translated over and works fine except for 1 minor detail. When I load the mouse cursor from the resource file and use SetCursor in response to a
    %WM_MOUSEMOVE message it shows just fine but of course when I move the mouse I get this "flicker" effect. Of course, I understand this would happen because it continually calls SetCursor in repsonse to %WM_MOUSEMOVE messages. Also if I understand the win32hlp file correctly, Windows redraws the cursor everytime you move the mouse after using SetCursor. So of course, this is probably not where I want to process this function, but at the present it is the only way I can get the cursor to change when the mouse is inside the client area of the window. Now remember, as I mentioned earlier;this is DDT not SDK stuff. Is there a way I can tell Windows - "Look just load it up when the mouse is in the client area of the window once and don't redraw the infernal thang!"

    ...ahhhh - pesky little rodent, maybe it's time for some D-Con.

    Regards,
    Adam

    [This message has been edited by Adam Ritchie (edited March 14, 2000).]
Working...
X