如何在Windows Mobile中注册WM_DEVICECHANGE消息的表单 [英] How to register form for WM_DEVICECHANGE message in windows mobile
问题描述
我使用C#.NET 3.5 Compact Framework编写代码..请任何人告诉我如何注册一个窗体 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 / Invoke代码,像往常一样,智能设备框架已经有了它,并且在一个更逻辑的对象模型中。
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屋!