MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / FindItem

Method FindItem

WinArk/ListViewHelper.cpp:56–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56int ListViewHelper::FindItem(CListViewCtrl& lv, PCWSTR text, bool partial) {
57 auto columns = lv.GetHeader().GetItemCount();
58 CString stext(text);
59 stext.MakeLower();
60 auto count = lv.GetItemCount();
61 for (int i = 0; i < count; i++) {
62 for (int c = 0; c < columns; c++) {
63 CString text;
64 lv.GetItemText(i, c, text);
65 text.MakeLower();
66 if (partial && text.Find(stext) >= 0)
67 return i;
68 if (!partial && text == stext)
69 return i;
70 }
71 }
72
73 return -1;
74}

Callers

nothing calls this directly

Calls 1

FindMethod · 0.80

Tested by

no test coverage detected