多屏幕显示器编程( 四 )

Programming for Multiple Monitors in Windows 98
Other Issues

Continued from New Multiple-Monitor Win32 API functions

If you use these new API functions to make your applications multiple monitor-friendly, what will happen on systems running a version of Windows that does not have the multimonitor functions? (Neither Windows 95 nor Windows NT 4.0 includes the multiple-monitor APIs.) They will crash, unless you do something about it. The solution is a new header file, Multimon.h, which uses GetProcAddress to determine whether the relevant functions are actually in the system DLLs. If they are not, it supplies default implementations of these functions. This header file actually contains source code, and if the COMPILE_MULTIMON_STUBS flag is set, the code will be compiled. This means that you should define COMPILE_MULTIMON_STUBS in one--and only one--source file that includes Multimon.h. You can include Multimon.h in as many source files as you want, but make sure that COMPILE_MULTIMON_STUBS is defined in only one. The end result of this process is a single executable file that will run on all versions of Win32.

There are also a few new rules you should follow if you want your programs to behave correctly on a multiple-monitor system. Remember that negative desktop coordinates are now valid, so don't assume otherwise. For example, don't hide your application by moving its window to a negative position. You should also take care when centering dialogs on a monitor. If you don't check which monitor your application is on, you may be centering your dialog on the wrong monitor.

Another potential pitfall is the incorrect casting of window message parameters that are window coordinates. Since negative coordinates used to be invalid, it didn't matter if you accidentally cast an integer position value to a DWORD.

If you follow sound coding practices in general, you should find that your application will require very little work to become multiple monitor-friendly. When Windows 98 is finally released, multiple-monitor systems will probably become fairly common. If you want to make your programs as high in quality as possible, or if you target a market where multiple monitors will be prevalent, add some multiple-monitor situations to your test plans.

Microsoft has done quite a good job of incorporating multiple-monitor support into an OS that wasn't designed for it. But applications written before multiple-monitor support was available may behave unreliably, especially when displayed on a monitor other than the primary monitor. My own experience has shown that while such problems can be frustrating, they can be worked out. Once you have adapted to the multi-monitor quirks of your applications, it's hard to go back to the confines of a single monitor. If you have an old 14-inch monitor sitting around, you may find it worthwhile to buy a cheap PCI video card and set up a second display.

Next: Figure 1: The Display Properties Control Panel

Published as Power Programming in the 4/7/98 issue of PC Magazine.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: Dell 显示器是一款非常受欢迎的电脑显示设备品牌,它具有高清晰、高亮度、高对比度等优良的显示效果和易于使用的特点。除此之外,Dell 显示器还配备了分屏软件,帮助用户更好地进行多任务处理。 Dell 显示器分屏软件采用了非常直观的界面设计,用户可以方便地将屏幕划分成多个区域,以支持同时打开多个应用程序和窗口。用户可以根据自己的工作需要进行设置和调整,实现窗口在屏幕上自由地拖动和调整,而无需调整窗口大小和位置。 此外,Dell 显示器分屏软件还支持多个显示器,使用户可以同时在两个甚至更多的显示器上处理不同的任务,从而提高了工作效率和生产力。用户还可以自定义不同的分屏模式,并将其保存为自己的首选项,方便和快速地进行切换。 总之,Dell 显示器分屏软件是一款功能强大的工具,旨在帮助用户更好地进行多任务处理,提高生产效率和工作效率。无论是在家庭、办公室还是商业环境,Dell 显示器分屏软件都能够为用户提供高品质、高性能的显示设备和软件支持。 ### 回答2: Dell 显示器分屏软件可以将一个大屏幕分成多个小屏幕,让用户能够同时查看和处理多个不同的应用程序,提高工作效率和生产力。该软件兼容 Dell 显示器系列,并且简单易用,可以通过简单几步设置,快速实现分屏效果,且不需要复杂的编程技巧。 通过 Dells 显示器分屏软件,用户可以自由地拖动和组合不同大小的窗口,并可按照自己的需求进行排列,例如:将两个窗口并排或上下对称分别显示。此外,该软件还提供了多种自定义选项,如:用于调整窗口大小和位置等。 这种软件最适合需要同时处理多个任务和多个程序的用户,例如:金融、财务、程序员、设计师或者游戏爱好者等。此外,该软件还适用于家庭用户,在享受高清视频娱乐的同时,还能够处理电子邮件、浏览网页等多个任务。 总体而言,Dell 显示器分屏软件是一款十分实用的软件,并且适用范围广泛。无论是工作还是娱乐,都可以帮助用户提高效率和便捷性。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值