au3修改窗口样式后缩在任务栏打不开[已解决]
本帖最后由 leif 于 2017-5-8 18:16 编辑在例子上改的,空窗口改样式可以,但东西一多就只在任务栏有图标,但打不开
#include <GUIConstantsEx.au3>
#include <GuiToolbar.au3>
#include <WindowsConstants.au3>
Example()
Func Example()
Local $hGUI, $hToolbar, $aStrings
Local Enum$e_idOpen, $e_idSave, $idHelp,$e_idredow,$e_idundo
; Create GUI
$hGUI = GUICreate("Toolbar", 400, 300,BitOR($GUI_SS_DEFAULT_GUI,$WS_SIZEBOX,$WS_MAXIMIZEBOX))
$hToolbar = _GUICtrlToolbar_Create($hGUI)
GUISetState(@SW_SHOW )
; Add standard system bitmaps
_GUICtrlToolbar_AddBitmap($hToolbar, 1, -1, $IDB_STD_LARGE_COLOR)
; Add strings
$aStrings = _GUICtrlToolbar_AddString($hToolbar, "&Open")
$aStrings = _GUICtrlToolbar_AddString($hToolbar, "&Save")
$aStrings = _GUICtrlToolbar_AddString($hToolbar, "&Help")
$aStrings = _GUICtrlToolbar_AddString($hToolbar, "&Undo")
$aStrings = _GUICtrlToolbar_AddString($hToolbar, "&Redo")
; Add buttons
_GUICtrlToolbar_AddButton($hToolbar, $e_idOpen, $STD_FILEOPEN, $aStrings)
_GUICtrlToolbar_AddButton($hToolbar, $e_idSave, $STD_FILESAVE, $aStrings)
_GUICtrlToolbar_AddButtonSep($hToolbar)
_GUICtrlToolbar_AddButton($hToolbar, $e_idundo, $STD_UNDO, $aStrings)
_GUICtrlToolbar_AddButton($hToolbar, $e_idredow, $STD_REDOW, $aStrings)
_GUICtrlToolbar_AddButtonSep($hToolbar)
_GUICtrlToolbar_AddButton($hToolbar, $idHelp, $STD_HELP, $aStrings)
; Loop until the user exits.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc ;==>Example 已解决,少了2个“-1”
$hGUI = GUICreate("Toolbar", 400, 300,-1,-1,BitOR($GUI_SS_DEFAULT_GUI,$WS_SIZEBOX,$WS_MAXIMIZEBOX))
不错支持一下
页:
[1]