From dd754662394f81453cf1b07c46da891ea6e6ff7a Mon Sep 17 00:00:00 2001 From: Fraser Date: Thu, 20 Feb 2014 23:40:22 +0000 Subject: [PATCH] GetIconInfo function. --- Source/OpenTK/Platform/Windows/API.cs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Source/OpenTK/Platform/Windows/API.cs b/Source/OpenTK/Platform/Windows/API.cs index 13e48714..0c010750 100644 --- a/Source/OpenTK/Platform/Windows/API.cs +++ b/Source/OpenTK/Platform/Windows/API.cs @@ -887,6 +887,33 @@ namespace OpenTK.Platform.Windows #endregion + #region GetIconInfo + + /// + /// Retrieves information about the specified icon or cursor. + /// + /// A handle to the icon or cursor. + /// + /// A pointer to an IconInfo structure. The function fills in the + /// structure's members. + /// + /// + /// If the function succeeds, the return value is nonzero and the + /// function fills in the members of the specified IconInfo structure. + /// + /// If the function fails, the return value is zero. To get extended + /// error information, call Marshal.GetLastWin32Error. + /// + /// + /// GetIconInfo creates bitmaps for the hbmMask and hbmColor members + /// of IconInfo. The calling application must manage these bitmaps and + /// delete them when they are no longer necessary. + /// + [DllImport("user32.dll", SetLastError=true)] + public static extern BOOL GetIconInfo(HICON hIcon, out IconInfo pIconInfo); + + #endregion + [DllImport("user32.dll", SetLastError = true)] public static extern BOOL SetForegroundWindow(HWND hWnd);