capture delete key in CListCtrl and do soem processing
Posted
by user333422
on Stack Overflow
See other posts from Stack Overflow
or by user333422
Published on 2010-05-28T14:00:57Z
Indexed on
2010/05/28
14:01 UTC
Read the original article
Hit count: 298
visual-c++
|mfc
Hi,
I have a class which inherits from CListCtrl class, say class list. I have another class dlg, which inherits from CDialog.
Class dlg contains an instance of class list.
I have got a delete button in class dlg, on which I delete the selected item in listCtrl and do lots of other processing. I want the same functionality on delete key.
I added OnKeyDown() fn is my class list, where I can capture VK_DELETE key. But my problem is that, how do I do otehr processing that I need to do in dialog class. All that processing is dlg class based not list class based. I have many such dlg classes with different data and in every dlg class processing is different.
I tried capturing VK_DELETE in dialog class, but it doesn't capture it if focus is on list class.
I am totally stuck and have no idea, how to do this.
Please give me some idea how i can do this.
Thanks, SG
© Stack Overflow or respective owner