| 139 | } |
| 140 | |
| 141 | void CWindowsView::DoSort(const SortInfo* si) { |
| 142 | if (si == nullptr) |
| 143 | return; |
| 144 | |
| 145 | std::sort(m_Items.begin(), m_Items.end(), [&](const auto& h1, const auto& h2)->bool { |
| 146 | switch (GetColumnManager(m_List)->GetColumnTag<DataItemType>(si->SortColumn)){ |
| 147 | case DataItemType::ClassName: |
| 148 | return SortHelper::SortStrings(WindowHelper::GetWindowClassName(h1), |
| 149 | WindowHelper::GetWindowClassName(h2), si->SortAscending); |
| 150 | } |
| 151 | return false; |
| 152 | }); |
| 153 | } |
| 154 | |
| 155 | bool CWindowsView::IsSortable(HWND,int col) const { |
| 156 | return col == 0; |