需要找到由“打印"创建的“打印"对话框的句柄.控制台命令 [英] Need to find a handle to the Print dialog created by "print" console command

查看:91
本文介绍了需要找到由“打印"创建的“打印"对话框的句柄.控制台命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.

简而言之:
我们的应用将打印"称为命令,然后我们希望将生成的打印对话框作为一个子级链接到我们的窗口.
是的,我们知道这很愚蠢,请参见详细内容:-)

详细内容:
我们到处都有一个老旧的ActiveX应用程序,带有.NET注入.它的一个奇特特性是,除了Windows + D命令外,无法将其最小化或还原.
我们最近在通过不同版本的Internet Explorer打印XML时遇到了一些问题.结果,决定使用打印"来打印.控制台命令.将显示一个打印选项对话框,但是如果用户单击其他位置,则会弹出该应用程序,并且无法再次查看该对话框(Alt + Tab除外,但没有留下我们的质量管理信息).

/>我想听听的是:

  • 有人知道在其他窗口中查找打印对话框的方法吗? (除了扫描所有窗口并查找特定的子窗口模式* ick *)
  • 由于某种原因完全不可能吗?
  • 我想念另一种方式吗?我们以前的方法是使用IE ActiveX,当它被要求打印时,它的某些版本只是默默地崩溃了.
  • Hello everyone.

    In short:
    Our app calls the "print" command, and we want to link the resulting print dialog to our window as a child.
    Yes, we know this is stupid, see the long story :-)

    Long story:
    We have an old and monstrous ActiveX application with .NET infusions here and there. One of it's monstrous traits is that it can not be minimized or restored, except for Windows+D command.
    We have recently had some problems with printing XML via different versions of Internet Explorer. As a result, it was decided to print that using "print" console command. A print options dialog is shown, but if a user clicks somewhere else, the application pops up, and there is no way to see the dialog again (except Alt+Tab, but our QM is not impressed).

    What I'd like to hear is:

    • does anyone know a way to find the print dialog among other windows? (except for scanning all windows and looking for specific child window pattern *ick*)
    • is it outright impossible for some reason?
    • do I miss another way? Our previous method was using IE ActiveX, and some versions of it just silently crashed when asked to print.
    • 推荐答案

      首先,对您的答复表示抱歉.

      您应该使用FindWindow函数检索正确的打印窗口句柄.
      First of all, sorry for the late reply.

      What you should do is use the FindWindow function to retrieve the right print window handle.


      这篇关于需要找到由“打印"创建的“打印"对话框的句柄.控制台命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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