GUIGetStyle
返回 GUI 窗口样式.
GUIGetStyle ( [winhandle] )
参数
返回值
成功:
|
返回包含 2 元素的样式信息数组:
$aArray[0] = 样式
$aArray[1] = 扩展样式
|
失败:
|
@error 设置 为非 0 值.
|
备注
修改样式后, 注意调用 GUISetState() 的变化.
相关
GUICreate, GUISetStyle
函数示例
#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) ; be careful the style change after opening
GUISetState(@SW_SHOW)
Local $bNewStyle = False, $idMsg
While 1
$idMsg = GUIGetMsg()
Switch $idMsg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $idBtnStyle
If Not $bNewStyle Then
GUISetStyle(BitOR($WS_POPUPWINDOW, $WS_THICKFRAME), BitOR($WS_EX_CLIENTEDGE, $WS_EX_TOOLWINDOW))
GUICtrlSetData($idBtnStyle, 'Undo Style')
$bNewStyle = True
Else
GUISetStyle($aGUIStyle[0], $aGUIStyle[1])
GUICtrlSetData($idBtnStyle, 'Set Style')
$bNewStyle = False
EndIf
Case Else
EndSwitch
WEnd
GUIDelete($hGUI)
EndFunc ;==>Example
----------------------------------------
|