显示编辑控件关联的气球提示
#include <GuiEdit.au3>
_GUICtrlEdit_ShowBalloonTip($hWnd, $sTitle, $sText, $iIcon)
$hWnd | 控件的控件ID/句柄 |
$sTitle | 提示标题 (Unicode) |
$sText | 提示文本 (Unicode) |
$iIcon | 可用以下图标之一: $TTI_ERROR - 错误图标 $TTI_INFO - 信息图标 $TTI_NONE - 无图标 $TTI_WARNING - 警告图标 以下针对 Vista 或更高操作系统 $TTI_ERROR_LARGE - 错误图标 $TTI_INFO_LARGE - 信息图标 $TTI_WARNING_LARGE - 警告图标 |
成功: | 返回 True |
失败: | 返回 False |
#include <GuiEdit.au3>
#include <GUIConstantsEx.au3>
$Debug_Ed = False ; Check ClassName being passed to Edit functions, set to True and use a handle to another control to see it work
_Main()
Func _Main()
Local $hEdit, $sTitle = "ShowBalloonTip", $sText = "Displays a balloon tip associated with an edit control"
; 创建 GUI
GUICreate("Edit ShowBalloonTip", 400, 300)
$hEdit = GUICtrlCreateEdit("", 2, 2, 394, 268)
GUISetState()
; Set Text
_GUICtrlEdit_SetText($hEdit, "This is a test" & @CRLF & "Another Line" & @CRLF & "Append to the end?")
_GUICtrlEdit_ShowBalloonTip($hEdit, $sTitle, $sText, $TTI_INFO)
; 循环直到用户退出
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>_Main