badmojo wrote:
thanks to corrupt for this wonderful script. the buttons are now more easy on the eyes..
i'm not sure if this script being actively updated but i'd like to know if it's possible to show a tooltip when the mouse hovers over the graphic buttons?
Thanks

. I haven't been around or updated many scripts lately... It's possible to show tooltips with the current code. Here's an example:
Code:
; ********************************
; Demo Script
; ********************************
; Load an icon instead for SampleButton2
AGB_LoadIconDll(sb1, "shell32.dll", 166)
; Create the buttons
AddGraphicButton("SampleButton1", sb1, "h36 w36 gMyButton")
; Show the window
Gui, Show, , Bitmap Buttons
; Image rollover for SampleButton1
OnMessage(0x200, "MouseMove")
OnMessage(0x2A3, "MouseLeave")
OnMessage(0x202, "MouseLeave") ; Restore image on LBUTTONUP
Return
MouseLeave(wParam, lParam, msg, hwnd)
{
Global
If (hwnd = SampleButton1_hwnd)
ToolTip
Return
}
MouseMove(wParam, lParam, msg, hwnd)
{
Global
Static _LastButtonData1 = true
If (hwnd = SampleButton1_hwnd)
If (_LastButtonData1 != SampleButton1_hwnd)
ToolTip, Timed ToolTip`nThis will be displayed for 5 seconds.
SetTimer, RemoveToolTip, 5000
_LastButtonData1 := hwnd
Return
}
MyButton:
MsgBox, Graphic button clicked :)
return
RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return
GuiClose:
ExitApp
; from the library file AGB.ahk (included in the zip file in the download)
; *******************************************************************
; Preload icons from a dll for use with the AddGraphicButton() function
; Version: 2.21 Updated: June 22, 2008
; by corrupt
; *******************************************************************
; VariableName = variable name for the loaded image resource
; dllfile = Path to the dll file that contains the image(s)
; nindex = the index of the icon to load
; *******************************************************************
AGB_LoadIconDll(ByRef VariableName, dllfile, nindex) {
Global
Local spid
spid := DllCall("GetCurrentProcessId")
If (%VariableName%_img != "")
DllCall("DeleteObject", "UInt", %VariableName%_img)
VariableName := "1." . DllCall("shell32.dll\ExtractIconA", "UInt", spid, "Str", dllfile, "UInt", nindex)
Return ErrorLevel
}