From: muthukkumaran on
Hi,


I had ListControl,its contains looks like " Index IPAddress ID Pwd"
fields .
I want to edit the box and give the input to those editbox values at
the run time.After that if user click close the Listcontrol dialog
application those values, will maintain the listcontrol.How to
maintain the listcontrol values.

In the OnInitDialog() function i called:

m_lstCtrl.SetExtendedStyle(m_lstCtrl.GetExtendedStyle()|
LVS_EX_GRIDLINES|LVS_EX_FULLROWSELECT);

I set the properties in the ListControl Appearance EditLabels i set
TRUE View i set REPORT and then Single Selection I set TRUE.Other
field i didn't change,only i changed those field Only.

Regards,
From: Joseph M. Newcomer on
My preference is to use a structure to hold all the information (except the index, in this
case, if it is simply the list position, 1,2, 3, etc.) and attach it as the LPARAM of the
element of the list control.

Tom Serface advocates not doing this, but keeping a copy in an array and using a virtual
listcontrol to display them.

Either of these approaches means there is only ONE copy of the live data around, and this
eliminates the need to synchronize one kind of list with another.

Then you are free to do whatever you want if you want an edit control. You then restore
the values to the one-and-only instance of the data object when you are done.
joe

On Sun, 21 Feb 2010 20:40:27 -0800 (PST), muthukkumaran <arumuthu(a)gmail.com> wrote:

>Hi,
>
>
>I had ListControl,its contains looks like " Index IPAddress ID Pwd"
>fields .
>I want to edit the box and give the input to those editbox values at
>the run time.After that if user click close the Listcontrol dialog
>application those values, will maintain the listcontrol.How to
>maintain the listcontrol values.
>
>In the OnInitDialog() function i called:
>
> m_lstCtrl.SetExtendedStyle(m_lstCtrl.GetExtendedStyle()|
>LVS_EX_GRIDLINES|LVS_EX_FULLROWSELECT);
>
>I set the properties in the ListControl Appearance EditLabels i set
>TRUE View i set REPORT and then Single Selection I set TRUE.Other
>field i didn't change,only i changed those field Only.
>
>Regards,
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm