-
March 20th, 2007, 06:19 PM
#1
Create a cursor from DC?
I have an ActiveX control that displays a line of text. I want to change the cursor to show the text itself when the user drags the control (to drop it somewhere else).
How can I create a cursor from the text drawn on/by the control?
-
March 20th, 2007, 11:42 PM
#2
Re: Create a cursor from DC?
So the text will be different each time?
This might get a bit tricky...
Microsoft LVP - Least Valuable Professional
Please rate this post... Pleeeeeeaaassee!!!
-
March 21st, 2007, 11:19 AM
#3
Yes...
I want to use the text that is drawn to create a cursor, so that the user sees the actual text move across the page as it is dragged.
-
March 21st, 2007, 04:45 PM
#4
Re: Yes...
Just handle the mouse move message, erase the text in the old location, and draw the text int he new location. IIRC, cursors can't be bigger then a set size (I want to say 16x16 pixels, but I'm not sure that's right).
Viggy
-
March 21st, 2007, 05:18 PM
#5
Re: Yes...
Originally Posted by MrViggy
Just handle the mouse move message, erase the text in the old location, and draw the text int he new location. IIRC, cursors can't be bigger then a set size (I want to say 16x16 pixels, but I'm not sure that's right).
Viggy
Yeah but even if he can get the text string (which he should be able to) how do you create a cursor resource with the text in it as an image in the cursor, at runtime?
I'd be interested to know. I'll add a subscription to this thread.
Microsoft LVP - Least Valuable Professional
Please rate this post... Pleeeeeeaaassee!!!
-
March 21st, 2007, 08:05 PM
#6
Re: Create a cursor from DC?
My intent is to leave the existing text as displayed, so the user knows where it "was", as well as WHAT it was as he/she is dragging it somewhere else.
Re: the size of a cursor, maybe a cursor per se isn't the right way to think of this... is there a way to just move a block of pixels (transparent except the text) around with the mouse? At the same time change the cursor to a pre-defined dot-sized transparent one so you wouldn't see it on top of the moving text.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|