我有這樣的聲明,複合控件:沒有得到在MFC中的ActiveX複合控件的所有窗口的消息
class ATL_NO_VTABLE CFooCtrl :
public CComObjectRootEx<CComSingleThreadModel>,
public IDispatchImpl<CFooCtrl, &IID_IFooCtrl, &LIBID_FooLib>,
public CComCompositeControl<CFooCtrl>,
public IPersistStreamInitImpl<CFooCtrl>,
public IOleControlImpl<CFooCtrl>,
public IOleObjectImpl<CFooCtrl>,
public IOleInPlaceActiveObjectImpl<CFooCtrl>,
public IViewObjectExImpl<CFooCtrl>,
public IOleInPlaceObjectWindowlessImpl<CFooCtrl>,
public IConnectionPointContainerImpl<CFooCtrl>,
public IPersistStorageImpl<CFooCtrl>,
public ISpecifyPropertyPagesImpl<CFooCtrl>,
public IQuickActivateImpl<CFooCtrl>,
public IDataObjectImpl<CFooCtrl>,
public IProvideClassInfo2Impl<&CLSID_FooCtrl, &DIID__IFooCtrlEvents, &LIBID_FooCtrlLib>,
public IPropertyNotifySinkCP<CFooCtrl>,
public CComCoClass<CFooCtrl, &CLSID_FooCtrl>,
public CProxy_IFooCtrlEvents<CFooCtrl>,
{
...
BEGIN_MSG_MAP(CFooCtrl)
CHAIN_MSG_MAP(CComCompositeControl<CFooCtrl>)
DEFAULT_REFLECTION_HANDLER()
MESSAGE_HANDLER(WM_TIMER, OnTimer)
MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBkgnd)
MESSAGE_HANDLER(WM_KEYDOWN, OnKeyDown)
MESSAGE_HANDLER(WM_KEYUP, OnKeyUp)
MESSAGE_HANDLER(WM_LBUTTONDBLCLK, OnLButtonDblClk)
MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown)
MESSAGE_HANDLER(WM_LBUTTONUP, OnLButtonUP)
MESSAGE_HANDLER(WM_PAINT, OnPaint)
MESSAGE_HANDLER(WM_RBUTTONDBLCLK, OnRButtonDblClk)
MESSAGE_HANDLER(WM_RBUTTONDOWN, OnRButtonDown)
MESSAGE_HANDLER(WM_RBUTTONUP, OnRButtonUp)
MESSAGE_HANDLER(WM_MOUSEMOVE, OnMouseMove)
MESSAGE_HANDLER(WM_MOUSEWHEEL, OnMouseWheel)
MESSAGE_HANDLER(WM_SIZE, OnSize)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
END_MSG_MAP()
LRESULT OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnEraseBkgnd(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnKeyDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnKeyUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnLButtonDblClk(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnLButtonUP(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnRButtonDblClk(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnRButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnRButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnMouseWheel(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
我得到這樣的OnMouseMove,OnLButtonDown中/上/ DBLCLK事件,但我不明白事件如KeyUp,KeyDown或MouseWheel。
一切似乎都正確定義。我已移動
CHAIN_MSG_MAP(CComCompositeControl<CFooCtrl>)
DEFAULT_REFLECTION_HANDLER()
到消息映射的結尾並沒有區別。我發現,當我刪除Reflection_handler()時,我不會在KeyDown上發生崩潰,但是我懷疑這些是來自我的Python程序,它們正在驅動控制。
我可以假設的唯一的事情是鏈接的味精地圖正在吃這些事件,但沒有家長應該對它們感興趣。
任何人有任何想法,爲什麼我得到一些消息,但不是別人?任何恢復這些消息的想法?