Obtient les styles d'une GUI.
GUIGetStyle ( [winhandle] )
winhandle | [optionnel] Handle retourné par GUICreate() (par défaut, la fenêtre précédemment utilisé ). |
Succès: | Retourne un tableau à deux éléments qui contient les informations sur les styles: [0] = Style [1] = ExStyle |
Échec: | Définit @error <> 0. |
#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Example() Func Example() Local $hGUI = GUICreate("Gui Style", 260, 100) Local $idBtnStyle = GUICtrlCreateButton("Set Style", 45, 50, 150, 20) Local $aGUIStyle = GUIGetStyle($hGUI) ; attention le style change après l'ouverture GUISetState(@SW_SHOW) Local $bNewStyle = False, $idMsg = GUIGetMsg() While $idMsg <> $GUI_EVENT_CLOSE If $idMsg = $idBtnStyle Then If Not $bNewStyle Then GUISetStyle(BitOR($WS_POPUPWINDOW, $WS_THICKFRAME), BitOR($WS_EX_CLIENTEDGE, $WS_EX_TOOLWINDOW)) GUICtrlSetData($idBtnStyle, 'Undo Style') Else GUISetStyle($aGUIStyle[0], $aGUIStyle[1]) GUICtrlSetData($idBtnStyle, 'Set Style') EndIf $bNewStyle = Not $bNewStyle EndIf $idMsg = GUIGetMsg() WEnd GUIDelete($hGUI) EndFunc ;==>Example