使用webbrowser控件打印页面 - MFC [英] Printing pages with the webbrowser control - MFC

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

问题描述





我正在尝试使用以下功能打印页面:

Hi,

I'm trying to print a page using below function:

hr = lpOleCommandTarget->Exec(NULL, OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER,NULL, NULL);





但问题是,它始终打印一份即使我提供的数量超过1.我正在使用CPrintDLg类进行打印机设置,如下所示:



But the problem is,it is always printing one copy only even if I give more than 1. I'm doing printer setup on top of it using CPrintDLg class as below:

CPrintDialog dlgl(FALSE);
	INT_PTR userResult = dlgl.DoModal();



我这样做是因为我根据我选择的打印机有一些额外的功能。在这里我得到了正确的计数但是当我调用lpOleCommandTarget-> Exec()时,它只打印一个。那么任何人都可以建议我如何将副本数量传递给Exec()函数?



我尝试过的事情:




I'm doing it because I have some extra functionality based on the printer which I selected. Here I'm getting proper count but when I call lpOleCommandTarget->Exec(""), it is printing only one. So can any one suggest how can I pass number of copies to Exec("") function?

What I have tried:

<pre>hr = lpOleCommandTarget->Exec(NULL, OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER,NULL, NULL);

推荐答案

根据 IDM_PRINT命令ID() [ ^ ]没有选项指定页数副本。



但你可以从打印对话框中获取用户选择的份数,并多次执行打印作业。
According to IDM_PRINT Command ID ()[^] there is no option to specify the number of pages copies.

But you can get the number of copies selected by the user from the print dialog and execute the print job multiple times.


这篇关于使用webbrowser控件打印页面 - MFC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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