本文介绍了将WM消息拦截到C ++类中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何将WM_特定消息截取到C ++类中,我需要使用RegisterDeviceNotification函数注册特定的WM_消息(我需要在这里显示一个窗口吗?)然后截取它并调用适当的函数

C ++类应包含在任何项目中,从控制台到Win32再到mfc.我的想法是创建Win32窗口的框架,然后对该窗口使用WndProc,这很愚蠢吗?

有(肯定)更好的解决方案吗? /div>



I was wondering how to intercept a WM_ specific message into a C++ class, I need to use the RegisterDeviceNotification function to register a specific WM_ message (I need a window here right?) and then intercept it and call the appropriate function

The C++ class should be included in any project, from a console one to a win32 to a mfc one. My idea is to create the skeleton of a win32 window and then use the WndProc for that window, is this stupid?

Is there any (surely) better solution?

解决方案



这篇关于将WM消息拦截到C ++类中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 14:22