回复 2# superflq
先创建菜单在创建状态栏就可以,看下面例子#include <GuiConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <WindowsConstants.au3>
$hGUI = GUICreate("(Example 1) StatusBar Create", 400, 300)
$filemenu = GUICtrlCreateMenu("&File")
$fileitem = GUICtrlCreateMenuItem("Open", $filemenu)
$hStatus = _GUICtrlStatusBar_Create ($hGUI,-1,"222")
GUISetState()
Do
sleep(5)
Until GUIGetMsg() = $GUI_EVENT_CLOSE
假如反过来,创建顺序变了就不行了#include <GuiConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <WindowsConstants.au3>
$hGUI = GUICreate("(Example 1) StatusBar Create", 400, 300)
$hStatus = _GUICtrlStatusBar_Create ($hGUI,-1,"222")
$filemenu = GUICtrlCreateMenu("&File")
$fileitem = GUICtrlCreateMenuItem("Open", $filemenu)
GUISetState()
Do
sleep(5)
Until GUIGetMsg() = $GUI_EVENT_CLOSE
我是后来无意中发现的 |