Condividi tramite


IVsUIShell2.GetVSCursor(UInt32, IntPtr) Method

Definition

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

public:
 int GetVSCursor(System::UInt32 cursor, [Runtime::InteropServices::Out] IntPtr % phIcon);
public int GetVSCursor (uint cursor, out IntPtr phIcon);
abstract member GetVSCursor : uint32 * nativeint -> int
Public Function GetVSCursor (cursor As UInteger, ByRef phIcon As IntPtr) As Integer

Parameters

cursor
UInt32

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

phIcon
IntPtr

nativeint

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

Returns

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.

Applies to