🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #1921

Re: Custom "cursors"

#1921
From: Mark Epperson
Date: Tue, 02 Apr 1991 03:28
20 lines
1508 bytes
In article <1991Apr2.102934.3290@waikato.ac.nz> iam@waikato.ac.nz (Ian McDonald) writes:
>I am writing an audio editor for Microsoft Windows.  For each audio window
>there are two "cursors".  I want to be able to click on each cursor and then
>drag it around (in similar style to a scroll bar dragging).
>
>I am using Microsoft C and the SDK but hope to change to Borland C++ once it is
>available in New Zealand.
>
>I was wondering how to tackle these "cursors".  Is it best to create a new type
>of resource or best to draw a graphic item on and watch the mouse messages or
>should I make it a (very small) window??

One way to do this to erase the "cursor" that you drew on the screen and 
change the GWC_HCURSOR field in the window to a cursor (loaded from a resource
with LoadCursor()).  This will cause windows to draw that cursor sa soon
as you move the mouse, replacing the bitmap "cursor" which you have erased.  
The redraw your cursor and change the GWC_HCURSOR field back when you get
the WM_LBUTTONUP message.

- Mark Epperson
Technical Details
Message-ID: <13465@adobe.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!decwrl!adobe!epperson
References: <1991Apr2.102934.3290@waikato.ac.nz>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!decwrl!adobe!epperson
From: epperson@adobe.COM (Mark Epperson)
Newsgroups: comp.windows.ms.programmer
Subject: Re: Custom "cursors"
Message-ID: <13465@adobe.UUCP>
Date: 2 Apr 91 03:28:28 GMT
References: <1991Apr2.102934.3290@waikato.ac.nz>
Reply-To: epperson@adobe.UUCP (Mark Epperson)
Organization: Adobe Systems Incorporated, Mountain View
Lines: 20