看了2楼的提示改了下看达到要求没。。
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiStatusBar.au3>
Global $aParts[2] = [750, -1]
$GUIMain = GUICreate("test", 800, 600, -1, -1, BitOR($WS_MAXIMIZEBOX, $WS_MINIMIZEBOX, $WS_SIZEBOX, _
$WS_THICKFRAME, $WS_SYSMENU, $WS_CAPTION, $WS_OVERLAPPEDWINDOW, $WS_TILEDWINDOW, $WS_POPUP, $WS_POPUPWINDOW, _
$WS_GROUP, $WS_TABSTOP, $WS_BORDER, $WS_CLIPSIBLINGS))
$hStatus = _GUICtrlStatusBar_Create($GUIMain)
_GUICtrlStatusBar_SetParts($hStatus, $aParts)
GUIRegisterMsg($WM_SIZE, "WM_SIZE")
GUISetState()
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
Exit
Func WM_SIZE($hWnd, $iMsg, $iwParam, $ilParam)
Local $size = WinGetPos($GUIMain)
Local $aParts[2] = [$size[2]-50, -1]
_GUICtrlStatusBar_SetParts($hStatus, $aParts)
_GUICtrlStatusBar_Resize($hStatus)
Return $GUI_RUNDEFMSG
EndFunc
|