Ermittelt ein Handle zu dem Bild (Icon oder Bitmap), welches dem Button zugewiesen ist
#Include <GuiButton.au3>
_GUICtrlButton_GetImage($hWnd)
Parameter
| $hWnd | Handle zu dem Control |
Rückgabewert
Erfolg: Handle zu dem Bild
Bemerkungen
- - - - - - - - Erklärung der Controls - - - - - - - -
Verwandte Funktionen
_GUICtrlButton_SetImage
Siehe auch
Suche in der MSDN Bibliothek nach BM_GETIMAGE
Beispiel
#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GUIConstantsEx.au3>
#include <GuiButton.au3>
#include <WindowsConstants.au3>
Global $iMemo
_Main()
Func _Main()
Local $btn, $chk, $rdo, $Msg
Local $Wow64 = ""
If @AutoItX64 Then $Wow64 = "\Wow6432Node"
Local $sPath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE" & $Wow64 & "\AutoIt v3\AutoIt", "InstallDir") & "\Examples\GUI\Advanced\Images"
GUICreate("Buttons", 300, 300)
$iMemo = GUICtrlCreateEdit("", 2, 60, 296, 236, $WS_VSCROLL)
GUICtrlSetFont($iMemo, 9, 400, 0, "Courier New")
GUISetState()
$btn = GUICtrlCreateButton("Button 1", 10, 10, 40, 40, $BS_BITMAP)
_GUICtrlButton_SetImage($btn, $sPath & "\blue.bmp")
$chk = GUICtrlCreateCheckbox("Check 1", 60, 10, 50, 32, $BS_ICON)
_GUICtrlButton_SetImage($chk, "shell32.dll", 14, True)
$rdo = GUICtrlCreateRadio("Radio 1", 120, 10, 50, 32, $BS_ICON)
_GUICtrlButton_SetImage($rdo, "shell32.dll", 21, True)
MemoWrite("Button 1 Bild-Handle: " & _GUICtrlButton_GetImage($btn))
MemoWrite("Check 1 Bild-Handle : " & _GUICtrlButton_GetImage($chk))
MemoWrite("Radio 1 Bild-Handle : " & _GUICtrlButton_GetImage($rdo))
While 1
$Msg = GUIGetMsg()
If $Msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
Exit
EndFunc ;==>_Main
; Gibt eine Zeile im Memo-Fenster aus
Func MemoWrite($sMessage)
GUICtrlSetData($iMemo, $sMessage & @CRLF, 1)
EndFunc ;==>MemoWrite