I apologize for cross posting, but I don't know the best place to post this.
This link is a pretty good overview of the various System Cursor routines.
http://www.rocklyte.com/pandora/manu...es/screen.html
I am trying to capture the system cursor & superimpose it on a screen shot
bit map. The problem I am encountering is custom cursors. Custom cursors
have hot spots that are often "off". SetCustomCursor() lets you define the
hot spot, but I don't know how to get it once an application has set it....
Is there a way to determine the "Hot Spot" of a custom cursor? Or maybe
there is a better way to do this in VB.Net?
This code works great when I am dealing with a standard cursor, it doesn't
work right when an application is using a custom cursor:
Thanks in advance for any help!
-----
Private Declare Function GetCursorInfo Lib "User32.dll" (ByRef pCI As
CursorInfo) As Integer
Private Declare Function GetCursorPos Lib "User32.dll" (ByVal lpPoint As
PointAPI) As Integer
Private Declare Function DrawIconEx Lib "User32.dll" (ByVal hDC As Integer,
_
ByVal xLeft As Integer, ByVal yTop As Integer, ByVal hIcon As
Integer, _
ByVal cxWidth As Integer, ByVal cyWidth As Integer, ByVal
istepIfAniCur As Integer, _
ByVal hbrFlickerFreeDraw As Integer, ByVal diFlags As Integer) As
Integer
------
Private Const CURSOR_SHOWING As Long = &H1
Private Const DI_NORMAL As Long = &H3
------
Dim CurInf As CursorInfo
Dim CurPos As PointAPI
CurInf.cbSize = Len(CurInf)
Call GetCursorInfo(CurInf)
If (CurInf.flags And CURSOR_SHOWING) Then
Call DrawIconEx(hMDC, CurInf.ptScreenPos.X, CurInf.ptScreenPos.Y,
CurInf.hCursor, 0, 0, 0, False, DI_NORMAL)
End If
-----