1. 控件中实现连接点 BEGIN_CONNECTION_POINT_MAP(CFireTabCtrl) CONNECTION_POINT_ENTRY(IID_IPropertyNotifySink) CONNECTION_POINT_ENTRY(__uuidof(_IFireTabCtrlEvents)) END_CONNECTION_POINT_MAP() When your container query for connection point, this will tell the container which connection point it supports and wait to sink. 2。_IFireTabCtrlEvents是控件中的idl定义的,你可以往这里加入event. 3。container implement _IFireTabCtrlEvents interface 4. 在控件的BEGIN_MSG_MAP和END_MSG_MAP中加入 MESSAGE_HANDLER(WM_RBUTTONDOWN, OnRButtonDown) 5. 在OnRButtonDown中调用container的_IFireTabCtrlEvents->SomeEventYouDefined();
BEGIN_CONNECTION_POINT_MAP(CFireTabCtrl)
CONNECTION_POINT_ENTRY(IID_IPropertyNotifySink)
CONNECTION_POINT_ENTRY(__uuidof(_IFireTabCtrlEvents))
END_CONNECTION_POINT_MAP()
When your container query for connection point, this will tell the container which connection point it supports and wait to sink.
2。_IFireTabCtrlEvents是控件中的idl定义的,你可以往这里加入event.
3。container implement _IFireTabCtrlEvents interface
4. 在控件的BEGIN_MSG_MAP和END_MSG_MAP中加入 MESSAGE_HANDLER(WM_RBUTTONDOWN, OnRButtonDown)
5. 在OnRButtonDown中调用container的_IFireTabCtrlEvents->SomeEventYouDefined();
BEGIN_SINK_MAP()
SINK_ENTRY_EX
END_SINK_MAP()