WM_DEVICECHANGE,我不知道要使用它.如何区分相机,鼠标或显示器等各种设备? [英] WM_DEVICECHANGE ,I have no idea to use it.How to differ various devices like,camera,mouse or Monitor?

查看:287
本文介绍了WM_DEVICECHANGE,我不知道要使用它.如何区分相机,鼠标或显示器等各种设备?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个关于在多个屏幕上进行人脸识别和视频播放的项目.
它即将结束,但是有两个问题需要解决.

我的相机和监视器的插件和插件.
如何检测它们,以及它们之间的区别.
我怎么知道这个消息.

我知道可以使用WM_DEVICECHANGE,但我不知道如何.
我有一台摄像机和五台监视器.

需要解决方案,请提供帮助.

I''m doing a project about face recognition and video playing on multiple Screens.
It''s about to end, but a couple of questions need to be solved.

The plug-in and plug-out of my camera and monitors.
How to detect them, and how they differ from one another.
How can I know the message.

I know WM_DEVICECHANGE can be used, but I don''t know how.
I have one camera and 5 monitors.

Need solutions, please help.

推荐答案

感谢MSDN的 god 法案,其中记录了此类内容.

就像大多数窗口消息一样,魔术在于wParam和lParam参数.

wParam包含一个代码,该代码可以告诉您发生了什么类型的事件,而lParam指向包含更多信息的数据结构.

看这里:
http://msdn.microsoft.com/en-us/library/aa363480(VS .85).aspx [ ^ ]
Thank god Bill for the MSDN, where such things are documented.

The magic lies in the wParam and lParam parameters, like most window messages.

wParam contains a code which tells you what kind of event has occured and lParam points to a datastructure with further information.

Look here:
http://msdn.microsoft.com/en-us/library/aa363480(VS.85).aspx[^]


这篇关于WM_DEVICECHANGE,我不知道要使用它.如何区分相机,鼠标或显示器等各种设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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