Re: Replacing the system mouse cursor

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



By the way, PlgBlt is a fast way to rotate a bitmap. If you have a bitmap and an angle
of rotation R through which you want to rotate it,

pt[0].x = width * sin R;
pt[0].y = 0;
pt[1].x = 1 + width * sin R;
pt[1].y = height * sin R;
pt[2].x = 0;
pt[2].y = height * cos R;
then apply PlgBlt

(Win32 Programming, Rector & Newcomer, page 355)
joe

On 24 Aug 2006 01:59:37 -0700, "Andy C" <andrew.cunningham@xxxxxxxxx> wrote:

Thanks for all your helpful replies.

David Ching wrote:
You could write a program that interfaces with your input device and use
mouse_event() to inject mouse movements and clicks into Windows.
This is the path I'll be taking for the time being, as at the moment
I'm
considering it a proof of concept more than anything.

Joseph M. Newcomer wrote:
A more serious question is what do you want the cursor to show? It sounds like you not
only want to "change" it, but you want to add a new dimension of display, such as
orientation.
Yep, exactly.

So the course I'll take is to write a simple program to inject mouse
state
into Windows. The same program will create a rotated bitmap of a
pointer
and call WM_SETCURSOR.

Thanks again for all your help - I haven't used newsgroups in ages and
am really impressed by the quick and thorough responses.

Andrew
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: Need sample code C# bitmap rotate
    ... I have code that allows you to rotate a bitmap but not in the Z ... axis...doing that in windows would be easy as well as you could just map ... I haven't found a simple picture rotate sample in managed ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: Windows CE 2.11 question
    ... Windows CE ... thread called "Intel JPEG ... Alexander Shargin ("Rotate bitmap", ...
    (microsoft.public.windowsce.app.development)
  • Re: WM5 - Bitmap Rotation
    ... and use DirectX 3D to rotate and scale it. ... you're going to rotate the bitmap by 90, 180 or 270 degrees, because ... pixels from the original bitmap point to the same pixel on the ...
    (microsoft.public.pocketpc.developer)
  • Re: STGAPIBuffer rotated to landscape? Possible? How?
    ... Take the bitmap that needs to be rotated and copy it to a DIBSection then use the pointer to the raw bytes create a WORD array and store all pixels as 16bit-565, rotating the picture -90 degrees as you go. ... What I'm trying to do is tweak STGapiBuffer to rotate the bitmap for me as STGAPI is converting it to "native" format. ... In other words what needs to be changed in CreateNativeBitmap and CreateNativeBitmapFromBGRBits in order to rotate my HBITMAP 90deg counterclockwise? ...
    (microsoft.public.pocketpc.developer)
  • Re: This is how I rotate an bitmap
    ... One of the cardinal rules is that you never rotate one way and then rotate back the other. ... Matrix transformations add compound errors to the values so that over time, ... Nothing of the original image is lost, it is getting smaller or the new bitmap is a little bigger then need be. ... When you've made your rotation there is no easy way to tell what is your original bitmap and what is white space. ...
    (microsoft.public.dotnet.framework.drawing)