Is there a way to tell that it was me (the application) that caused the
LVN_ITEMCHANGED by sending LVM_SETITEMSTATE? Does the MFC CListView receive
events when it changes the selection of the list view? Has anybody a
solution to this problem?
Thanks!
-- Todor Todorov
Set a flag so you know it's you.
Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.
This is easy! The 'lParam' value in the LVN_ITEMCHANGED notification points
to a NMLISTVIEW structure. You can check the 'uChanged' member of this
structure to identify what attributes have changed in an item. If you want
to ignore the LVN_ITEMCHANGED notifications generated when an item's state
has changed (i.e. when an item selected or focus has changed) ... check if
the LVIF_STATE bit is set in the 'uChanged' member.
As for your 2nd query, yes MFC recieves ALL the notifications (i.e. events)
for any common control including the list view control. MFC control classes
like CListCtrl are just wrapper classes around their common control
counterparts. Refer to the ON_NOTIFY( ) message map handling macro on how
to trap control notifications within MFC.
Cheers,
Luki
"Todor Todorov" <t...@cdm.dk> wrote in message
news:OrJxZrMQCHA.4328@tkmsftngp13...
This is an annoying design "feature" from Microsoft. You need to have an
"ignore notifications" flag, which you can set when you send a message to
the control. You then just discard any notifications that happen when the
flag is set.
Christian.
"Christian McArdle" <cmcar...@nospam.yahooxxxx.co.uk> wrote in message
news:3d58e258$0$236$ed9e...@reading.news.pipex.net...