关于MFC shellexecute [英] About MFC shellexecute

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

问题描述

我希望在我的MFC程序中从外部程序打印。



但是我想在打印和打开其他程序时始终激活我的程序。



我如何编辑我的代码?



我的尝试:



ShellExecute(NULL,_T(print),_ T(AA.PDF),NULL,NULL,SW_HIDE);

I want print from external program in my MFC program.

But I want to activating my program always during to printing and to opening other program.

How can I edit my code?

What I have tried:

ShellExecute(NULL, _T("print"), _T("AA.PDF"), NULL, NULL, SW_HIDE);

推荐答案

如果你想兴奋地你必须写一个打印后台处理程序,它充当虚拟打印机。



如果你想从你的程序开始打印过程方法是使用Windows的打印API



阅读 ShellExecute 文档小心谨慎,作为第一个参数r可能是你的(调用)窗口句柄,而不是打印的父级。





提示:使用完整的方法来保证稳定性您的应用程序 - 不仅是文件名。
If you want excatly that you must write a print spooler which acts as a virtual printer.

If you want to start the print process out of your program the usual way is to use the print API of Windows.

Read the ShellExecute documentation with care, as the first parameter could be your (calling) window handle which than would be the parent of the printing.


Tip: use complete pathes for stability of your app - not only the file name.


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

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