Ermittelt das Titel Bitmap Icon
#include <GuiToolTip.au3>
_GUIToolTip_GetTitleBitMap ( $hWnd )
$hWnd | Handle des Controls (welches von _GUIToolTip_Create zurückgegeben wird.) |
Die Referenznummer des Icons, welche von dieser Funktion zurückgegeben wird, ist mit den Icons verwandt um das Icon zu setzen.
Siehe dafür _GUIToolTip_SetTitle().
Wenn die Standard-Icons verwendet werden, so sind die Rückgabewerte wie folgt:
$TTI_NONE = 0
$TTI_INFO oder $TTI_INFO_LARGE = 1
$TTI_WARNING oder $TTI_WARNING_LARGE = 2
$TTI_ERROR oder $TTI_ERROR_LARGE = 3
Jegliches benutztes Icon welches nicht eins der oben genannten Icons ist, so wird eine 4 zurückgegeben welche angibt, dass ein HICON benutzt wurde.
- - - - - - - - Erklärung der Controls - - - - - - - -
#include <GUIConstantsEx.au3>
#include <GUIToolTip.au3>
#include <MsgBoxConstants.au3>
#include <WinAPIIcons.au3>
Example()
Func Example()
Local $hGUI = GUICreate(StringTrimRight(@ScriptName, StringLen(".exe")), 350, 200)
Local $idButton = GUICtrlCreateButton("Button", 30, 32, 130, 28)
Local $hButton = GUICtrlGetHandle($idButton)
; Create a tooltip control
Local $hToolTip = _GUIToolTip_Create($hGUI)
; Add a tool to the tooltip control
_GUIToolTip_AddTool($hToolTip, 0, "This is the ToolTip text", $hButton)
Local $hIcon = _WinAPI_LoadShell32Icon(15)
; Set the title of the tooltip
_GUIToolTip_SetTitle($hToolTip, 'This is the Title Text', $hIcon)
GUISetState(@SW_SHOW)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
Case $idButton
MsgBox($MB_SYSTEMMODAL, "Title Bitmap", _GUIToolTip_GetTitleBitMap($hToolTip))
EndSwitch
WEnd
; Destroy the tooltip control
_GUIToolTip_Destroy($hToolTip)
GUIDelete($hGUI)
EndFunc ;==>Example