多显示器(Multiple Display Monitors)编程-关于多重独立显示(Multiple independent displays)和桌面扩展(Large desktops)
来源:互联网 发布:期货公司业务流程知乎 编辑:程序博客网 时间:2024/06/07 00:06
通过这一段时间的资料查找,和实际编程,得到点启发,总结一下关于多显示器输出的问题。:
多重独立显示(Multiple independent displays)这种模式,只要不是刀架到脖子上了,最好不要采用。
先说说这种模式的限制
1 win98以上的系统(应该没人用win95吧)需要至少2块独立的显卡。一卡多头是不可以的。这一点微软就没说清楚。
2 gdi+,openGL不支持。
3 重起后模式可能会被改为桌面扩展。
我只有一块显卡,所以CreateDC()失败,这种方式就没有再试验。
可以看看,前人和微软工程师的讨论。
http://groups.google.com.au/group/microsoft.public.win32.programmer.kernel/browse_frm/thread/575f1452aacd4c8b/7b084cd3e8558f38?lnk=st&q=nvidia+createdc+%22%5C%5C.%5CDISPLAY1%22&rnum=1#7b084cd3e8558f38
这种方式用不了只好改用桌面扩展(Large desktops) 模式模拟。
我的项目只有两个显示器,在副显示器上显示程序中得到的图像数据。
1 建立一个非模态的对话框,把所有附加的东西去掉,模式改为child。这样程序运行的时候,将对话框铺满整个副显示器,底色改为白色(这个根据个人需要),形成一个大的画布。
2 初始程序的时候 建立副显示器的DC,可以用CreateDC(),之后再需要的时候就可以将图像画到副显示器上。
3 关闭主程序,对话框也会销毁,副显示器恢复原来的桌面。
不足之处 :虽然可以限制鼠标不进入副显示器,但拖动的窗口无法限制。主程序最小化时,副窗口中的对话框也会最小化。
编码可参考,DC的创建,显示器的句柄都很容易得到。
http://www.codeproject.com/KB/GDI/multimon.aspx
最后相关资料
参考MSDN--- How to Exploit Multiple Monitor Supportin Memphis and Windows NT 5.0
Theory and Operation of Multiple Monitors
Although your needs obviously will dictate how you set up yoursystem, I'll discuss three options here for using multiple monitors.
Large desktops The Windows desktop can now cover more than one monitor with norestrictions on size, position, resolution, or refresh rates (see Figure 1).The system can be configured to the size and relative position of each monitor.Applications can be moved seamlessly from one monitor to another, or bedisplayed simultaneously on more than one monitor.
Screen duplication/remote displayAlternatively, you can use secondary monitors to display the same data as theprimary monitor (see Figure 2). This would be useful for training or forpresentations to a group.Screen duplication could also be used to controlremote applications such as in a support situation or for telecommuting.
Multiple independent displays Amonitor does not need to be part of the Windows desktop for applications tohave access to it. Applications can make use of an additional display even ifit isn't part of the desktop. For example, if you have a large, high-resolutiondisplay for a CAD application, your application can use that monitor for outputthrough Windows APIs, without requiring it to be part of the virtual desktop.That means you don't have to worry about accidentally dragging windows ontothat screen. It's like having a display monitor you can draw on via GDI, but itisn't part of the Windows desktop so you don't have a taskbar or any othershell goodies to worry about.
基本原理
Windows 98以上操作系统提供对多监视器的支持,主要有以下三个模式:
1.更大的桌面(桌面扩展):在多显示器模式下,可以把多个显示器的显示区域结合在一起
来显示Windows桌面,不管这些显示器的尺寸、物理位置、分辨率和刷新频率是否相同。
当我们运行一个应用程序时,程序的主窗口可以位于任何一个显示器的显示区域内,也可
以跨多个显示区域。我们也可以把一个程序的窗口从一个显示区域移到另一个显示区域
中。
2. 屏幕复制或远程显示:我们可以让两个显示器显示相同的内容。在进行培训或者
向众人进行演示时,这个特点是很有用的。利用这个特性,技术支持人员还可以对应用程
序进行远程监视和调试。
3.多重独立显示:在以上的两种模式下,所有的显示区域都是Windows虚拟桌面的一部
分,但是在多重独立显示模式下,应用程序访问的显示器并不属于Windows虚拟桌面。假设
系统的第二个显示器是一个高分辨率的大尺寸显示器,我们可以把它用做CAD应用程序的
专用显示。通过在CAD应用程序中调用新的WindowsAPI,我们可以借助GDI在上面画图。
独立显示器的显示区域没有桌面上的任何对象(任务栏和快捷方式),它与Windows桌面是
独立的。这可以避免Windows桌面对应用程序输出的任何干扰,我们也不用担心会在无意
中把其它的窗口拽到独立显示的显示区域中,这种方式就好像为应用程序提供了一个专用
的显示器。
- 多显示器(Multiple Display Monitors)编程-关于多重独立显示(Multiple independent displays)和桌面扩展(Large desktops)
- directx Multiple Display Monitors
- c# 多显示器设置主屏幕(Set primary screen for multiple monitors)
- macOS 多个显示器扩展使用独立桌面
- MFC classes for multiple monitors
- Move windows between multiple monitors
- 独立成分分析(Independent Component Analysis)
- 独立成分分析(Independent Component Analysis)
- 独立成分分析(Independent Component Analysis)
- 独立成分分析(Independent Component Analysis)
- 独立成分分析(Independent Component Analysis)
- 独立成分分析(Independent Component Analysis)
- 独立成分分析(Independent Component Analysis)
- 独立成分分析(Independent Component Analysis)
- 独立成分分析(Independent Component Analysis)
- 独立成分分析(Independent Components Analysis)
- 独立成分分析(Independent Component Analysis)
- 独立成分分析(Independent Component Analysis)
- 发布网站后,会生成一个PrecompiledApp.config文件的作用
- 原来也不复杂
- Js正则表达式的验证
- 开始学习
- 别让“BOSS”变成了“包死”
- 多显示器(Multiple Display Monitors)编程-关于多重独立显示(Multiple independent displays)和桌面扩展(Large desktops)
- google open api 实践之(ajaxfeeds)
- Windows Mobile 下使用C#进行GPRS、CDMA开发
- 如何阅读思维方面的书?
- 如何替换HBITMAP中的颜色值
- 各种索引的创建方法
- VS2005(c#)项目调试问题解决方案集锦
- 字符串拼接测试结果
- 索引的两个知识点