贴代码要用代码标签 【code】#include <GuiToolbar.au3>
#include <GuiImageList.au3>
Local $au3path = RegRead('HKLM\SOFTWARE\AutoIt v3\AutoIt', 'InstallDir')
Local Enum $idNew = 1000, $id1, $id2, $id3
Local $hGUI = GUICreate('Toolbar')
Local $hToolbar = _GUICtrlToolbar_Create($hGUI)
GUISetState()
Local $hImage = _GUIImageList_Create(32, 32, 5, 3)
_GUICtrlToolbar_SetImageList($hToolbar, $hImage)
_GUIImageList_AddIcon($hImage, @SystemDir & '\shell32.dll', 9, 1)
_GUIImageList_AddIcon($hImage, $au3path & '\AutoIt3.exe', 0, 1)
_GUIImageList_AddIcon($hImage, $au3path & '\Examples\WinAPIEx\Extras\Soccer.ico', 0, 1)
_GUICtrlToolbar_InsertButton($hToolbar, 0, $id1, 0)
_GUICtrlToolbar_InsertButton($hToolbar, 1, $id2, 1)
_GUICtrlToolbar_AddButtonSep($hToolbar)
_GUICtrlToolbar_InsertButton($hToolbar, 3, $id3, 2)
Do
Until GUIGetMsg() = -3
|