CListCtrl
-
How to uncheck all items in CListCtrl? i have a button = m_button CListCtrl = m_list when i push the button i whant to uncheck all items in m_list ! How? -- modified at 7:16 Tuesday 29th May, 2007
Bravoone
-
How to uncheck all items in CListCtrl? i have a button = m_button CListCtrl = m_list when i push the button i whant to uncheck all items in m_list ! How? -- modified at 7:16 Tuesday 29th May, 2007
Bravoone
for (int i = 0; i < m_List.GetItemCount(); i++)
{
SetCheck(i, FALSE);
}Best wishes, Hans
[CodeProject Forum Guidelines] [How To Ask A Question] [My Articles]
-
for (int i = 0; i < m_List.GetItemCount(); i++)
{
SetCheck(i, FALSE);
}Best wishes, Hans
[CodeProject Forum Guidelines] [How To Ask A Question] [My Articles]
Hans Dietrich wrote:
for (int i = 0; i < m_List.GetItemCount(); i++){ SetCheck(i, FALSE);}
did you mean:
for (int i = 0; i < m_List.GetItemCount(); i++)
{
m_List.SetCheck(i, FALSE);
}didn't you? :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
-
Hans Dietrich wrote:
for (int i = 0; i < m_List.GetItemCount(); i++){ SetCheck(i, FALSE);}
did you mean:
for (int i = 0; i < m_List.GetItemCount(); i++)
{
m_List.SetCheck(i, FALSE);
}didn't you? :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
The code that Hans showed could have been placed in a
CListCtrl
-derived class.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
The code that Hans showed could have been placed in a
CListCtrl
-derived class.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
Mirror climbing? :-D (in a derived class, you don't use
m_List.GetItemCount()
):rose:If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.