mirror of https://github.com/dahall/Vanara.git
Added helper functions to WINDOWPOS to help when using it with LPARAM values.
parent
ffe6261122
commit
5af855aeb2
|
@ -3044,6 +3044,15 @@ namespace Vanara.PInvoke
|
||||||
|
|
||||||
/// <summary>The window position. This member can be one or more of the following values.</summary>
|
/// <summary>The window position. This member can be one or more of the following values.</summary>
|
||||||
public SetWindowPosFlags flags;
|
public SetWindowPosFlags flags;
|
||||||
|
|
||||||
|
/// <summary>Creates a <see cref="WINDOWPOS"/> structure from an LPARAM value.</summary>
|
||||||
|
/// <param name="lParam">The LPARAM value.</param>
|
||||||
|
/// <returns>A <see cref="WINDOWPOS"/> structure.</returns>
|
||||||
|
public static WINDOWPOS FromLParam(IntPtr lParam) => (WINDOWPOS)Marshal.PtrToStructure(lParam, typeof(WINDOWPOS));
|
||||||
|
|
||||||
|
/// <summary>Updates the <see cref="WINDOWPOS"/> value pointed to by an LPARAM value from this instance.</summary>
|
||||||
|
/// <param name="lParam">The LPARAM value to update.</param>
|
||||||
|
public void UpdateLParam(IntPtr lParam) => Marshal.StructureToPtr(this, lParam, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Special window handles</summary>
|
/// <summary>Special window handles</summary>
|
||||||
|
|
Loading…
Reference in New Issue