MFC VC++ ListCtrl
-
I am trying to create ListCtrl where it display data and when I select a row (Single row at a time not multiple) in the ListCtrl , it takes me to another dialog where i can edit this selected data which will reflect in the ListCtrl. Please suggest me some way to tackle this. Thank you. P.s. I am new to MFC VC++.
-
I am trying to create ListCtrl where it display data and when I select a row (Single row at a time not multiple) in the ListCtrl , it takes me to another dialog where i can edit this selected data which will reflect in the ListCtrl. Please suggest me some way to tackle this. Thank you. P.s. I am new to MFC VC++.
-
We have an oldie-goldie article on Dialogs Communication[^].
Thank you for the quick reply. :) I know how to navigate from dialog to dialog ,this is where I am getting confused - "How do I select a row in the List control?" Thanks again :)
-
I am trying to create ListCtrl where it display data and when I select a row (Single row at a time not multiple) in the ListCtrl , it takes me to another dialog where i can edit this selected data which will reflect in the ListCtrl. Please suggest me some way to tackle this. Thank you. P.s. I am new to MFC VC++.
You should handle the [LVN_ITEMCHANGED notification code - Windows applications | Microsoft Docs](https://docs.microsoft.com/en-us/windows/win32/controls/lvn-itemchanged) [CListCtrl selection changing handling](http://forums.codeguru.com/showthread.php?489227-CListCtrl-selection-changing-handling) There is a lot of samples and tutorials also for beginners. for instance: [VC++ MFC Tutorial: CListCtrl, InsertItem, Using List Control, SetImageList, Article with source code.](http://www.ucancode.net/VC\_Library\_Control\_Tool/VC\_MFC\_Totorial\_CListCtrl\_InsertItem\_SetImageList\_Article.htm) [CListCtrl For Beginners](https://simplesamples.info/Beginners/CListCtrl.aspx)
-
Thank you for the quick reply. :) I know how to navigate from dialog to dialog ,this is where I am getting confused - "How do I select a row in the List control?" Thanks again :)
-
I am trying to create ListCtrl where it display data and when I select a row (Single row at a time not multiple) in the ListCtrl , it takes me to another dialog where i can edit this selected data which will reflect in the ListCtrl. Please suggest me some way to tackle this. Thank you. P.s. I am new to MFC VC++.
Have you looked at the
NM_CLICK
notification code?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles