diff --git a/PInvoke/User32/WinUser.Window.cs b/PInvoke/User32/WinUser.Window.cs
index 367886c6..589c7878 100644
--- a/PInvoke/User32/WinUser.Window.cs
+++ b/PInvoke/User32/WinUser.Window.cs
@@ -419,6 +419,17 @@ namespace Vanara.PInvoke
LWA_COLORKEY = 0x01,
}
+ /// Specifies whether to enable or disable calls to SetForegroundWindow.
+ [PInvokeData("winuser.h")]
+ public enum LSFW
+ {
+ /// Disables calls to SetForegroundWindow.
+ SFW_LOCK = 1,
+
+ /// Enables calls to SetForegroundWindow.
+ LSFW_UNLOCK = 2,
+ }
+
/// The tiling flags.
[PInvokeData("winuser.h")]
[Flags]
@@ -4810,9 +4821,7 @@ namespace Vanara.PInvoke
public static extern bool IsZoomed(HWND hWnd);
///
- ///
/// The foreground process can call the LockSetForegroundWindow function to disable calls to the SetForegroundWindow function.
- ///
///
///
/// Type: UINT
@@ -4847,12 +4856,12 @@ namespace Vanara.PInvoke
/// interaction with the user.
///
///
- // https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-locksetforegroundwindow BOOL LockSetForegroundWindow( UINT
- // uLockCode );
+ // https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-locksetforegroundwindow
+ // BOOL LockSetForegroundWindow( UINT uLockCode );
[DllImport(Lib.User32, SetLastError = true, ExactSpelling = true)]
- [PInvokeData("winuser.h", MSDNShortId = "locksetforegroundwindow")]
+ [PInvokeData("winuser.h")]
[return: MarshalAs(UnmanagedType.Bool)]
- public static extern bool LockSetForegroundWindow([MarshalAs(UnmanagedType.Bool)] bool uLockCode);
+ public static extern bool LockSetForegroundWindow(LSFW uLockCode);
///
/// Converts the logical coordinates of a point in a window to physical coordinates.