Functions > GUI >


GUIGetStyle

Obtient les styles d'une GUI.

GUIGetStyle ( [winhandle] )

Param�tre

winhandle [optionnel] Handle retourn� par GUICreate() (par d�faut, la fen�tre pr�c�demment utilis� ).

Valeur de retour

Succ�s: Retourne un tableau � deux �l�ments qui contient les informations sur les styles:
    [0] = Style
    [1] = ExStyle
�chec: D�finit @error <> 0.

Remarque

Soyez prudents, les styles changent apr�s GUISetState().

En relation

GUICreate, GUISetStyle

Exemple

#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