VB看起来好复杂,看AU3的^_^
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
GUICreate("测试窗口",500,300,-1,-1,BitOR($WS_MINIMIZEBOX, $WS_MAXIMIZEBOX, $WS_SIZEBOX))
GUISetState()
GUIRegisterMsg($WM_GETMINMAXINFO, "WM_GETMINMAXINFO")
Do
$msg = GUIGetMsg()
Until $msg=-3
Func WM_GETMINMAXINFO($hWnd, $Msg, $wParam, $lParam)
Local $minmaxinfo
$minmaxinfo = DllStructCreate("int;int;int;int;int;int;int;int;int;int", $lParam)
DllStructSetData($minmaxinfo, 7, 500) ; min X
DllStructSetData($minmaxinfo, 8, 300) ; min Y
DllStructSetData($minmaxinfo,9,500) ; max X
DllStructSetData($minmaxinfo,10,300) ; max Y
Return 0
EndFunc ;==>WM_GETMINMAXINFO
|