mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Few fixes for casting errors. These occurred due to commit e5f9fce01e
This commit is contained in:
@@ -106,7 +106,7 @@ namespace mRemoteNG.App
|
||||
public long y;
|
||||
}
|
||||
|
||||
private struct RECT
|
||||
public struct RECT
|
||||
{
|
||||
public long left;
|
||||
public long top;
|
||||
@@ -167,17 +167,17 @@ namespace mRemoteNG.App
|
||||
#endregion
|
||||
|
||||
#region ShowWindow
|
||||
public const UInt32 SW_HIDE = 0;
|
||||
public const UInt32 SW_SHOWNORMAL = 1;
|
||||
public const UInt32 SW_SHOWMINIMIZED = 2;
|
||||
public const UInt32 SW_SHOWMAXIMIZED = 3;
|
||||
public const UInt32 SW_MAXIMIZE = 3;
|
||||
public const UInt32 SW_SHOWNOACTIVATE = 4;
|
||||
public const UInt32 SW_SHOW = 5;
|
||||
public const UInt32 SW_MINIMIZE = 6;
|
||||
public const UInt32 SW_SHOWMINNOACTIVE = 7;
|
||||
public const UInt32 SW_SHOWNA = 8;
|
||||
public const UInt32 SW_RESTORE = 9;
|
||||
public const uint SW_HIDE = 0;
|
||||
public const uint SW_SHOWNORMAL = 1;
|
||||
public const uint SW_SHOWMINIMIZED = 2;
|
||||
public const uint SW_SHOWMAXIMIZED = 3;
|
||||
public const uint SW_MAXIMIZE = 3;
|
||||
public const uint SW_SHOWNOACTIVATE = 4;
|
||||
public const uint SW_SHOW = 5;
|
||||
public const uint SW_MINIMIZE = 6;
|
||||
public const uint SW_SHOWMINNOACTIVE = 7;
|
||||
public const uint SW_SHOWNA = 8;
|
||||
public const uint SW_RESTORE = 9;
|
||||
#endregion
|
||||
|
||||
#region SetWindowPos / WM_WINDOWPOSCHANGING / WM_WINDOWPOSCHANGED
|
||||
@@ -268,9 +268,9 @@ namespace mRemoteNG.App
|
||||
#endregion
|
||||
|
||||
#region Window Placement Flags (WPF)
|
||||
public const UInt32 WPF_SETMINPOSITION = 0x1;
|
||||
public const UInt32 WPF_RESTORETOMAXIMIZED = 0x2;
|
||||
public const UInt32 WPF_ASYNCWINDOWPLACEMENT = 0x4;
|
||||
public const uint WPF_SETMINPOSITION = 0x1;
|
||||
public const uint WPF_RESTORETOMAXIMIZED = 0x2;
|
||||
public const uint WPF_ASYNCWINDOWPLACEMENT = 0x4;
|
||||
#endregion
|
||||
|
||||
#region WM_ACTIVATE
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace mRemoteNG.App
|
||||
if (singletonInstanceWindowHandle != IntPtr.Zero)
|
||||
{
|
||||
if (NativeMethods.IsIconic(singletonInstanceWindowHandle) != 0)
|
||||
NativeMethods.ShowWindow(singletonInstanceWindowHandle, NativeMethods.SW_RESTORE);
|
||||
NativeMethods.ShowWindow(singletonInstanceWindowHandle, (int)NativeMethods.SW_RESTORE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,12 +34,12 @@ namespace mRemoteNG.Tools
|
||||
if (controlHandle == IntPtr.Zero)
|
||||
return false;
|
||||
|
||||
int nCmdShow = 0;
|
||||
uint nCmdShow = 0;
|
||||
if (visible)
|
||||
nCmdShow = NativeMethods.SW_SHOW;
|
||||
else
|
||||
nCmdShow = NativeMethods.SW_HIDE;
|
||||
NativeMethods.ShowWindow(controlHandle, nCmdShow);
|
||||
NativeMethods.ShowWindow(controlHandle, (int)nCmdShow);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user