通过 C++ 控制应用程序监视器
我有一个应用程序,可以在一天中以特定的时间间隔打开 IE 浏览器窗口。 我想控制浏览器窗口打开的监视器(例如 browser1 在监视器 1 上打开,浏览器 2 在监视器 2 上打开,浏览器 3 在监视器 1 上打开,浏览器 4 在监视器 2 上打开)。 有没有办法使用 C++(应用程序是用 C++ 编写的)来控制我打开浏览器窗口的监视器?
I have an application that opens up IE browser windows at certain intervals throughout the day. I would like to control the monitor that the browser window opens up to (for example browser1 opens on monitor1 and browser2 on monitor2 and browser3 on monitor1 and browser4 on monitor2). Is there a way using C++ (app is written in C++) to control the monitor that I open the browser window on?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有各种第三方实用程序允许用户对此进行控制,但以编程方式,您必须使用 GetMonitorInfo / MoveWindow 之类的工具在启动 IE 后定位 IE。
另一种方法是将 IE 控件嵌入到您选择的对话框或窗口中,然后您就可以完全控制它。
There are various third-party utilities that will allow a user to control this, but programatically you would have to use something like GetMonitorInfo / MoveWindow to position IE after launching it.
An alternative would be to embed an IE control in a dialog or window of your choosing which you would then have complete control over.