本帖最后由 happytc 于 2011-8-27 12:45 编辑
Live Capture里关于这块的代码
#include <ListViewConstants.au3>
#include <SliderConstants.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#Include <Clipboard.au3>
#include <GuiToolbar.au3>
#Include <GuiImageList.au3>
Global Enum Step 1 $tIdText = 1000, $tIdArrow, $tIdRect, $tIdEllipse, $tIdCurve, $tIdUndo, $tIdExit, $tIdCopy, $tIdSave
$hToolbarGui = GUICreate("", 240, 30, -1, -1, $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST))
$tToolBar = _GUICtrlToolbar_Create($hToolbarGui)
GUICtrlSetBkColor(-1, 0x42423E)
$tToolIcon = _GUIImageList_Create(20, 20)
For $i = 1 To 9
_GUIImageList_AddIcon($tToolIcon, @ScriptDir & "\IconA.dll", $i, True)
Next
_GUICtrlToolbar_SetImageList($tToolBar, $tToolIcon)
_GUICtrlToolbar_AddButton($tToolBar, $tIdText, 0, 0, $BTNS_CHECKGROUP)
_GUICtrlToolbar_AddButton($tToolBar, $tIdArrow, 1, 0, $BTNS_CHECKGROUP)
_GUICtrlToolbar_AddButton($tToolBar, $tIdRect, 2, 0, $BTNS_CHECKGROUP)
_GUICtrlToolbar_AddButton($tToolBar, $tIdEllipse, 3, 0, $BTNS_CHECKGROUP)
_GUICtrlToolbar_AddButton($tToolBar, $tIdCurve, 4, 0, $BTNS_CHECKGROUP)
_GUICtrlToolbar_AddButton($tToolBar, $tIdUndo, 5)
_GUICtrlToolbar_AddButton($tToolBar, $tIdExit, 6)
_GUICtrlToolbar_AddButton($tToolBar, $tIdCopy, 7)
_GUICtrlToolbar_AddButton($tToolBar, $tIdSave, 8)
GUISetState()
While True
If -3 == GUIGetMsg() Then Exit
Sleep(10)
WEnd
|