avec le styme $WS_EX_MDICHILD tu n'as pas besoin de te prendre la tete avec l'offset , il se fait tout seul, et en plus la fenetre fille est déplacée avec la mere.
Code : Tout sélectionner
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=ds.ico
#AutoIt3Wrapper_outfile=SkinToolDS.exe
#AutoIt3Wrapper_Res_Fileversion=0.1.0.0
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <ButtonConstants.au3>
Dim $version = "0.1", $Profile
Dim $MainGUI, $DebugGUI
$MainGUI = GUICreate("IcarDS Skinner Tool "&$version&" By: pierrotm777", 500, 603, -1, -1)
$Commands = GUICtrlCreateButton("Commands", 5, 5, 100, 25)
GUICtrlSetState($Commands,$GUI_DISABLE)
$LiveDebugLog = GUICtrlCreateButton("Live Debug Log", 105, 5, 100, 25)
$DSFiles = GUICtrlCreateButton("DS Files", 230, 5, 80, 25)
$Options = GUICtrlCreateButton("Options", 325, 5, 80, 25)
$onTop = GUICtrlCreateCheckbox("On Top?", 420, 10, 120, 20)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUISetState()
;GUI de debug
$DebugGUI = GUICreate("IcarDS Skinner Tool "&$version&" By: pierrotm777", 500, 603, -1, -1, -1, -1, $MainGUI)
$ReturnToMainGUI = GUICtrlCreateButton("Commands", 5, 5, 100, 25)
GUICtrlSetState($ReturnToMainGUI,$GUI_ENABLE)
GUISetState(@SW_HIDE,$DebugGUI)
;Gui Options
;$OptionsGUI = GUICreate("", 82, 125, -1, -1, $MainGUI,BitOR($WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW,$WS_BORDER,$WS_CLIPSIBLINGS))
$CoordsMainGui = WinGetPos($MainGui)
$OptionsGUI = GUICreate("", 81, 126, 230, 31,BitOR($WS_SYSMENU,$WS_DLGFRAME,$WS_POPUP,$WS_CLIPSIBLINGS),bitor($WS_EX_MDICHILD,$WS_EX_CLIENTEDGE),$MainGUI)
$DSDebug = GUICtrlCreateButton("DS Debug", 1, 1, 80, 25)
$DSExecTBL = GUICtrlCreateButton("DS ExecTBL", 1, 26, 80, 25)
$SkinExecTBL = GUICtrlCreateButton("SkinExecTBL", 1, 51, 80, 25)
$SkinINI = GUICtrlCreateButton("Skin Ini", 1, 76, 80, 25)
$DSDocs = GUICtrlCreateButton("< DS Doc's", 1, 101, 80, 25)
GUISetState(@SW_HIDE,$OptionsGUI)
$OptionsGUIStatus=False
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $DSFiles
GUISwitch($OptionsGUI)
if $OptionsGUIStatus = true Then
GUISetState(@SW_HIDE,$OptionsGUI)
$OptionsGUIStatus=False
Else
GUISetState(@SW_SHOW,$OptionsGUI)
$OptionsGUIStatus=True
EndIf
EndSwitch
Wend