I have my own WTL list management.
CPopupList : public CWindowImpl<CPopupList, WTL::CListViewCtrl>,
It works fine, except for one thing: I want to catch a notification when a selection changes. Not in the parent window (for example: How to detect a change in the selection of CListCtrl? ), But in the CPopupList itself, and then follow some steps.
In fact, I want a small tooltip to appear next to the currently selected item as additional information about the current item. Just like VS does during autocomplete, giving more information about functions / properties.
Someone tell me how to do this? Thank you very much.
Update:
I tried:
BEGIN_MSG_MAP(CPopupList)
REFLECTED_NOTIFY_CODE_HANDLER(LVN_ITEMCHANGED, OnListItemChanged)
DEFAULT_REFLECTION_HANDLER()
END_MSG_MAP()
But OnListItemChanged () is not called. In parent element
REFLECT_NOTIFICATIONS()
.
Update2 - SOLUTION
:
MSG_HANDLER:
BEGIN_MSG_MAP(CEditorCtrl)
MESSAGE_RANGE_HANDLER(WM_KEYFIRST,WM_KEYLAST,DelegateMessages)
...
MESSAGE_
...
NOTIFY_CODE_HANDLER(LVN_ITEMCHANGED,OnListItemChanged)
CHAIN_MSG_MAP(parentType)
ALT_MSG_MAP(11)
COMMAND_HANDLER(IDC_PRINT_MONOCHROME,BN_CLICKED,OnPrintMonochromeButton)
REFLECT_NOTIFICATIONS()
END_MSG_MAP()
REFLECT_NOTIFICATIONS() ALT_MSG_MAP (11) , , OnListItemChanged .
:
REFLECT_NOTIFICATIONS()
ALT_MSG_MAP(11)
COMMAND_HANDLER(IDC_PRINT_MONOCHROME,BN_CLICKED,OnPrintMonochromeButton)