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

基 礎(chǔ) 函 數(shù) 參 考


GUICtrlCreateIcon

創(chuàng)建圖標(biāo)(Icon)控件.

GUICtrlCreateIcon ( 文件名, 圖標(biāo)名, 左距, 頂距 [, 寬度 [, 高度 [, 樣式 [, 擴(kuò)展樣式]]]] )

參 數(shù)

文件名 圖標(biāo)文件名稱.
圖標(biāo)名 圖標(biāo)名稱, 如果圖標(biāo)文件含有多個(gè)圖標(biāo), 則指定圖標(biāo)標(biāo)識符(序號,使用負(fù)數(shù)), 否則使用 -1.
左距 控件左側(cè)的位置. 若此值為 -1, 則根據(jù) GUICoordMode 的設(shè)置計(jì)算左側(cè)位置.
頂距 控件上方的位置. 若此值為 -1, 則根據(jù) GUICoordMode 的設(shè)置計(jì)算頂部位置.
寬度 [可選參數(shù)] 控件的寬度(默認(rèn) 32).
高度 [可選參數(shù)] 控件的高度(默認(rèn) 32).
樣式 [可選參數(shù)] 控件的樣式. 查看附錄 GUI 控件樣式表.

默認(rèn)樣式 ( -1) : $SS_NOTIFY
強(qiáng)制樣式 : $WS_TABSTOP, $SS_ICON
擴(kuò)展樣式 [可選參數(shù)] 控件的擴(kuò)展樣式. 查看附錄 擴(kuò)展樣式表.

返 回 值

成功: 返回控件標(biāo)識符(控件ID).
失敗: 返回 0.

備 注

設(shè)置或者修改控件信息, 參考 GUICtrlUpdate....

要更新圖標(biāo), 可使用 GUICtrlSetImage

圖標(biāo)ID 可以引用圖標(biāo)的組號. 使用 Resource hacker (資源修改軟件)能得到這個(gè)值.

要在默認(rèn)樣式上添加新樣式, 可使用 BitOr($GUI_SS_DEFAULT_ICON, 新樣式,...) 語句.

使用上面列出的值必須將 #include <StaticConstants.au3> 語句寫入腳本中.

默認(rèn)大小為 $GUI_DOCKSIZE.

如果使用正數(shù), 將引用圖標(biāo)的名稱.
如果使用負(fù)數(shù), 將引用基于 1 的圖標(biāo)索引. 一些 DLL 文件的資源名稱只能使用負(fù)數(shù)提取.

相 關(guān) 函 數(shù)

GUICoordMode (Option), GUICtrlSetImage, GUICtrlUpdate..., GUIGetMsg

函 數(shù) 示 例


#include <GUIConstantsEx.au3>

Example1()
Example2()


; 示例 1 ---------------------------
Func Example1()
    GUICreate("我的圖標(biāo) GUI", 250, 250)

    GUICtrlCreateIcon("shell32.dll", 10, 20, 20)
    GUICtrlCreateIcon(@WindowsDir & "\cursors\horse.ani", -1, 20, 40, 32, 32)
    GUICtrlCreateIcon("shell32.dll", 7, 20, 75, 32, 32)
    GUISetState()

    ; 運(yùn)行 GUI, 直到 GUI 被關(guān)閉
    While 1
        Local $msg = GUIGetMsg()

        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
    GUIDelete()
EndFunc   ;==>Example1



; 示例 2 ---------------------------
Func Example2()
    Local $iOldOpt, $n1, $n2, $a, $b
    $iOldOpt = Opt("GUICoordMode", 1)

    GUICreate("我的圖標(biāo)動畫 GUI", 350, 74, -1, -1)
    GUICtrlCreateLabel("", 331, 0, 1, 74, 5)
    $n1 = GUICtrlCreateIcon(@WindowsDir & "\cursors\aero_working.ani", -1, 0, 0, 32, 32); 譯注: Win7
    $n2 = GUICtrlCreateIcon(@WindowsDir & "\cursors\aero_working_l.ani", -1, 0, 40, 32, 32); 譯注: Win7
   
    ;$n1 = GUICtrlCreateIcon(@WindowsDir & "\cursors\dinosaur.ani", -1, 0, 0, 32, 32);譯注: 支持 Win xp
    ;$n2 = GUICtrlCreateIcon(@WindowsDir & "\cursors\horse.ani", -1, 0, 40, 32, 32);譯注: 支持 Win xp

    GUISetState(@SW_SHOW)

    $a = 0
    $b = 0
    While ($a < 300) And ($b < 300)
        $a = $a + Int(Random(0, 1) + 0.5)
        $b = $b + Int(Random(0, 1) + 0.5)
        GUICtrlSetPos($n1, $a, 0)
        GUICtrlSetPos($n2, $b, 40)
        Sleep(20)
    WEnd
    Sleep(1000)
    Opt("GUICoordMode", $iOldOpt)
EndFunc   ;==>Example2

provider with jb51.net (unicode)