#pragma once#include <afxmt.h>#include <map>// Release下最坏情况就是在窗口销毁后会少释放最后一个msg内存#ifdef _DEBUG#define MsgHandle_Track_Memory#endif// CMsgHandlerclass CMsgHandlerEventInterface{public:virtual void OnMsgEvent(int nEvent,WPARAM wParam,LPARAM lParam) = 0;};class CMsgHandler : public CWnd{DECLARE_DYNAMIC(CMsgHandler)public:CMsgHandler();virtual ~CMsgHandler();BOOL IsCreated();BOOL Create();void Close();void SetEventInterface(CMsgHandlerEventInterface* pInterface);void RaiseEvent(int nEvent,WPARAM wParam,LPARAM lParam);void SendEvent(int nEvent,WPARAM wParam,LPARAM lParam);protected:afx_msg LRESULT OnEventMessage(WPARAM wParam,LPARAM lParam);private:CMsgHandlerEventInterface* m_pEventInterface;struct tagEventMsgData{int nEvent;WPARAM wParam;LPARAM lParam;};#ifdef MsgHandle_Track_Memorystd::map<tagEventMsgData* , BOOL> m_mapEventData;CCriticalSection m_cs;#endifDECLARE_MESSAGE_MAP()};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。