找回密码
 加入
搜索
楼主: 邪恶海盗

[AU3基础] 消息提示框图标如何自定义???

 火... [复制链接]
发表于 2012-1-9 16:03:31 | 显示全部楼层
把消息框改成子窗口弹出
发表于 2012-1-10 03:27:23 | 显示全部楼层
努力学习中,AU3真强大
发表于 2012-1-10 16:08:33 | 显示全部楼层
_WinAPI_MessageBoxIndirect
发表于 2012-1-10 16:30:15 | 显示全部楼层
图标没有更改到.
发表于 2012-1-10 21:23:35 | 显示全部楼层
学习中,刚进入角色
发表于 2012-1-13 22:07:47 | 显示全部楼层
_WinAPI_MessageBoxIndirect
netegg 发表于 2012-1-10 16:08

确实可以。这是官网的例子:
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=Arrow.ico
#AutoIt3Wrapper_Res_Icon_Add=Arrow.ico
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#Include <Constants.au3>
#Include <WinAPIEx.au3>

Opt('MustDeclareVars', 1)

Global Const $MB_USERICON = 0x80

Global Const $sTitle = 'Message'
Global Const $sText = 'This is a simple message box with a custom icon.'

Global $tMBP = DllStructCreate($tagMSGBOXPARAMS)
Global $tTitle = DllStructCreate('wchar[' & (StringLen($sTitle) + 1) & ']')
Global $tText = DllStructCreate('wchar[' & (StringLen($sText) + 1) & ']')
Global $Result

DllStructSetData($tTitle, 1, $sTitle)
DllStructSetData($tText, 1, $sText)
DllStructSetData($tMBP, 'Size', DllStructGetSize($tMBP))
DllStructSetData($tMBP, 'hOwner', 0)
DllStructSetData($tMBP, 'hInstance', _WinAPI_GetModuleHandle(0))
DllStructSetData($tMBP, 'Text', DllStructGetPtr($tText))
DllStructSetData($tMBP, 'Caption', DllStructGetPtr($tTitle))
DllStructSetData($tMBP, 'Style', BitOR($MB_OKCANCEL, $MB_USERICON))
DllStructSetData($tMBP, 'Icon', 201)
DllStructSetData($tMBP, 'ContextHelpId', 0)
DllStructSetData($tMBP, 'MsgBoxCallback', 0)
DllStructSetData($tMBP, 'LanguageId', 0)

$Result = _WinAPI_MessageBoxIndirect($tMBP)

MsgBox(0, 'Result', 'Return: ' & $Result & @CR)

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2012-1-14 08:42:22 | 显示全部楼层
学习了 自定义对话框
发表于 2012-1-14 16:55:16 | 显示全部楼层
正在学习当中,强大。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-18 16:17 , Processed in 0.089357 second(s), 15 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表