Fix build

This commit is contained in:
cuiliang committed 2022-02-19 09:57:00 +08:00
1 parent 85e8909b11
commit 7030f3d203
2 files changed
+16 -2

No files matched your search

@@ -306,7 +306,7 @@ namespace HandyControl.Tools.Interop
internal static InteropValues.WINDOWPLACEMENT GetWindowPlacement(IntPtr hwnd)
{
InteropValues.WINDOWPLACEMENT wINDOWPLACEMENT = new InteropValues.WINDOWPLACEMENT();
InteropValues.WINDOWPLACEMENT wINDOWPLACEMENT = InteropValues.WINDOWPLACEMENT.Default;
if (GetWindowPlacement(hwnd, wINDOWPLACEMENT))
{
return wINDOWPLACEMENT;
@@ -364,12 +364,26 @@ namespace HandyControl.Tools.Interop
[StructLayout(LayoutKind.Sequential)]
internal struct WINDOWPLACEMENT
{
public int length = Marshal.SizeOf(typeof(WINDOWPLACEMENT));
public int length;
public int flags;
public SW showCmd;
public POINT ptMinPosition;
public POINT ptMaxPosition;
public RECT rcNormalPosition;
/// <summary>
/// Gets the default (empty) value.
/// </summary>
public static WINDOWPLACEMENT Default
{
get
{
WINDOWPLACEMENT result = new WINDOWPLACEMENT();
result.length = Marshal.SizeOf(result);
return result;
}
}
}
[StructLayout(LayoutKind.Sequential, Pack = 4)]