#AutoIt3Wrapper_Icon=res\iTT.ico #AutoIt3Wrapper_Outfile=iSafari TT 1.0.exe #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_Res_Comment=by DJSIR and The French AutoIt Team #AutoIt3Wrapper_Res_Description=DJSIR, Inc #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Res_LegalCopyright=Creative Commons 2.0 FR (by-nc-sa) #AutoIt3Wrapper_Res_Language=1036 #NoTrayIcon #include $THEME = FileOpenDialog("iSafari 4 TT", @ScriptDir, "Apparences pour iSafari 4 (*.dll)") If $THEME = "" Then Exit $GUI = GUICreate("iSafari 4", 300, 120) Dim $Button[17] For $i = 1 To 16 $Button[$i] = GUICtrlCreatePic("", 0, 0, 0, 0) Next SetBitmapResourceToPicCtrl($GUI, $Button[1], 8, 24, 24, 24, $THEME, "101_BMP", "str") SetBitmapResourceToPicCtrl($gui, $Button[2], 40, 24, 24, 24, $THEME, "102_BMP", "str") SetBitmapResourceToPicCtrl($gui, $Button[3], 72, 24, 24, 24, $THEME, "103_BMP", "str") SetBitmapResourceToPicCtrl($gui, $Button[4], 104, 24, 24, 24, $THEME, "104_BMP", "str") SetBitmapResourceToPicCtrl($gui, $Button[5], 136, 24, 24, 24, $THEME, "105_BMP", "str") SetBitmapResourceToPicCtrl($gui, $Button[6], 168, 24, 24, 24, $THEME, "106_BMP", "str") SetBitmapResourceToPicCtrl($gui, $Button[7], 200, 24, 24, 24, $THEME, "107_BMP", "str") SetBitmapResourceToPicCtrl($gui, $Button[8], 232, 24, 24, 24, $THEME, "108_BMP", "str") SetBitmapResourceToPicCtrl($gui, $Button[9], 264, 24, 24, 24, $THEME, "109_BMP", "str") SetBitmapResourceToPicCtrl($gui, $Button[10], 8, 80, 32, 32, $THEME, "301_BMP", "str") SetBitmapResourceToPicCtrl($gui, $Button[11], 48, 80, 32, 32, $THEME, "302_BMP", "str") SetBitmapResourceToPicCtrl($gui, $Button[12], 88, 80, 32, 32, $THEME, "303_BMP", "str") SetBitmapResourceToPicCtrl($gui, $Button[13], 128, 80, 32, 32, $THEME, "304_BMP", "str") SetBitmapResourceToPicCtrl($gui, $Button[14], 168, 80, 32, 32, $THEME, "305_BMP", "str") SetBitmapResourceToPicCtrl($gui, $Button[15], 208, 80, 32, 32, $THEME, "306_BMP", "str") SetBitmapResourceToPicCtrl($gui, $Button[16], 328, 80, 32, 32, $THEME, "307_BMP", "str") GUICtrlCreateLabel("Outils", 8, 8, 64, 17) GUICtrlCreateLabel("Options", 8, 64, 74, 17) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func SetBitmapResourceToPicCtrl($hwnd,$ctrl,$posw,$posh,$picw,$pich,$file,$resource,$type = "int") Local Const $STM_SETIMAGE = 0x0172 Local Const $IMAGE_BITMAP = 0 Local Const $LR_CREATEDIBSECTION = 0x2000 Local Const $LR_COPYDELETEORG = 8 $hwnd = ControlGetHandle($hwnd,"",$ctrl) Local $DLLinst = DLLCall("kernel32.dll","hwnd","LoadLibrary",$type,$file) $DLLinst = $DLLinst[0] Local $hBitmap = DLLCall("user32.dll","hwnd","LoadImage","hwnd",$DLLinst,"str",$resource, _ "int",$IMAGE_BITMAP,"int",0,"int",0,"int",0) $hBitmap = $hBitmap[0] DeleteObject(_SendMessage($hwnd,$STM_SETIMAGE,$IMAGE_BITMAP,$hBitmap,0,"int","int","hwnd")) DLLCall("kernel32.dll","int","FreeLibrary","hwnd",$DLLinst) GUICtrlSetPos($ctrl,$posw,$posh,$picw,$pich) EndFunc Func _SendMessage($hWnd, $msg, $wParam = 0, $lParam = 0, $r = 0, $t1 = "int", $t2 = "int", $t3 = "long") Local $ret = DllCall("user32.dll", $t3, "SendMessage", "hwnd", $hWnd, "int", $msg, $t1, $wParam, $t2, $lParam) If @error Then Return SetError(@error, @extended, "") If $r >= 0 And $r <= 4 Then Return $ret[$r] Return $ret EndFunc; _SendMessage() Func DeleteObject($hObj) Local $bResult = DllCall('gdi32.dll', 'int', 'DeleteObject', _ 'hwnd', $hObj) Return $bResult[0] EndFunc