欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

函數(shù)說明

GUICtrlCreateMenu

在GUI上創(chuàng)建一個(gè)菜單控件。

GUICtrlCreateMenu ( "子菜單文本" [, menuID [, menuentry]] )

 

參數(shù)

子菜單文本。 子菜單文本。
menuID [可選參數(shù)] 定義此菜單項(xiàng)要附加到的目標(biāo)菜單ID。若此值為 -1 則使用第一級菜單。
menuentry [可選參數(shù)] 允許定義要?jiǎng)?chuàng)建的菜單項(xiàng)的(次序)編號。編號從0開始。

 

返回值

成功: 返回控件標(biāo)識符(控件ID)。
失。 返回值為0。

 

注意

若要設(shè)置或修改控件的各種信息請查看 GUICtrlSet....

 

相關(guān)

GUICtrlSetState, GUIGetMsg

 

示例


#include <GUIConstants.au3>

GUICreate("我的 GUI 之菜單",300,200)

Global $defaultstatus = "Ready"
Global $status

$filemenu = GUICtrlCreateMenu ("文件(&F)")
$fileitem = GUICtrlCreateMenuitem ("打開(&O)",$filemenu)
GUICtrlSetState(-1,$GUI_DEFBUTTON)
$helpmenu = GUICtrlCreateMenu ("?")
$saveitem = GUICtrlCreateMenuitem ("保存(&S)",$filemenu)
GUICtrlSetState(-1,$GUI_DISABLE)
$infoitem = GUICtrlCreateMenuitem ("信息",$helpmenu)
$exititem = GUICtrlCreateMenuitem ("退出(&X)",$filemenu)
$recentfilesmenu = GUICtrlCreateMenu ("最近的文件",$filemenu,1)

$separator1 = GUICtrlCreateMenuitem ("",$filemenu,2)    ; 分隔線

$viewmenu = GUICtrlCreateMenu("查看(&V)",-1,1)  ; 此菜單將出現(xiàn)在 "?" 菜單之前
$viewstatusitem = GUICtrlCreateMenuitem ("狀態(tài)欄",$viewmenu)
GUICtrlSetState(-1,$GUI_CHECKED)
$okbutton = GUICtrlCreateButton ("確定",50,130,70,20)
GUICtrlSetState(-1,$GUI_FOCUS)
$cancelbutton = GUICtrlCreateButton ("取消",180,130,70,20)

$statuslabel = GUICtrlCreateLabel ($defaultstatus,0,165,300,16,BitOr($SS_SIMPLE,$SS_SUNKEN))

GUISetState ()
While 1
    $msg = GUIGetMsg()
   
    If $msg = $fileitem Then
        $file = FileOpenDialog("打開...",@TempDir,"所有文件(*.*)")
        If @error <> 1 Then GUICtrlCreateMenuitem ($file,$recentfilesmenu)
    EndIf
    If $msg = $viewstatusitem Then
        If BitAnd(GUICtrlRead($viewstatusitem),$GUI_CHECKED) = $GUI_CHECKED Then
            GUICtrlSetState($viewstatusitem,$GUI_UNCHECKED)
            GUICtrlSetState($statuslabel,$GUI_HIDE)
        Else
            GUICtrlSetState($viewstatusitem,$GUI_CHECKED)
            GUICtrlSetState($statuslabel,$GUI_SHOW)
        EndIf
    EndIf
    If $msg = $GUI_EVENT_CLOSE Or $msg = $cancelbutton Or $msg = $exititem Then ExitLoop
    If $msg = $infoitem Then Msgbox(0,"信息","僅供測試...")
WEnd
GUIDelete()

Exit