#include <Constants.au3>
#include <GuiToolbar.au3>
#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>
$Debug_TB = False
Global $iItem
Global Const $exit = -3
Local Enum $idSave
$hgui = GUICreate("", 500, 300)
$toolbar = _GUICtrlToolbar_Create($hgui, 0)
_GUICtrlToolbar_AddBitmap($toolbar, 1, -1, $IDB_STD_LARGE_COLOR)
$Button1 = _GUICtrlToolbar_AddButton($toolbar, $idSave, $STD_FILENEW)
$Button2 = _GUICtrlToolbar_AddButton($toolbar, "", $STD_FILEOPEN)
$Button3 = _GUICtrlToolbar_AddButton($toolbar, "", $STD_FILESAVE)
GUISetState()
GUIRegisterMsg($WM_NOTIFY, "_WM_NOTIFY")
While 1
$gui = GUIGetMsg()
Switch $gui
Case - 3
ExitLoop
EndSwitch
WEnd
GUIDelete()
Func _WM_NOTIFY($hWndGUI, $MsgID, $wParam, $lParam)
Local $tNMHDR, $code
$tNMHDR = DllStructCreate($tagNMHDR, $lParam)
$code = DllStructGetData($tNMHDR, "Code")
If $code = $NM_LDOWN Then MsgBox(0, '', '')
EndFunc ;==>_WM_NOTIFY
|