Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy
getcursorinfo (user32)
 
.
Summary

C# Signature:

[StructLayout(LayoutKind.Sequential)]
struct POINT
{
     public Int32 x;
     public Int32 y;
}

[StructLayout(LayoutKind.Sequential)]
struct CURSORINFO
{
     public Int32 cbSize;        // Specifies the size, in bytes, of the structure.
                     // The caller must set this to Marshal.SizeOf(typeof(CURSORINFO)).
     public Int32 flags;         // Specifies the cursor state. This parameter can be one of the following values:
                     //    0             The cursor is hidden.
                     //    CURSOR_SHOWING    The cursor is showing.
     public IntPtr hCursor;          // Handle to the cursor.
     public POINT ptScreenPos;       // A POINT structure that receives the screen coordinates of the cursor.
}

[DllImport("user32.dll")]
static extern bool GetCursorInfo(out CURSORINFO pci);

private const Int32 CURSOR_SHOWING = 0x00000001;

User-Defined Types:

None.

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

            CURSORINFO pci;
            pci.cbSize = Marshal.SizeOf(typeof(CURSORINFO));
            GetCursorInfo(out pci);

Alternative Managed API:

Do you know one? Please contribute it!

Documentation

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/resources/cursors/cursorreference/cursorstructures/cursorinfo.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/rectangl_0tiq.asp

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions