CListCtrl::SetCheck
Liste denetimi öğesinin durumu resmi görünür olup olmadığını belirler.
BOOL SetCheck(
int nItem,
BOOL fCheck = TRUE
);
Parametreler
nItem
Liste denetimi öğesi sıfır tabanlı dizini.fCheck
Öğenin durumu resmi veya görünür olması gerekip gerekmediğini belirtir.Varsayılan olarak, fCheck olan doğru ve durumu resmi görünür.fCheck Olan yanlış, görünür değil.
Dönüş Değeri
Öğe işaretliyse, sıfır olmayan Aksi halde 0.
Örnek
int nCount = m_myListCtrl.GetItemCount();
BOOL fCheck = FALSE;
// Set the check state of every other item to TRUE and
// all others to FALSE.
for (int i = 0; i < nCount; i++)
{
m_myListCtrl.SetCheck(i, fCheck);
ASSERT((m_myListCtrl.GetCheck(i) && fCheck) ||
(!m_myListCtrl.GetCheck(i) && !fCheck));
fCheck = !fCheck;
}
Gereksinimler
Başlık: afxcmn.h