双显设备下的画像输出

laobian2011 2011-08-11 01:48:02
电脑接了双显设备,显示器 + 工业用数字投影仪
想用MFC作一个图像通过投影仪显示出来。
其实,程序上就是获得windows桌面的CDC后,把图案打上去。
在主画面的显示器上已经可以显示了。但是不知道如何打到副画面的投影仪上去。
听别人说,双显设备可以假定为并排的画面,只要把贴图的坐标加一个平移就可以。我这样试过,没有成功。
...全文
54 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
jin369xiaoli 2011-08-12
  • 打赏
  • 举报
回复
EnumDisplayDevices
枚举显示设备
EnumDisplaySetting
枚举指定显示设备的分辨率、色位、刷新率等等信息
ChangeDisplaySettingsEx
修改信息
MonitorFromWindow
获取屏幕的大小(rect)
MonitorFromRect
获取区域所在的Monitor
MonitorFromPoint
获取鼠标所在的Monitor
laobian2011 2011-08-12
  • 打赏
  • 举报
回复
谢谢大家的帮助。
好像就是将坐标加一个平移就行了。
可能是,问题出在我新买的电脑上,到目前还没有成功。
以前的电脑只能实现单显(戴尔原装机),新买的兼容机是双显的。
我试着获取windows桌面CDC,并把画像文件作为壁纸传送到桌面上。这一步,在单显的那台原装机上成功实现了。可是同样的程序在双显机上运行,就无法实现,这让我感到费解。从常理来说,应该和电脑的硬件配置没有多大关系吧。由于这一步都无法实现,所以下一步平移坐标,将画面改写在投影仪上的尝试就无法进行了。现在,正在原因调查中。
另外,我昨天在MFC版上登陆了同样的内容,所以这边今天准备结贴了。
再次感谢朋友们的参与与帮助,希望以后能有更多机会交流。
赵4老师 2011-08-11
  • 打赏
  • 举报
回复
MonitorFromPoint
Determines the monitor that contains a specific point.

MonitorFromRect
Determines the monitor that contains the largest piece of the rectangle.

MonitorFromWindow
Determines the monitor that a window belongs to (which monitor contains the majority of the window).

GetMonitorInfo
Gets metric information for a particular monitor.

ChangeDisplaySettingsEx
Same as ChangeDisplaySettings except that it allows the caller to specify the device.

EnumDisplayMonitors
Returns info about multiple video devices that an application may overlap. A monitor need not be part of the Windows virtual desktop.

EnumDisplayDevices
Allows you to determine the actual list of devices available on a given machine. You can enumerate the devices and get a DC for any monitor on the system that Windows supports. This allows an application to work with a dedicated display device without sharing the screen with other applications. (This is used, for example, by the Control Panel.)

SystemParametersInfo and GetSystemMetrics
These APIs were updated slightly to include support for multiple monitors, and CreateDC was updated to take a display name in the \\.\DisplayX, where X is a number. This can be used in conjunction with EnumDisplayDevices to get DCs for specific monitors.

luciferisnotsatan 2011-08-11
  • 打赏
  • 举报
回复
去MFC版问问
至善者善之敌 2011-08-11
  • 打赏
  • 举报
回复
太专业了,只能帮顶了,看楼下如何解答

64,648

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧