Compartir a través de


IVsUIShell2.GetVSCursor Method

Returns a handle to a cursor of a specified cursor type.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)

Syntax

'Declaration
Function GetVSCursor ( _
    cursor As UInteger, _
    <OutAttribute> ByRef phIcon As IntPtr _
) As Integer
int GetVSCursor(
    uint cursor,
    out IntPtr phIcon
)
int GetVSCursor(
    [InAttribute] unsigned int cursor, 
    [OutAttribute] IntPtr% phIcon
)
abstract GetVSCursor : 
        cursor:uint32 * 
        phIcon:IntPtr byref -> int
function GetVSCursor(
    cursor : uint, 
    phIcon : IntPtr
) : int

Parameters

  • cursor
    Type: UInt32

    [in] A value from the __VSCURSORTYPE enumeration specifying the type of cursor to be returned.

  • phIcon
    Type: IntPtr%

    [out] The 32-bit integer handle (HCURSOR) to the appropriate cursor.

Return Value

Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell80.idl:

HRESULT IVsUIShell2::GetVSCursor(
   [in]  VSCURSORTYPE cursor,
   [out] HCURSOR*    phIcon
);

VSPackages that are written in unmanaged code or C++ can directly use the cursor by using the standard Windows cursor management tools. For more information, see Cursors.

VSPackages that are written in managed code should instantiate an instance of the Cursor class by using the overload of its constructor that takes a handle to a cursor as an argument. For more information, see T:System.Windows.Forms.Cursor.

.NET Framework Security

See Also

Reference

IVsUIShell2 Interface

Microsoft.VisualStudio.Shell.Interop Namespace