返回 GUI 窗口样式.
GUIGetStyle ( [窗口句柄] )
窗口句柄 | [可选参数] 由 GUICreate() 函数返回的窗口句柄 (默认为先前使用的窗口). |
成功: | 返回包含 2 元素的样式信息数组: |
$array[0] = 样式 | |
$array[1] = 扩展样式 | |
失败: | 返回 0. |
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Example()
Func Example()
Local
$NewStyle =
False, $hWnd, $Style, $GuiStyles, $Msg
$hWnd
= GUICreate("设置
Gui 样式", 260, 100)
$Style = GUICtrlCreateButton("设置窗口样式", 45,
50, 150, 20)
$GuiStyles = GUIGetStyle($hWnd) ; 打开后,
注意样式的变化
GUISetState()
While
1
$Msg = GUIGetMsg()
Switch $Msg
Case $GUI_EVENT_CLOSE
Exit
Case $Style
If Not $NewStyle Then
GUISetStyle(BitOR($WS_POPUPWINDOW, $WS_THICKFRAME), BitOR($WS_EX_CLIENTEDGE, $WS_EX_TOOLWINDOW))
GUICtrlSetData($Style, '取消样式')
$NewStyle
= True
Else
GUISetStyle($GuiStyles[0], $GuiStyles[1])
GUICtrlSetData($Style, '设置样式')
$NewStyle
= False
EndIf
Case Else
EndSwitch
WEnd
EndFunc ;==>Example
provider with jb51.net (unicode) |