如何注册形式,在Windows Mobile WM_DEVICECHANGE消息 [英] How to register form for WM_DEVICECHANGE message in windows mobile

查看:89
本文介绍了如何注册形式,在Windows Mobile WM_DEVICECHANGE消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用C#.net 3.5紧凑框架编写code ..请任何一个可以告诉我,我如何注册形式WM_DEVICECHANGE以及如何处理该消息中的WindowProc。

i am using c# .net 3.5 compact framework to write code.. please can any one tell me how do i register a form for WM_DEVICECHANGE and how to handle that message in windowproc..

如果我这样做,我得到设备硬件的变化暗示..即时通讯没有得到怎么写,请告知。

if i do this i get intimation of device hardware change.. i m not getting how to write please tell.

感谢

推荐答案

其实WM_DEVICECHANGE不太可能是你想要的。你可能想通过调用 RequestDeviceNotifications 并挂接到Windows CE的设备通知队列传递给它一个句柄与 CreateMsgQueue 创建一个队列。

Actually WM_DEVICECHANGE is unlikely to be what you want. You probably want to hook into Windows CE's device notification queue by calling RequestDeviceNotifications and passing to it a handle to a queue created with CreateMsgQueue.

如果你不喜欢这样的P写入所有/调用code,像往常一样已经是智能设备框架已经它已经完成,并在一个更合乎逻辑的对象模型。

If you don't feel like writing all of this P/Invoke code, as usual the Smart Device Framework already has it already done and in a more logical object model.

这篇关于如何注册形式,在Windows Mobile WM_DEVICECHANGE消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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