Fixed bug with SetWindowSubclass, SUBCLASSPROC, and RemoveWindowSubclass (#393)

pull/395/head
David Hall 2023-05-01 09:56:04 -06:00
parent 409e5e4bda
commit 275016379a
1 changed files with 3 additions and 3 deletions

View File

@ -71,7 +71,7 @@ namespace Vanara.PInvoke
// dwRefData); https://msdn.microsoft.com/en-us/library/windows/desktop/bb776774(v=vs.85).aspx
[PInvokeData("Commctrl.h", MSDNShortId = "bb776774")]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate IntPtr SUBCLASSPROC(HWND hWnd, uint uMsg, IntPtr wParam, IntPtr lParam, [MarshalAs(UnmanagedType.SysUInt)] uint uIdSubclass, IntPtr dwRefData);
public delegate IntPtr SUBCLASSPROC(HWND hWnd, uint uMsg, IntPtr wParam, IntPtr lParam, nuint uIdSubclass, IntPtr dwRefData);
/// <summary>
/// The set of bit flags that indicate which common control classes will be loaded from the DLL when calling <see cref="InitCommonControlsEx(in INITCOMMONCONTROLSEX)"/>.
@ -1267,7 +1267,7 @@ namespace Vanara.PInvoke
[DllImport(Lib.ComCtl32, SetLastError = false, ExactSpelling = true)]
[PInvokeData("Commctrl.h", MSDNShortId = "bb762094")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool RemoveWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, [MarshalAs(UnmanagedType.SysUInt)] uint uIdSubclass);
public static extern bool RemoveWindowSubclass([In] HWND hWnd, [In, MarshalAs(UnmanagedType.FunctionPtr)] SUBCLASSPROC pfnSubclass, nuint uIdSubclass);
/// <summary>Installs or updates a window subclass callback.</summary>
/// <param name="hWnd">
@ -1305,7 +1305,7 @@ namespace Vanara.PInvoke
[DllImport(Lib.ComCtl32, SetLastError = false, ExactSpelling = true)]
[PInvokeData("Commctrl.h", MSDNShortId = "bb762102")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool SetWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, [MarshalAs(UnmanagedType.SysUInt)] uint uIdSubclass, IntPtr dwRefData);
public static extern bool SetWindowSubclass([In] HWND hWnd, [In, MarshalAs(UnmanagedType.FunctionPtr)] SUBCLASSPROC pfnSubclass, nuint uIdSubclass, IntPtr dwRefData);
/// <summary>
/// <para>