Jump to content

Recommended Posts

Posted (edited)

Hi,

Maybe something like this:

#include <GUIConstants.au3>
Global Const $WM_GETMINMAXINFO = 0x24

Global $Width = 300
Global $Height = 300

GUICreate("Resize Limit GUI", $Width, $Height, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_SIZEBOX))
GUIRegisterMsg($WM_GETMINMAXINFO, "MY_WM_GETMINMAXINFO")

GUISetState(@SW_SHOW)


While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend
    
Func MY_WM_GETMINMAXINFO($hWnd, $Msg, $wParam, $lParam)
    Local $MINMAXINFO = DllStructCreate("int;int;int;int;int;int;int;int;int;int", $lParam)
    ;DllStructSetData($MINMAXINFO, 7, $Width) ;Minimum X
    DllStructSetData($MINMAXINFO, 8, $Height+27) ;Minimum Y
    ;DllStructSetData($MINMAXINFO, 9, $Width+100) ;Maximum X
    DllStructSetData($MINMAXINFO, 10, $Height+22) ;Maximum Y
    Return 0
EndFunc

The idea is from here (by Zedna).

Edited by MsCreatoR

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...