本帖最后由 leif 于 2017-5-8 18:16 编辑
在例子上改的,空窗口改样式可以,但东西一多就只在任务栏有图标,但打不开
#include <GUIConstantsEx.au3>
#include <GuiToolbar.au3>
#include <WindowsConstants.au3>
Example()
Func Example()
Local $hGUI, $hToolbar, $aStrings[5]
Local Enum $e_idOpen, $e_idSave, $idHelp,$e_idredow,$e_idundo
; Create GUI
$hGUI = GUICreate("Toolbar", 400, 300,BitOR($GUI_SS_DEFAULT_GUI,$WS_SIZEBOX,$WS_MAXIMIZEBOX))
$hToolbar = _GUICtrlToolbar_Create($hGUI)
GUISetState(@SW_SHOW )
; Add standard system bitmaps
_GUICtrlToolbar_AddBitmap($hToolbar, 1, -1, $IDB_STD_LARGE_COLOR)
; Add strings
$aStrings[0] = _GUICtrlToolbar_AddString($hToolbar, "&Open")
$aStrings[1] = _GUICtrlToolbar_AddString($hToolbar, "&Save")
$aStrings[2] = _GUICtrlToolbar_AddString($hToolbar, "&Help")
$aStrings[3] = _GUICtrlToolbar_AddString($hToolbar, "&Undo")
$aStrings[4] = _GUICtrlToolbar_AddString($hToolbar, "&Redo")
; Add buttons
_GUICtrlToolbar_AddButton($hToolbar, $e_idOpen, $STD_FILEOPEN, $aStrings[0])
_GUICtrlToolbar_AddButton($hToolbar, $e_idSave, $STD_FILESAVE, $aStrings[1])
_GUICtrlToolbar_AddButtonSep($hToolbar)
_GUICtrlToolbar_AddButton($hToolbar, $e_idundo, $STD_UNDO, $aStrings[3])
_GUICtrlToolbar_AddButton($hToolbar, $e_idredow, $STD_REDOW, $aStrings[4])
_GUICtrlToolbar_AddButtonSep($hToolbar)
_GUICtrlToolbar_AddButton($hToolbar, $idHelp, $STD_HELP, $aStrings[2])
; Loop until the user exits.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc ;==>Example |