void CQueueListCtrl::OnLvnColumnClick(NMHDR *pNMHDR, LRESULT *pResult) { NMLISTVIEW *pNMListView = (NMLISTVIEW *)pNMHDR; bool sortAscending; if (GetSortItem() != pNMListView->iSubItem) { switch (pNMListView->iSubItem) { case 2: // Up Priority case 3: // Rating case 4: // Score case 5: // Ask Count case 8: // Banned case 9: // Part Count sortAscending = false; break; default: sortAscending = true; break; } } else sortAscending = !GetSortAscending(); // Sort table UpdateSortHistory(pNMListView->iSubItem + (sortAscending ? 0 : 100)); SetSortArrow(pNMListView->iSubItem, sortAscending); SortItems(SortProc, pNMListView->iSubItem + (sortAscending ? 0 : 100)); *pResult = 0; }
void CHeaderCtrlEx::RemoveSortArrow() { HDITEM sthdItem = { 0 }; sthdItem.mask = HDI_FORMAT; sthdItem.fmt = HDF_STRING; VERIFY( SetItem( GetSortItem(), &sthdItem )); }
void CUploadListCtrl::OnLvnColumnClick(NMHDR *pNMHDR, LRESULT *pResult) { NMLISTVIEW *pNMListView = (NMLISTVIEW *)pNMHDR; bool sortAscending; if (GetSortItem() != pNMListView->iSubItem) { switch (pNMListView->iSubItem) { case 2: // Datarate case 3: // Session Up case 4: // Wait Time case 7: // Part Count sortAscending = false; break; default: sortAscending = true; break; } } else sortAscending = !GetSortAscending(); // Sort table UpdateSortHistory(pNMListView->iSubItem + (sortAscending ? 0 : 100)); SetSortArrow(pNMListView->iSubItem, sortAscending); SortItems(SortProc, pNMListView->iSubItem + (sortAscending ? 0 : 100)); *pResult = 0; }
void CDownloadClientsCtrl::OnLvnColumnClick(NMHDR *pNMHDR, LRESULT *pResult) { NMLISTVIEW *pNMListView = (NMLISTVIEW *)pNMHDR; bool sortAscending; if (GetSortItem() != pNMListView->iSubItem) { switch (pNMListView->iSubItem) { case 1: // Client Software case 3: // Download Rate case 4: // Part Count case 5: // Session Down case 6: // Session Up sortAscending = false; break; default: sortAscending = true; break; } } else sortAscending = !GetSortAscending(); // Sort table UpdateSortHistory(pNMListView->iSubItem + (sortAscending ? 0 : 100)); SetSortArrow(pNMListView->iSubItem, sortAscending); SortItems(SortProc, pNMListView->iSubItem + (sortAscending ? 0 : 100)); *pResult = 0; }
void CServerListCtrl::OnLvnColumnClick(NMHDR *pNMHDR, LRESULT *pResult) { NMLISTVIEW *pNMListView = (NMLISTVIEW *)pNMHDR; bool sortAscending; if (GetSortItem() != pNMListView->iSubItem) { switch (pNMListView->iSubItem) { case 4: // Users case 5: // Max Users case 6: // Files case 7: // Priority case 9: // Static case 10: // Soft Files case 11: // Hard Files case 12: // Version case 13: // Low IDs case 14: // Obfuscation sortAscending = false; break; default: sortAscending = true; break; } } else sortAscending = !GetSortAscending(); // Sort table UpdateSortHistory(MAKELONG(pNMListView->iSubItem, (sortAscending ? 0 : 0x0001))); SetSortArrow(pNMListView->iSubItem, sortAscending); SortItems(SortProc, MAKELONG(pNMListView->iSubItem, (sortAscending ? 0 : 0x0001))); Invalidate(); *pResult = 0; }
void CQueueListCtrl::Init() { SetName(_T("QueueListCtrl")); CImageList ilDummyImageList; //dummy list for getting the proper height of listview entries ilDummyImageList.Create(1, theApp.GetSmallSytemIconSize().cy,theApp.m_iDfltImageListColorFlags|ILC_MASK, 1, 1); SetImageList(&ilDummyImageList, LVSIL_SMALL); ASSERT( (GetStyle() & LVS_SHAREIMAGELISTS) == 0 ); ilDummyImageList.Detach(); SetExtendedStyle(LVS_EX_FULLROWSELECT); InsertColumn(0,GetResString(IDS_QL_USERNAME),LVCFMT_LEFT,150,0); InsertColumn(1,GetResString(IDS_FILE),LVCFMT_LEFT,275,1); InsertColumn(2,GetResString(IDS_FILEPRIO),LVCFMT_LEFT,110,2); InsertColumn(3,GetResString(IDS_QL_RATING),LVCFMT_LEFT,60,3); InsertColumn(4,GetResString(IDS_SCORE),LVCFMT_LEFT,60,4); InsertColumn(5,GetResString(IDS_ASKED),LVCFMT_LEFT,60,5); InsertColumn(6,GetResString(IDS_LASTSEEN),LVCFMT_LEFT,110,6); InsertColumn(7,GetResString(IDS_ENTERQUEUE),LVCFMT_LEFT,110,7); InsertColumn(8,GetResString(IDS_BANNED),LVCFMT_LEFT,60,8); InsertColumn(9,GetResString(IDS_UPSTATUS),LVCFMT_LEFT,100,9); //==>Modversion [shadow2004] #ifdef MODVERSION InsertColumn(10,GetResString(IDS_CLIENTSOFTWARE),LVCFMT_LEFT,100,10); #endif //Modversion //<==Modversion [shadow2004] SetAllIcons(); Localize(); LoadSettings(); // Barry - Use preferred sort order from preferences SetSortArrow(); SortItems(SortProc, GetSortItem() + (GetSortAscending() ? 0:100)); }
void CClientListCtrl::Init() { SetName(_T("ClientListCtrl")); CImageList ilDummyImageList; //dummy list for getting the proper height of listview entries ilDummyImageList.Create(1, theApp.GetSmallSytemIconSize().cy,theApp.m_iDfltImageListColorFlags|ILC_MASK, 1, 1); SetImageList(&ilDummyImageList, LVSIL_SMALL); ASSERT( (GetStyle() & LVS_SHAREIMAGELISTS) == 0 ); ilDummyImageList.Detach(); SetExtendedStyle(LVS_EX_FULLROWSELECT); InsertColumn(0,GetResString(IDS_QL_USERNAME),LVCFMT_LEFT,150,0); InsertColumn(1,GetResString(IDS_CL_UPLOADSTATUS),LVCFMT_LEFT,150,1); InsertColumn(2,GetResString(IDS_CL_TRANSFUP),LVCFMT_LEFT,150,2); InsertColumn(3,GetResString(IDS_CL_DOWNLSTATUS),LVCFMT_LEFT,150,3); InsertColumn(4,GetResString(IDS_CL_TRANSFDOWN),LVCFMT_LEFT,150,4); InsertColumn(5,GetResString(IDS_CD_CSOFT),LVCFMT_LEFT,150,5); InsertColumn(6,GetResString(IDS_CONNECTED),LVCFMT_LEFT,150,6); CString coltemp; coltemp=GetResString(IDS_CD_UHASH);coltemp.Remove(':'); InsertColumn(7,coltemp,LVCFMT_LEFT,150,7); SetAllIcons(); Localize(); LoadSettings(); SetSortArrow(); SortItems(SortProc, GetSortItem()+ (GetSortAscending()? 0:100)); }
void CDownloadClientsCtrl::Init() { SetPrefsKey(_T("DownloadClientsCtrl")); SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP); InsertColumn(0, GetResString(IDS_QL_USERNAME), LVCFMT_LEFT, DFLT_CLIENTNAME_COL_WIDTH); InsertColumn(1, GetResString(IDS_CD_CSOFT), LVCFMT_LEFT, DFLT_CLIENTSOFT_COL_WIDTH); InsertColumn(2, GetResString(IDS_FILE), LVCFMT_LEFT, DFLT_FILENAME_COL_WIDTH); InsertColumn(3, GetResString(IDS_DL_SPEED), LVCFMT_RIGHT, DFLT_DATARATE_COL_WIDTH); InsertColumn(4, GetResString(IDS_AVAILABLEPARTS), LVCFMT_LEFT, DFLT_PARTSTATUS_COL_WIDTH); InsertColumn(5, GetResString(IDS_CL_TRANSFDOWN), LVCFMT_RIGHT, DFLT_SIZE_COL_WIDTH); InsertColumn(6, GetResString(IDS_CL_TRANSFUP), LVCFMT_RIGHT, DFLT_SIZE_COL_WIDTH); InsertColumn(7, GetResString(IDS_META_SRCTYPE), LVCFMT_LEFT, 100); SetAllIcons(); Localize(); LoadSettings(); //Xman client percentage CFont* pFont = GetFont(); LOGFONT lfFont = {0}; pFont->GetLogFont(&lfFont); lfFont.lfHeight = 11; m_fontBoldSmaller.CreateFontIndirect(&lfFont); //Xman end SetSortArrow(); SortItems(SortProc, GetSortItem() + (GetSortAscending() ? 0 : 100)); }
void CKadSearchListCtrl::Init() { SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP); /* InsertColumn(colNum, GetResString(IDS_NUMBER) ,LVCFMT_LEFT,50); InsertColumn(colKey, GetResString(IDS_KEY) ,LVCFMT_LEFT,50); InsertColumn(colType, GetResString(IDS_TYPE) ,LVCFMT_LEFT,100); InsertColumn(colName, GetResString(IDS_SW_NAME) ,LVCFMT_LEFT,100); InsertColumn(colStop, GetResString(IDS_STATUS),LVCFMT_LEFT,100); InsertColumn(colLoad, GetResString(IDS_THELOAD) ,LVCFMT_LEFT,100); InsertColumn(colPacketsSent, GetResString(IDS_PACKSENT) ,LVCFMT_LEFT,100); InsertColumn(colResponses, GetResString(IDS_RESPONSES) ,LVCFMT_LEFT, 100); */ InsertColumn(colNum, _T("Number") ,LVCFMT_LEFT,50); InsertColumn(colKey, _T("Key") ,LVCFMT_LEFT,80); InsertColumn(colType, _T("Type") ,LVCFMT_LEFT,80); InsertColumn(colName, _T("Name") ,LVCFMT_LEFT,50); InsertColumn(colStop, _T("Status"),LVCFMT_LEFT,60); InsertColumn(colLoad, _T("Load") ,LVCFMT_LEFT,50); InsertColumn(colPacketsSent, _T("Packets Sent") ,LVCFMT_LEFT,30); InsertColumn(colResponses, _T("Responses") ,LVCFMT_LEFT, 30); // SetAllIcons(); Localize(); LoadSettings(); SetSortArrow(); SortItems(SortProc, MAKELONG(GetSortItem(), (GetSortAscending()? 0 : 0x0001))); }
void CIrcNickListCtrl::Init() { InsertColumn(0,GetResString(IDS_IRC_NICK),LVCFMT_LEFT,90); InsertColumn(1,GetResString(IDS_STATUS),LVCFMT_LEFT,70); LoadSettings(); SetSortArrow(); SortItems(&SortProc, GetSortItem() + ( (GetSortAscending()) ? 0:10) ); }
void CHeaderCtrlEx::SetSortArrow() { HDITEM sthdItem = { 0 }; sthdItem.mask = HDI_IMAGE | HDI_FORMAT; sthdItem.fmt = HDF_IMAGE | HDF_STRING; sthdItem.iImage = GetSortOrder() ? 1 : 0; VERIFY( SetItem( GetSortItem(), &sthdItem )); }// End SetSortArrow
void CIrcChannelListCtrl::OnLvnColumnClick(NMHDR* pNMHDR, LRESULT* pResult) { LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR); bool bSortAscending = (GetSortItem() != pNMLV->iSubItem) ? true : !GetSortAscending(); SetSortArrow(pNMLV->iSubItem, bSortAscending); SortItems(&SortProc, pNMLV->iSubItem + (bSortAscending ? 0 : 10)); *pResult = 0; }
void CQueueListCtrl::UpdateAll() { if(theApp.emuledlg->IsRunning()) { RedrawItems(0,GetItemCount()); //CWnd::UpdateWindow(); //not needed because of sorting // Sort table SortItems(SortProc, GetSortItem() + (GetSortAscending() ? 0:100)); } }
void CIrcChannelListCtrl::Init() { InsertColumn(0, GetResString(IDS_IRC_NAME), LVCFMT_LEFT, 203); InsertColumn(1, GetResString(IDS_UUSERS), LVCFMT_LEFT, 50); InsertColumn(2, GetResString(IDS_DESCRIPTION), LVCFMT_LEFT, 350); LoadSettings(); SetSortArrow(); SortItems(&SortProc, GetSortItem() + (GetSortAscending() ? 0 : 10)); }
void CCollectionListCtrl::Init(CString strNameAdd) { SetName(_T("CollectionListCtrl") + strNameAdd); ModifyStyle(LVS_SINGLESEL,0); SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES); InsertColumn(colName,GetResString(IDS_DL_FILENAME),LVCFMT_LEFT,250); InsertColumn(colSize,GetResString(IDS_DL_SIZE),LVCFMT_LEFT,100); InsertColumn(colHash,GetResString(IDS_FILEHASH),LVCFMT_LEFT,250); LoadSettings(); SetSortArrow(); SortItems(SortProc, MAKELONG(GetSortItem(), (GetSortAscending() ? 0:1))); }
void CDownloadClientsCtrl::OnColumnClick( NMHDR* pNMHDR, LRESULT* pResult){ NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; // Barry - Store sort order in preferences // Determine ascending based on whether already sorted on this column bool sortAscending = (GetSortItem()!= pNMListView->iSubItem) ? (pNMListView->iSubItem == 0) : !GetSortAscending(); // Sort table UpdateSortHistory(pNMListView->iSubItem + (sortAscending ? 0:100), 100); SetSortArrow(pNMListView->iSubItem, sortAscending); SortItems(SortProc, pNMListView->iSubItem + (sortAscending ? 0:100)); *pResult = 0; }
void CUploadListCtrl::Init() { SetPrefsKey(_T("UploadListCtrl")); SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP); // ==> Run eMule as NT Service [leuk_he/Stulle] - Stulle // workaround running MFC as service if (!theApp.IsRunningAsService()) { // <== Run eMule as NT Service [leuk_he/Stulle] - Stulle CToolTipCtrl* tooltip = GetToolTips(); if (tooltip) { m_tooltip->SubclassWindow(tooltip->m_hWnd); tooltip->ModifyStyle(0, TTS_NOPREFIX); tooltip->SetDelayTime(TTDT_AUTOPOP, 20000); tooltip->SetDelayTime(TTDT_INITIAL, thePrefs.GetToolTipDelay()*1000); } } // Run eMule as NT Service [leuk_he/Stulle] - Stulle InsertColumn(0, GetResString(IDS_QL_USERNAME), LVCFMT_LEFT, DFLT_CLIENTNAME_COL_WIDTH); InsertColumn(1, GetResString(IDS_FILE), LVCFMT_LEFT, DFLT_FILENAME_COL_WIDTH); InsertColumn(2, GetResString(IDS_DL_SPEED), LVCFMT_RIGHT, DFLT_DATARATE_COL_WIDTH); InsertColumn(3, GetResString(IDS_DL_TRANSF), LVCFMT_RIGHT, DFLT_DATARATE_COL_WIDTH); InsertColumn(4, GetResString(IDS_WAITED), LVCFMT_LEFT, 60); InsertColumn(5, GetResString(IDS_UPLOADTIME), LVCFMT_LEFT, 80); InsertColumn(6, GetResString(IDS_STATUS), LVCFMT_LEFT, 100); InsertColumn(7, GetResString(IDS_UPSTATUS), LVCFMT_LEFT, DFLT_PARTSTATUS_COL_WIDTH); InsertColumn(8, GetResString(IDS_CD_CSOFT), LVCFMT_LEFT, 90); //Xman version see clientversion in every window InsertColumn(9, GetResString(IDS_UPDOWNUPLOADLIST), LVCFMT_LEFT, 90); //Xman show complete up/down in uploadlist // ==> Uploading Chunk Detail Display [SiRoB/Fafner] - Stulle InsertColumn(10,GetResString(IDS_CHUNK),LVCFMT_LEFT,100); // <== Uploading Chunk Detail Display [SiRoB/Fafner] - Stulle SetAllIcons(); Localize(); LoadSettings(); //Xman client percentage CFont* pFont = GetFont(); LOGFONT lfFont = {0}; pFont->GetLogFont(&lfFont); lfFont.lfHeight = 11; m_fontBoldSmaller.CreateFontIndirect(&lfFont); //Xman end SetSortArrow(); SortItems(SortProc, GetSortItem() + (GetSortAscending() ? 0 : 100)); }
void CServerListCtrl::OnColumnClick(NMHDR *pNMHDR, LRESULT *pResult) { NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; // Barry - Store sort order in preferences // Determine ascending based on whether already sorted on this column bool bSortAscending = (GetSortItem()!= pNMListView->iSubItem) ? true : !GetSortAscending(); // Sort table UpdateSortHistory(MAKELONG(pNMListView->iSubItem, (bSortAscending ? 0 : 0x0001))); SetSortArrow(pNMListView->iSubItem, bSortAscending); SortItems(SortProc, MAKELONG(pNMListView->iSubItem, (bSortAscending ? 0 : 0x0001))); Invalidate(); *pResult = 0; }
void CKadContactListCtrl::Init() { SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP); InsertColumn(colID,GetResString(IDS_ID),LVCFMT_LEFT,100); InsertColumn(colType,GetResString(IDS_TYPE) ,LVCFMT_LEFT,50); InsertColumn(colDistance,GetResString(IDS_KADDISTANCE),LVCFMT_LEFT,50); SetAllIcons(); Localize(); LoadSettings(); int iSortItem = GetSortItem(); bool bSortAscending = GetSortAscending(); SetSortArrow(iSortItem, bSortAscending); SortItems(SortProc, MAKELONG(iSortItem, (bSortAscending ? 0 : 0x0001))); }
void CUploadListCtrl::OnColumnClick( NMHDR* pNMHDR, LRESULT* pResult){ NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; // if it's a second click on the same column then reverse the sort order, // otherwise sort the new column in ascending order. // Barry - Store sort order in preferences // Determine ascending based on whether already sorted on this column bool sortAscending = (GetSortItem() != pNMListView->iSubItem) ? true : !GetSortAscending(); // Sort table UpdateSortHistory(pNMListView->iSubItem + (sortAscending ? 0:100)); SetSortArrow(pNMListView->iSubItem, sortAscending); SortItems(SortProc, pNMListView->iSubItem + (sortAscending ? 0:100)); *pResult = 0; }
void CFriendListCtrl::OnLvnColumnClick(NMHDR *pNMHDR, LRESULT *pResult) { NMLISTVIEW *pNMListView = (NMLISTVIEW *)pNMHDR; // Determine ascending based on whether already sorted on this column int iSortItem = GetSortItem(); bool bOldSortAscending = GetSortAscending(); bool bSortAscending = (iSortItem != pNMListView->iSubItem) ? true : !bOldSortAscending; // Item is column clicked iSortItem = pNMListView->iSubItem; // Sort table SetSortArrow(iSortItem, bSortAscending); SortItems(SortProc, MAKELONG(iSortItem, (bSortAscending ? 0 : 0x0001))); *pResult = 0; }
bool CServerListCtrl::Init() { SetName(_T("ServerListCtrl")); ModifyStyle(0,LVS_SINGLESEL|LVS_REPORT); ModifyStyle(LVS_SINGLESEL|LVS_LIST|LVS_ICON|LVS_SMALLICON,LVS_REPORT); //here the CListCtrl is set to report-style SetExtendedStyle(GetExtendedStyle() | LVS_EX_INFOTIP); CToolTipCtrl* tooltip = GetToolTips(); if (tooltip) { m_tooltip->SubclassWindow(*tooltip); tooltip->ModifyStyle(0, TTS_NOPREFIX); tooltip->SetDelayTime(TTDT_AUTOPOP, 20000); tooltip->SetDelayTime(TTDT_INITIAL, thePrefs.GetToolTipDelay()*1000); } InsertColumn(0, GetResString(IDS_SL_SERVERNAME),LVCFMT_LEFT, 150); InsertColumn(1, GetResString(IDS_IP), LVCFMT_LEFT, 140); InsertColumn(2, GetResString(IDS_DESCRIPTION), LVCFMT_LEFT, 150); InsertColumn(3, GetResString(IDS_PING), LVCFMT_RIGHT, 50); InsertColumn(4, GetResString(IDS_UUSERS), LVCFMT_RIGHT, 50); InsertColumn(5, GetResString(IDS_MAXCLIENT), LVCFMT_RIGHT, 50); InsertColumn(6, GetResString(IDS_PW_FILES) , LVCFMT_RIGHT, 50); InsertColumn(7, GetResString(IDS_PREFERENCE), LVCFMT_LEFT, 60); InsertColumn(8, GetResString(IDS_UFAILED), LVCFMT_RIGHT, 50); InsertColumn(9, GetResString(IDS_STATICSERVER), LVCFMT_LEFT, 50); InsertColumn(10,GetResString(IDS_SOFTFILES), LVCFMT_RIGHT, 50); InsertColumn(11,GetResString(IDS_HARDFILES), LVCFMT_RIGHT, 50); InsertColumn(12,GetResString(IDS_VERSION), LVCFMT_LEFT, 50); InsertColumn(13,GetResString(IDS_IDLOW), LVCFMT_RIGHT, 50); InsertColumn(14,GetResString(IDS_OBFUSCATION) ,LVCFMT_RIGHT, 50); SetAllIcons(); Localize(); LoadSettings(); // Barry - Use preferred sort order from preferences SetSortArrow(); SortItems(SortProc, MAKELONG(GetSortItem(), (GetSortAscending()? 0 : 0x0001))); ShowServerCount(); return true; }
void CDownloadClientsCtrl::Init() { SetPrefsKey(_T("DownloadClientsCtrl")); SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP); InsertColumn(0, GetResString(IDS_QL_USERNAME), LVCFMT_LEFT, DFLT_CLIENTNAME_COL_WIDTH); InsertColumn(1, GetResString(IDS_CD_CSOFT), LVCFMT_LEFT, DFLT_CLIENTSOFT_COL_WIDTH); InsertColumn(2, GetResString(IDS_FILE), LVCFMT_LEFT, DFLT_FILENAME_COL_WIDTH); InsertColumn(3, GetResString(IDS_DL_SPEED), LVCFMT_RIGHT, DFLT_DATARATE_COL_WIDTH); InsertColumn(4, GetResString(IDS_AVAILABLEPARTS), LVCFMT_LEFT, DFLT_PARTSTATUS_COL_WIDTH); InsertColumn(5, GetResString(IDS_CL_TRANSFDOWN), LVCFMT_RIGHT, DFLT_SIZE_COL_WIDTH); InsertColumn(6, GetResString(IDS_CL_TRANSFUP), LVCFMT_RIGHT, DFLT_SIZE_COL_WIDTH); InsertColumn(7, GetResString(IDS_META_SRCTYPE), LVCFMT_LEFT, 100); SetAllIcons(); Localize(); LoadSettings(); SetSortArrow(); SortItems(SortProc, GetSortItem() + (GetSortAscending() ? 0 : 100)); }
void CQueueListCtrl::Init() { SetPrefsKey(_T("QueueListCtrl")); SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP); InsertColumn(0, GetResString(IDS_QL_USERNAME), LVCFMT_LEFT, DFLT_CLIENTNAME_COL_WIDTH); InsertColumn(1, GetResString(IDS_FILE), LVCFMT_LEFT, DFLT_FILENAME_COL_WIDTH); InsertColumn(2, GetResString(IDS_FILEPRIO), LVCFMT_LEFT, DFLT_PRIORITY_COL_WIDTH); InsertColumn(3, GetResString(IDS_QL_RATING), LVCFMT_LEFT, 60); InsertColumn(4, GetResString(IDS_SCORE), LVCFMT_LEFT, 60); InsertColumn(5, GetResString(IDS_ASKED), LVCFMT_LEFT, 60); InsertColumn(6, GetResString(IDS_LASTSEEN), LVCFMT_LEFT, 110); InsertColumn(7, GetResString(IDS_ENTERQUEUE), LVCFMT_LEFT, 110); InsertColumn(8, GetResString(IDS_BANNED), LVCFMT_LEFT, 60); InsertColumn(9, GetResString(IDS_UPSTATUS), LVCFMT_LEFT, DFLT_PARTSTATUS_COL_WIDTH); InsertColumn(10,GetResString(IDS_CD_CSOFT), LVCFMT_LEFT, 90); //Xman version see clientversion in every window InsertColumn(11, GetResString(IDS_UPDOWNUPLOADLIST), LVCFMT_LEFT, 90); //Xman show complete up/down in queuelist // ==> push small files [sivka] - Stulle InsertColumn(12,GetResString(IDS_SMALL),LVCFMT_LEFT,40,12); // <== push small files [sivka] - Stulle // ==> push rare file - Stulle InsertColumn(13,GetResString(IDS_RARE),LVCFMT_LEFT,40,13); // <== push rare file - Stulle SetAllIcons(); Localize(); LoadSettings(); //Xman client percentage CFont* pFont = GetFont(); LOGFONT lfFont = {0}; pFont->GetLogFont(&lfFont); lfFont.lfHeight = 11; m_fontBoldSmaller.CreateFontIndirect(&lfFont); //Xman end SetSortArrow(); SortItems(SortProc, GetSortItem() + (GetSortAscending() ? 0 : 100)); }
void CKadSearchListCtrl::Init() { SetPrefsKey(_T("KadSearchListCtrl")); SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP); InsertColumn(colNum, GetResString(IDS_NUMBER), LVCFMT_LEFT, 60); InsertColumn(colKey, GetResString(IDS_KEY), LVCFMT_LEFT, DFLT_HASH_COL_WIDTH); InsertColumn(colType, GetResString(IDS_TYPE), LVCFMT_LEFT, 100); InsertColumn(colName, GetResString(IDS_SW_NAME), LVCFMT_LEFT, DFLT_FILENAME_COL_WIDTH); InsertColumn(colStop, GetResString(IDS_STATUS), LVCFMT_LEFT, 100); InsertColumn(colLoad, GetResString(IDS_THELOAD), LVCFMT_LEFT, 100); InsertColumn(colPacketsSent, GetResString(IDS_PACKSENT), LVCFMT_LEFT, 100); InsertColumn(colResponses, GetResString(IDS_RESPONSES), LVCFMT_LEFT, 100); SetAllIcons(); Localize(); LoadSettings(); SetSortArrow(); SortItems(SortProc, MAKELONG(GetSortItem(), (GetSortAscending() ? 0 : 0x0001))); }
void CUploadListCtrl::Init() { SetName(_T("UploadListCtrl")); CImageList ilDummyImageList; //dummy list for getting the proper height of listview entries ilDummyImageList.Create(1, theApp.GetSmallSytemIconSize().cy,theApp.m_iDfltImageListColorFlags|ILC_MASK, 1, 1); SetImageList(&ilDummyImageList, LVSIL_SMALL); ASSERT( (GetStyle() & LVS_SHAREIMAGELISTS) == 0 ); ilDummyImageList.Detach(); SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP); CToolTipCtrl* tooltip = GetToolTips(); if (tooltip){ m_tooltip->SubclassWindow(tooltip->m_hWnd); tooltip->ModifyStyle(0, TTS_NOPREFIX); tooltip->SetDelayTime(TTDT_AUTOPOP, 20000); tooltip->SetDelayTime(TTDT_INITIAL, thePrefs.GetToolTipDelay()*1000); } InsertColumn(0,GetResString(IDS_QL_USERNAME),LVCFMT_LEFT,150,0); InsertColumn(1,GetResString(IDS_FILE),LVCFMT_LEFT,275,1); InsertColumn(2,GetResString(IDS_DL_SPEED),LVCFMT_LEFT,60,2); InsertColumn(3,GetResString(IDS_DL_TRANSF),LVCFMT_LEFT,65,3); InsertColumn(4,GetResString(IDS_WAITED),LVCFMT_LEFT,60,4); InsertColumn(5,GetResString(IDS_UPLOADTIME),LVCFMT_LEFT,60,5); InsertColumn(6,GetResString(IDS_STATUS),LVCFMT_LEFT,110,6); InsertColumn(7,GetResString(IDS_UPSTATUS),LVCFMT_LEFT,100,7); SetAllIcons(); Localize(); LoadSettings(); // Barry - Use preferred sort order from preferences SetSortArrow(); SortItems(SortProc, GetSortItem() + (GetSortAscending() ? 0:100)); }
void CFriendListCtrl::UpdateList() { theApp.emuledlg->chatwnd->UpdateFriendlistCount(theApp.friendlist->GetCount()); SortItems(SortProc, MAKELONG(GetSortItem(), (GetSortAscending() ? 0 : 0x0001))); }