使用DTF的MessageBoxes [英] MessageBoxes using DTF

查看:129
本文介绍了使用DTF的MessageBoxes的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MSDN上的MsiProcessMessage函数doco显示了以下示例:

The MsiProcessMessage function doco on MSDN shows this example:

PMSIHANDLE hInstall;
PMSIHANDLE hRec;
MsiProcessMessage(hInstall, 
                  INSTALLMESSAGE(INSTALLMESSAGE_ERROR|MB_ABORTRETRYIGNORE|MB_ICONWARNING),
                  hRec);

如何在DTF中使用Session.Message完成此操作?唯一的重载将Session.InstallMessage作为参数.我看到了MessageBoxButtons枚举,并且将这两种类型都转换为In32并执行逻辑或,但是我不确定如何将其返回到API.

How would this be done using Session.Message in DTF? The only overload takes Session.InstallMessage as an argument. I see the MessageBoxButtons enum and I convert both types to In32 and perform a logical or but I'm not sure how to get this back into the API.

我缺少什么还是DTF缺少什么?

Am I missing something or is DTF missing something?

推荐答案

我对DTF所做的工作不多,但我的理解是,您需要使用类似的东西:

I've not done much with DTF but my understanding is that you'd want something like:

Session.Message(InstallMessage.Error | 
                (InstallMessage)((int)MessageButtons.AbortRetryIgnore |
                                 (int)MessageIcon.Warning), 
                record);

不是很漂亮.我已经格式化了messageType参数以使其更好地适合此处的文本框.按照您的编码指南格式化代码. :)

Not very pretty. I've formatted the messageType agument to fit better in the text box here. Format in your code as per your coding guidelines. :)

这篇关于使用DTF的MessageBoxes的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆