Replace flags with CSWin32

This commit is contained in:
Jack251970 2024-12-19 14:08:46 +08:00
parent b96c7b12d5
commit 532b5dc4c9
2 changed files with 6 additions and 5 deletions

View file

@ -78,21 +78,19 @@ namespace Flow.Launcher
InitializeComponent();
}
private const int WM_ENTERSIZEMOVE = 0x0231;
private const int WM_EXITSIZEMOVE = 0x0232;
private int _initialWidth;
private int _initialHeight;
private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
{
if (msg == WM_ENTERSIZEMOVE)
if (msg == PInvoke.WM_ENTERSIZEMOVE)
{
_initialWidth = (int)Width;
_initialHeight = (int)Height;
handled = true;
}
if (msg == WM_EXITSIZEMOVE)
if (msg == PInvoke.WM_EXITSIZEMOVE)
{
if (_initialHeight != (int)Height)
{

View file

@ -11,4 +11,7 @@ GetShellWindow
GetWindowRect
GetClassName
FindWindowEx
WINDOW_STYLE
WINDOW_STYLE
WM_ENTERSIZEMOVE
WM_EXITSIZEMOVE