#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Example()

Func Example()
	Local $NewStyle = False, $iStyle, $Msg

	GUICreate("Стиль Gui", 260, 100)
	$iStyle = GUICtrlCreateButton('Установить стиль', 45, 50, 150, 20)
	GUISetState()

	While 1
		$Msg = GUIGetMsg()
		Switch $Msg
			Case $GUI_EVENT_CLOSE
				Exit
			Case $iStyle
				If Not $NewStyle Then
					GUISetStyle(BitOR($WS_POPUPWINDOW, $WS_THICKFRAME), BitOR($WS_EX_CLIENTEDGE, $WS_EX_TOOLWINDOW))
					GUICtrlSetData($iStyle, 'Восстановить стиль')
					$NewStyle = True
				Else
					GUISetStyle(BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU), 0)
					GUICtrlSetData($iStyle, 'Установить стиль')
					$NewStyle = False
				EndIf
			Case Else
		EndSwitch
	WEnd
EndFunc