#Include OnAutoItExitRegister("F_5F0029AC") Global $60FFA4D7[1][13] = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] Global $AD729713 = DllCallbackRegister("F_FA705C3E", "none", "") Global $5103DF02 = _WinAPI_SetTimer(0, 0, 0, DllCallbackGetPtr($AD729713)) Func _JSkin_CreateTT($CtrlId, $Title, $Text, $Timer, $Baloon, $Icon) $60FFA4D7[0][0] += 1 ReDim $60FFA4D7[$60FFA4D7[0][0] + 1][UBound($60FFA4D7, 2)] $60FFA4D7[$60FFA4D7[0][0]][0] = $CtrlId $60FFA4D7[$60FFA4D7[0][0]][1] = $Title $60FFA4D7[$60FFA4D7[0][0]][2] = $Text $60FFA4D7[$60FFA4D7[0][0]][3] = $Timer $60FFA4D7[$60FFA4D7[0][0]][4] = $Baloon $60FFA4D7[$60FFA4D7[0][0]][5] = $Icon If $Baloon = 0 Then $hStyle = BitOR(0x00000001, 0x00000002, 0x80000000) If $Baloon = 1 Then $hStyle = BitOR(0x00000001, 0x00000002, 0x80000000, 0x00000040) $ToolTip = _WinAPI_CreateWindowEx(0x00000008, "Tooltips_Class32", "", $hStyle, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0, 0, 0, 0) $60FFA4D7[$60FFA4D7[0][0]][6] = $ToolTip $60FFA4D7[$60FFA4D7[0][0]][7] = 1 Return $ToolTip EndFunc Func _JSkin_SetTTBkColor($hWnd, $Color) Local $hColor = BitOR(BitAND($Color, 0x00FF00), BitShift(BitAND($Color, 0x0000FF), -16), BitShift(BitAND($Color, 0xFF0000), 16)) Local $Ret = DllCall("user32.dll", "lparam", "SendMessageA", "hwnd", $hWnd, "uint", 0x413, "wParam", $hColor, "lParam", 0) Return $Ret[0] EndFunc Func _JSkin_SetTTTextColor($hWnd, $Color) Local $hColor = BitOR(BitAND($Color, 0x00FF00), BitShift(BitAND($Color, 0x0000FF), -16), BitShift(BitAND($Color, 0xFF0000), 16)) Local $Ret = DllCall("user32.dll", "lparam", "SendMessageA", "hwnd", $hWnd, "uint", 0x414, "wParam", $hColor, "lParam", 0) Return $Ret[0] EndFunc Func _JSkin_SetTTFont($hWnd, $Size = 10, $Weight = 600, $Font = "Arial", $Attribute = 0) Local $hDc = DllCall("user32.dll", "hwnd", "GetDC", "hwnd", $hWnd) Local $Pixel = DllCall("gdi32.dll", "int", "GetDeviceCaps", "hwnd", $hDc[0], "int", 90) Local $Height = DllCall("kernel32.dll", "int", "MulDiv", "int", $Size, "int", $Pixel[0], "int", 72) Local $hFont = DllCall("gdi32.dll", "hwnd", "CreateFont", "int", $Height[0], "int", 0, _ "int", 0, "int", 0, "int", $Weight, "dword", BitAND($Attribute, 2), _ "dword", BitAND($Attribute, 4), "dword", BitAND($Attribute, 8), "int", 1, _ "int", 0, "int", 0, "int", 0, "int", 0, "str", $Font) Local $Ret = DllCall("user32.dll", "int", "SendMessage", "hwnd", $hWnd, "int", 48, "int", $hFont[0], "int", 1) DllCall("user32.dll", "int", "ReleaseDC", "hwnd", $hWnd, "hwnd", $hDc[0]) DllCall("user32.dll", "int", "DeleteObject", "hwnd", $hFont[0]) Return $Ret[0] EndFunc Func _JSkin_TTMaxLen($hWnd, $Max = 100) Local $Ret = DllCall("user32.dll", "lparam", "SendMessageA", "hwnd", $hWnd, "uint", 0x418, "wParam", 0, "lParam", $Max) Return $Ret[0] EndFunc Func _JSkin_SetTTTextRect($hWnd, $X, $Y, $Width, $Height) Local $tRECT = DllStructCreate("int Left;int Top;int Right;int Bottom") DllStructSetData($tRECT, "Left", $X) DllStructSetData($tRECT, "Top", $Y) DllStructSetData($tRECT, "Right", $Width) DllStructSetData($tRECT, "Bottom", $Height) Local $Ret = DllCall("user32.dll", "lparam", "SendMessageA", "hwnd", $hWnd, "uint", 1050, "wParam", 0, "lParam", DllStructGetPtr($tRECT)) Return $Ret[0] EndFunc Func _JSkin_SetTTText($hWnd, $Text) For $i = 1 To $60FFA4D7[0][0] If $60FFA4D7[$i][6] = $hWnd Then $60FFA4D7[$i][2] = $Text EndIf Next EndFunc Func _JSkin_SetTTTitle($hWnd, $Title) For $i = 1 To $60FFA4D7[0][0] If $60FFA4D7[$i][6] = $hWnd Then $60FFA4D7[$i][1] = $Title EndIf Next EndFunc Func _JSkin_SetTTTimer($hWnd, $Timer) For $i = 1 To $60FFA4D7[0][0] If $60FFA4D7[$i][6] = $hWnd Then $60FFA4D7[$i][3] = $Timer EndIf Next EndFunc Func _JSkin_SetTTIcon($hWnd, $Icon) For $i = 1 To $60FFA4D7[0][0] If $60FFA4D7[$i][6] = $hWnd Then $60FFA4D7[$i][5] = $Icon EndIf Next EndFunc Func F_AAD0F456($Id) _SendMessage($60FFA4D7[$Id][6], 1027, 3, $60FFA4D7[$Id][3]) If (($60FFA4D7[$Id][1] <> -1) Or ($60FFA4D7[$Id][1] <> "")) Then DllCall("user32.dll", "lparam", "SendMessageA", "hwnd", $60FFA4D7[$Id][6], "uint", 1056, "int", $60FFA4D7[$Id][5], "str", $60FFA4D7[$Id][1]) EndIf Local $Handle = $60FFA4D7[$Id][0] If Not IsHWnd($Handle) Then $Handle = GUICtrlGetHandle($Handle) Local $tagTOOLINFO = DllStructCreate("int cbSize;int uFlags;hwnd hWnd;int uId;int rect[4];hwnd hinst;ptr lpszText;int lParam;int lpReserved") Local $tBuffer = DllStructCreate("char[256]") DllStructSetData($tBuffer, 1, $60FFA4D7[$Id][2]) DllStructSetData($tagTOOLINFO, "cbSize", DllStructGetSize($tagTOOLINFO)) DllStructSetData($tagTOOLINFO, "uFlags", BitOR(0x00000010, 0x00000001)) DllStructSetData($tagTOOLINFO, "hWnd", $Handle) DllStructSetData($tagTOOLINFO, "uId", $Handle) DllStructSetData($tagTOOLINFO, "hinst", 0) DllStructSetData($tagTOOLINFO, "lpszText", DllStructGetPtr($tBuffer)) DllCall("user32.dll", "lparam", "SendMessageA", "hwnd", $60FFA4D7[$Id][6], "uint", 1028, "wParam", 0, "lParam", DllStructGetPtr($tagTOOLINFO)) EndFunc Func F_FA705C3E($hWnd, $iMsg, $wParam, $lParam) Local $Id = _WinAPI_GetDlgCtrlID(_WinAPI_WindowFromPoint(_WinAPI_GetMousePos())) For $i = 1 To $60FFA4D7[0][0] If $60FFA4D7[$i][0] = $Id Then If $60FFA4D7[$i][7] Then $60FFA4D7[$i][7] = 0 F_AAD0F456($i) EndIf Else $60FFA4D7[$i][7] = 1 EndIf Next EndFunc Func F_5F0029AC() If IsDeclared("AD729713") Then DllCallbackFree($AD729713) DllCall("user32.dll", "int", "KillTimer", "hwnd", 0, "int", $5103DF02) For $i = 0 To $60FFA4D7[0][0] DllCall("User32.dll", "int", "DestroyWindow", "hwnd", $60FFA4D7[$i][6]) Next EndIf EndFunc