Jump to content

Recommended Posts

Posted

For what it's worth, here is what ended up working for me:

;==============================================
Func WM_MOVE($hWnd, $iMsg, $wParam, $lParam)
    #forceref $iMsg, $wParam, $lParam
    Local Static $bSizeboxOffScreen = False

    If $hWnd = $g_hGUI Then
        Local $aPos = WinGetPos($g_hSizebox)
        If $aPos[0] + $aPos[2] > @DesktopWidth Or $aPos[1] + $aPos[3] > @DesktopHeight Then
            $bSizeboxOffScreen = True
        Else
            If $bSizeboxOffScreen Then
                ; sizebox was off-screen but is back in range now, redraw GUI
                _WinAPI_RedrawWindow($g_hGui)
                $bSizeboxOffScreen = False
            EndIf
        EndIf
        _WinAPI_RedrawWindow($g_hSizebox)
    EndIf
    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_MOVE

Keep in mind that this may or may not work in a multi-monitor setup. However, multi-monitor setups require quite a bit different DPI scaling settings and so on. So this is quite basic but it works 100% of the time for me. :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...