如何关闭用于在IE8中打印的SendMessage对话框 [英] How to dismiss a SendMessage dialog for printing in IE8

查看:100
本文介绍了如何关闭用于在IE8中打印的SendMessage对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SendMessage的语法为

The syntax of SendMessage is

LRESULT retVal= SendMessage(G_hWndPrint[PrintDialog], WM_COMMAND, MAKEWPARAM(IDOK,BN_CLICKED),0);



这会在IE6中打印,但不会在IE8中打印,并且我得到的返回值为0,表示成功.

可以指导一下如何使用SendMessage或PostMessage在IE8中进行打印吗?

附加信息-(



This prints in IE6 but it does not print in IE8 and I get return value as 0 which is success.

Could some one guide how to print in IE8 using SendMessage or PostMessage?

Additional information - (

_hr = m_pTarget->Exec(NULL,OLECMDID_PRINT,OLECMDEXECOPT_PROMPTUSER,NULL,NULL);


.这将显示一个打印"对话框,必须对其进行编辑.副本,然后关闭usindg SendMesage.)


. This will display a Print dialog which has to be edited for no. of copies and then dismissed usindg SendMesage.)

推荐答案

使用Spy ++来检查确定"按钮.或者尝试通过EnumWindow和名称(来自Spy ++)找到窗口

MS在IE 6、7、8等中进行了很多更改.真是一团糟...
use Spy++ to check the OK-button. Or try to find the window via EnumWindow and the name (from Spy++)

MS changed a lot in the IE 6, 7, 8 and so on. It is a mess...


这篇关于如何关闭用于在IE8中打印的SendMessage对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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