这篇教程C++ GetResString函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetResString函数的典型用法代码示例。如果您正苦于以下问题:C++ GetResString函数的具体用法?C++ GetResString怎么用?C++ GetResString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetResString函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: GetResStringvoid CPPgScheduler::OnNMRclickActionlist(NMHDR* /*pNMHDR*/, LRESULT* pResult){ POINT point; ::GetCursorPos(&point); CTitleMenu m_ActionMenu; CMenu m_ActionSel; CMenu m_CatActionSel; bool isCatAction=false; if (m_actions.GetSelectionMark()!=-1) { int ac=m_actions.GetItemData(m_actions.GetSelectionMark()); if (ac==6 || ac==7) isCatAction=true; } m_ActionMenu.CreatePopupMenu(); m_ActionSel.CreatePopupMenu(); m_CatActionSel.CreatePopupMenu(); UINT nFlag=MF_STRING; if (m_actions.GetSelectionMark()==-1) nFlag=MF_STRING | MF_GRAYED; m_ActionSel.AppendMenu(MF_STRING,MP_SCHACTIONS+ACTION_SETUPL,GetResString(IDS_PW_UPL)); m_ActionSel.AppendMenu(MF_STRING,MP_SCHACTIONS+ACTION_SETDOWNL,GetResString(IDS_PW_DOWNL)); m_ActionSel.AppendMenu(MF_STRING,MP_SCHACTIONS+ACTION_SOURCESL,GetResString(IDS_LIMITSOURCES)); m_ActionSel.AppendMenu(MF_STRING,MP_SCHACTIONS+ACTION_CON5SEC,GetResString(IDS_LIMITCONS5SEC)); m_ActionSel.AppendMenu(MF_STRING,MP_SCHACTIONS+ACTION_CONS,GetResString(IDS_PW_MAXC)); m_ActionSel.AppendMenu(MF_STRING,MP_SCHACTIONS+ACTION_CATSTOP,GetResString(IDS_SCHED_CATSTOP)); m_ActionSel.AppendMenu(MF_STRING,MP_SCHACTIONS+ACTION_CATRESUME,GetResString(IDS_SCHED_CATRESUME)); m_ActionMenu.AddMenuTitle(GetResString(IDS_ACTION)); m_ActionMenu.AppendMenu(MF_POPUP,(UINT_PTR)m_ActionSel.m_hMenu, GetResString(IDS_ADD)); if (isCatAction) { if (thePrefs.GetCatCount()>1) m_CatActionSel.AppendMenu(MF_STRING,MP_SCHACTIONS+20,GetResString(IDS_ALLUNASSIGNED)); m_CatActionSel.AppendMenu(MF_STRING,MP_SCHACTIONS+21,GetResString(IDS_ALL)); for (int i=1;i<thePrefs.GetCatCount();i++) m_CatActionSel.AppendMenu(MF_STRING,MP_SCHACTIONS+22+i,thePrefs.GetCategory(i)->strTitle ); m_ActionMenu.AppendMenu(MF_POPUP,(UINT_PTR)m_CatActionSel.m_hMenu, GetResString(IDS_SELECTCAT)); } else m_ActionMenu.AppendMenu(nFlag,MP_CAT_EDIT, GetResString(IDS_EDIT)); m_ActionMenu.AppendMenu(nFlag,MP_CAT_REMOVE,GetResString(IDS_REMOVE)); m_ActionMenu.TrackPopupMenu(TPM_LEFTALIGN |TPM_RIGHTBUTTON, point.x, point.y, this); VERIFY( m_ActionSel.DestroyMenu() ); VERIFY( m_CatActionSel.DestroyMenu() ); VERIFY( m_ActionMenu.DestroyMenu() ); *pResult = 0;}
开发者ID:LjApps,项目名称:eMule-VeryCD,代码行数:52,
示例2: dc//.........这里部分代码省略.........#else //Modversion image = 1;#endif //Modversion//<==Modversion [shadow2004] } else { if (client->credits->GetScoreRatio(client/*->GetIP()*/) > 1)//==> Xman CreditSystem [shadow2004] image = 2; else image = 0; } POINT point = {cur_rec.left, cur_rec.top+1}; imagelist.Draw(dc,image, point, ILD_NORMAL | ((client->Credits() && client->Credits()->GetCurrentIdentState(client->GetIP()) == IS_IDENTIFIED) ? INDEXTOOVERLAYMASK(1) : 0)); Sbuffer = client->GetUserName(); cur_rec.left +=20; dc.DrawText(Sbuffer,Sbuffer.GetLength(),&cur_rec,DLC_DT_TEXT); cur_rec.left -=20; break; } case 1: if(file) Sbuffer = file->GetFileName(); else Sbuffer = _T("?"); break; case 2: if(file) { switch (file->GetUpPriority()) { case PR_VERYLOW : { Sbuffer = GetResString(IDS_PRIOVERYLOW); break; } case PR_LOW : { if( file->IsAutoUpPriority() ) Sbuffer = GetResString(IDS_PRIOAUTOLOW); else Sbuffer = GetResString(IDS_PRIOLOW); break; } case PR_NORMAL : { if( file->IsAutoUpPriority() ) Sbuffer = GetResString(IDS_PRIOAUTONORMAL); else Sbuffer = GetResString(IDS_PRIONORMAL); break; } case PR_HIGH : { if( file->IsAutoUpPriority() ) Sbuffer = GetResString(IDS_PRIOAUTOHIGH); else Sbuffer = GetResString(IDS_PRIOHIGH); break; } case PR_VERYHIGH : { Sbuffer = GetResString(IDS_PRIORELEASE); break; } default: Sbuffer.Empty(); } } else
开发者ID:BackupTheBerlios,项目名称:nextemf,代码行数:67,
示例3: dcvoid CClientListCtrl::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct){ if( !theApp.emuledlg->IsRunning() ) return; if (!lpDrawItemStruct->itemData) return; CDC* odc = CDC::FromHandle(lpDrawItemStruct->hDC); BOOL bCtrlFocused = ((GetFocus() == this ) || (GetStyle() & LVS_SHOWSELALWAYS)); if (lpDrawItemStruct->itemState & ODS_SELECTED) { if(bCtrlFocused) odc->SetBkColor(m_crHighlight); else odc->SetBkColor(m_crNoHighlight); } else odc->SetBkColor(GetBkColor()); const CUpDownClient* client = (CUpDownClient*)lpDrawItemStruct->itemData; CMemDC dc(odc, &lpDrawItemStruct->rcItem); CFont* pOldFont = dc.SelectObject(GetFont()); CRect cur_rec(lpDrawItemStruct->rcItem); COLORREF crOldTextColor = dc.SetTextColor((lpDrawItemStruct->itemState & ODS_SELECTED) ? m_crHighlightText : m_crWindowText); int iOldBkMode; if (m_crWindowTextBk == CLR_NONE){ DefWindowProc(WM_ERASEBKGND, (WPARAM)(HDC)dc, 0); iOldBkMode = dc.SetBkMode(TRANSPARENT); } else iOldBkMode = OPAQUE; CHeaderCtrl *pHeaderCtrl = GetHeaderCtrl(); int iCount = pHeaderCtrl->GetItemCount(); cur_rec.right = cur_rec.left - 8; cur_rec.left += 4; CString Sbuffer; for(int iCurrent = 0; iCurrent < iCount; iCurrent++){ int iColumn = pHeaderCtrl->OrderToIndex(iCurrent); if( !IsColumnHidden(iColumn) ){ cur_rec.right += GetColumnWidth(iColumn); switch(iColumn){ case 0:{ uint8 image; if (client->IsFriend()) image = 2; else if (client->GetClientSoft() == SO_EDONKEYHYBRID) image = 4; else if (client->GetClientSoft() == SO_MLDONKEY) image = 3; else if (client->GetClientSoft() == SO_SHAREAZA) image = 5; else if (client->GetClientSoft() == SO_URL) image = 6; else if (client->GetClientSoft() == SO_AMULE) image = 7; else if (client->GetClientSoft() == SO_LPHANT) image = 8; else if (client->ExtProtocolAvailable())//==>Modversion [shadow2004]#ifdef MODVERSION image = (client->IsNextEMF())?10:1;#else //Modversion image = 1;#endif //Modversion//<==Modversion [shadow2004] else image = 0; POINT point = {cur_rec.left, cur_rec.top+1}; imagelist.Draw(dc,image, point, ILD_NORMAL | ((client->Credits() && client->Credits()->GetCurrentIdentState(client->GetIP()) == IS_IDENTIFIED) ? INDEXTOOVERLAYMASK(1) : 0)); if (client->GetUserName()==NULL) Sbuffer.Format(_T("(%s)"), GetResString(IDS_UNKNOWN)); else Sbuffer = client->GetUserName(); cur_rec.left +=20; dc.DrawText(Sbuffer,Sbuffer.GetLength(),&cur_rec,DLC_DT_TEXT); cur_rec.left -=20; break; } case 1:{ Sbuffer = client->GetUploadStateDisplayString(); break; } case 2:{ if(client->credits) Sbuffer = CastItoXBytes(client->credits->GetUploadedTotal(), false, false); else Sbuffer.Empty(); break; } case 3:{ Sbuffer = client->GetDownloadStateDisplayString(); break; } case 4:{ if(client->credits) Sbuffer = CastItoXBytes(client->credits->GetDownloadedTotal(), false, false); else Sbuffer.Empty(); break; }//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:nextemf,代码行数:101,
示例4: ASSERTvoid CQueueListCtrl::GetItemDisplayText(const CUpDownClient *client, int iSubItem, LPTSTR pszText, int cchTextMax){ if (pszText == NULL || cchTextMax <= 0) { ASSERT(0); return; } pszText[0] = _T('/0'); switch (iSubItem) { case 0: if (client->GetUserName() == NULL) _sntprintf(pszText, cchTextMax, _T("(%s)"), GetResString(IDS_UNKNOWN)); else _tcsncpy(pszText, client->GetUserName(), cchTextMax); break; case 1: { const CKnownFile *file = theApp.sharedfiles->GetFileByID(client->GetUploadFileID()); _tcsncpy(pszText, file != NULL ? file->GetFileName() : _T(""), cchTextMax); break; } case 2: { const CKnownFile *file = theApp.sharedfiles->GetFileByID(client->GetUploadFileID()); if (file) { // ==> PowerShare [ZZ/MorphXT] - Stulle /* switch (file->GetUpPriority()) { case PR_VERYLOW: _tcsncpy(pszText, GetResString(IDS_PRIOVERYLOW), cchTextMax); break; case PR_LOW: if (file->IsAutoUpPriority()) _tcsncpy(pszText, GetResString(IDS_PRIOAUTOLOW), cchTextMax); else _tcsncpy(pszText, GetResString(IDS_PRIOLOW), cchTextMax); break; case PR_NORMAL: if (file->IsAutoUpPriority()) _tcsncpy(pszText, GetResString(IDS_PRIOAUTONORMAL), cchTextMax); else _tcsncpy(pszText, GetResString(IDS_PRIONORMAL), cchTextMax); break; case PR_HIGH: if (file->IsAutoUpPriority()) _tcsncpy(pszText, GetResString(IDS_PRIOAUTOHIGH), cchTextMax); else _tcsncpy(pszText, GetResString(IDS_PRIOHIGH), cchTextMax); break; case PR_VERYHIGH: _tcsncpy(pszText, GetResString(IDS_PRIORELEASE), cchTextMax); break; //Xman PowerRelease case PR_POWER: _tcsncpy(pszText, GetResString(IDS_POWERRELEASE), cchTextMax); break; //Xman end } */ CString Sbuffer; switch (file->GetUpPriority()) { case PR_VERYLOW : { Sbuffer = GetResString(IDS_PRIOVERYLOW); break; } case PR_LOW : { if( file->IsAutoUpPriority() ) Sbuffer = GetResString(IDS_PRIOAUTOLOW); else Sbuffer = GetResString(IDS_PRIOLOW); break; } case PR_NORMAL : { if( file->IsAutoUpPriority() ) Sbuffer = GetResString(IDS_PRIOAUTONORMAL); else Sbuffer = GetResString(IDS_PRIONORMAL); break; } case PR_HIGH : { if( file->IsAutoUpPriority() ) Sbuffer = GetResString(IDS_PRIOAUTOHIGH); else Sbuffer = GetResString(IDS_PRIOHIGH); break; } case PR_VERYHIGH : { Sbuffer = GetResString(IDS_PRIORELEASE); break; } //Xman PowerRelease case PR_POWER: { Sbuffer = GetResString(IDS_POWERRELEASE); break; } //Xman end default: Sbuffer.Empty(); } if(client->GetPowerShared(file)) {//.........这里部分代码省略.........
开发者ID:rusingineer,项目名称:eMule-mephisto-mod,代码行数:101,
示例5: SetElementHtmlvoid CMiniMule::Localize(){ SetElementHtml(_T("connectedLabel"), CComBSTR(GetResString(IDS_CONNECTED))); SetElementHtml(_T("upRateLabel"), CComBSTR(GetResString(IDS_PW_CON_UPLBL))); SetElementHtml(_T("downRateLabel"), CComBSTR(GetResString(IDS_PW_CON_DOWNLBL))); SetElementHtml(_T("completedLabel"), CComBSTR(GetResString(IDS_DL_TRANSFCOMPL))); SetElementHtml(_T("freeSpaceLabel"), CComBSTR(GetResString(IDS_STATS_FREESPACE))); CComPtr<IHTMLElement> a; GetElementInterface(_T("openIncomingLink"), &a); if (a) { a->put_title(CComBSTR(RemoveAmbersand(GetResString(IDS_OPENINC)))); a.Release(); } GetElementInterface(_T("optionsLink"), &a); if (a) { a->put_title(CComBSTR(RemoveAmbersand(GetResString(IDS_EM_PREFS)))); a.Release(); } GetElementInterface(_T("restoreWndLink"), &a); if (a) { a->put_title(CComBSTR(RemoveAmbersand(GetResString(IDS_MAIN_POPUP_RESTORE)))); a.Release(); } CComPtr<IHTMLImgElement> img; GetElementInterface(_T("openIncomingImg"), &img); if (img) { img->put_alt(CComBSTR(RemoveAmbersand(GetResString(IDS_OPENINC)))); img.Release(); } GetElementInterface(_T("optionsImg"), &img); if (img) { img->put_alt(CComBSTR(RemoveAmbersand(GetResString(IDS_EM_PREFS)))); img.Release(); } GetElementInterface(_T("restoreWndImg"), &img); if (img) { img->put_alt(CComBSTR(RemoveAmbersand(GetResString(IDS_MAIN_POPUP_RESTORE)))); img.Release(); }}
开发者ID:LjApps,项目名称:eMule-VeryCD,代码行数:48,
示例6: GetFormatedUIntvoid CPPgNe::Localize(void){ CString temp; if (m_hWnd) { // Nicehash from iONiX temp.Format(GetResString(IDS_NICEHASH_STATIC)+_T(": %s %%"), GetFormatedUInt(m_iNiceHashWeight)); GetDlgItem(IDC_NICEHASH_STATIC)->SetWindowText(temp); GetDlgItem(IDC_NICEHASH_LEFT)->SetWindowText(GetResString(IDS_NICEHASH_LEFT)); GetDlgItem(IDC_NICEHASH_RIGHT)->SetWindowText(GetResString(IDS_NICEHASH_RIGHT)); // Nicehash GetDlgItem(IDC_REASKSRCAFTERIPCHANGE)->SetWindowText(GetResString(IDS_REASKSRCAFTERIPCHANGE)); GetDlgItem(IDC_QUICKSTART_BOX)->SetWindowText(GetResString(IDS_QUICKSTART)); GetDlgItem(IDC_PPG_PHOENIX_QUICKSTART)->SetWindowText(GetResString(IDS_PPG_PHOENIX_QUICKSTART)); GetDlgItem(IDC_PPG_PHOENIX_QUICKSTART_CONN_STATIC)->SetWindowText(GetResString(IDS_PPG_PHOENIX_QUICKSTART_CONN_STATIC)); GetDlgItem(IDC_PPG_PHOENIX_QUICKSTART_CONN_PER_FIVE_STATIC)->SetWindowText(GetResString(IDS_PPG_PHOENIX_QUICKSTART_CONN_PER_FIVE_STATIC)); GetDlgItem(IDC_QUICKSTARTAFTERIPCHANGE)->SetWindowText(GetResString(IDS_QUICKSTARTAFTERIPCHANGE)); GetDlgItem(IDC_QUICK_START_MINUTES_STATIC)->SetWindowText(GetResString(IDS_QUICK_START_MINUTES_STATIC)); GetDlgItem(IDC_AutoHL_Groupbox)->SetWindowText(GetResString(IDS_AutoHL_Groupbox)); GetDlgItem(IDC_AutoHL)->SetWindowText(GetResString(IDS_AutoHL)); GetDlgItem(IDC_MinAutoHL_static)->SetWindowText(GetResString(IDS_MinAutoHL_static)); GetDlgItem(IDC_MaxAutoHL_static)->SetWindowText(GetResString(IDS_MaxAutoHL_static)); GetDlgItem(IDC_MaxSourcesHL_static)->SetWindowText(GetResString(IDS_MaxSourcesHL_static)); GetDlgItem(IDC_AutoHLUpdate_static)->SetWindowText(GetResString(IDS_AutoHLUpdate_static)); GetDlgItem(IDC_AutoHLUpdate_static2)->SetWindowText(GetResString(IDS_AutoHLUpdate_static2)); GetDlgItem(IDC_EnableDownloadInColor)->SetWindowText(GetResString(IDS_EnableDownloadInColor)); //Spe64 GetDlgItem(IDC_EnableDownloadInBold)->SetWindowText(GetResString(IDS_EnableDownloadInBold)); //Spe64 GetDlgItem(IDC_UploadColor)->SetWindowText(GetResString(IDS_UploadColor));//lama GetDlgItem(IDC_CHECK_SIVKABAN)->SetWindowText(GetResString(IDS_CHECK_SIVKABAN));//lama GetDlgItem(IDC_CHECK_SIVKA_BANLOG)->SetWindowText(GetResString(IDS_CHECK_SIVKA_BANLOG));//lama GetDlgItem(IDC_IsClientBanTime_static)->SetWindowText(GetResString(IDS_ISCLIENTBANTIME_STATIC));//lama }}
开发者ID:BackupTheBerlios,项目名称:resurrection,代码行数:37,
示例7: InitWindowStylesBOOL CCollectionViewDialog::OnInitDialog(void){ CDialog::OnInitDialog(); InitWindowStyles(this); if (!m_pCollection) { ASSERT(0); return TRUE; } m_CollectionViewList.Init(_T("CollectionView")); SetIcon(m_icoWnd = theApp.LoadIcon(_T("Collection_View")), FALSE); m_AddNewCatagory.SetCheck(false); SetWindowText(GetResString(IDS_VIEWCOLLECTION) + _T(": ") + m_pCollection->m_sCollectionName); m_CollectionViewListIcon.SetIcon(m_icoColl = theApp.LoadIcon(_T("AABCollectionFileType"))); m_CollectionDownload.SetWindowText(GetResString(IDS_DOWNLOAD)); m_CollectionExit.SetWindowText(GetResString(IDS_CW_CLOSE)); SetDlgItemText(IDC_COLLECTIONVIEWAUTHORLABEL, GetResString(IDS_AUTHOR) + _T(":")); SetDlgItemText(IDC_COLLECTIONVIEWAUTHORKEYLABEL, GetResString(IDS_AUTHORKEY) + _T(":")); SetDlgItemText(IDC_COLLECTIONVIEWCATEGORYCHECK, GetResString(IDS_COLL_ADDINCAT)); SetDlgItemText(IDC_VCOLL_DETAILS, GetResString(IDS_DETAILS)); SetDlgItemText(IDC_VCOLL_OPTIONS, GetResString(IDS_OPTIONS)); m_CollectionViewAuthor.SetWindowText(m_pCollection->m_sCollectionAuthorName); m_CollectionViewAuthorKey.SetWindowText(m_pCollection->GetAuthorKeyHashString()); AddAnchor(IDC_COLLECTIONVEWLIST, TOP_LEFT, BOTTOM_RIGHT); AddAnchor(IDC_VCOLL_DETAILS, BOTTOM_LEFT, BOTTOM_RIGHT); AddAnchor(IDC_VCOLL_OPTIONS, BOTTOM_LEFT, BOTTOM_RIGHT); AddAnchor(IDC_COLLECTIONVIEWAUTHORLABEL, BOTTOM_LEFT); AddAnchor(IDC_COLLECTIONVIEWAUTHORKEYLABEL, BOTTOM_LEFT); AddAnchor(IDC_COLLECTIONVIEWCATEGORYCHECK, BOTTOM_LEFT); AddAnchor(IDC_COLLECTIONVIEWAUTHOR, BOTTOM_LEFT, BOTTOM_RIGHT); AddAnchor(IDC_COLLECTIONVIEWAUTHORKEY, BOTTOM_LEFT, BOTTOM_RIGHT); AddAnchor(IDC_VCOLL_CLOSE, BOTTOM_RIGHT); AddAnchor(IDC_VIEWCOLLECTIONDL, BOTTOM_RIGHT); EnableSaveRestore(PREF_INI_SECTION); POSITION pos = m_pCollection->m_CollectionFilesMap.GetStartPosition(); while (pos != NULL) { CCollectionFile* pCollectionFile; CSKey key; m_pCollection->m_CollectionFilesMap.GetNextAssoc(pos, key, pCollectionFile); int iImage = theApp.GetFileTypeSystemImageIdx(pCollectionFile->GetFileName()); int iItem = m_CollectionViewList.InsertItem(LVIF_TEXT | LVIF_PARAM | (iImage > 0 ? LVIF_IMAGE : 0), m_CollectionViewList.GetItemCount(), NULL, 0, 0, iImage, (LPARAM)pCollectionFile); if (iItem != -1) { m_CollectionViewList.SetItemText(iItem, colName, pCollectionFile->GetFileName()); m_CollectionViewList.SetItemText(iItem, colSize, CastItoXBytes(pCollectionFile->GetFileSize())); m_CollectionViewList.SetItemText(iItem, colHash, md4str(pCollectionFile->GetFileHash())); } } int iItem = m_CollectionViewList.GetItemCount(); while (iItem) m_CollectionViewList.SetItemState(--iItem, LVIS_SELECTED, LVIS_SELECTED); CString strTitle; strTitle.Format(GetResString(IDS_COLLECTIONLIST) + _T(" (%u)"), m_CollectionViewList.GetItemCount()); m_CollectionViewListLabel.SetWindowText(strTitle); return TRUE;}
开发者ID:brolee,项目名称:EMule-GIFC,代码行数:68,
示例8: InitWindowStylesBOOL CPPgWebcachesettings::OnInitDialog(){ CPropertyPage::OnInitDialog(); InitWindowStyles(this); LoadSettings(); Localize(); // create hyperlinks // note: there are better classes to create a pure hyperlink, however since it is only needed here // we rather use an already existing class // Create email-proxy-submission link. The current settings will be included in the email. // Superlexx - email proxy submissions are not available anymore, use the web form// Create website-proxy-submission link CRect rect2; GetDlgItem(IDC_WEBCACHELINK2)->GetWindowRect(rect2); ::MapWindowPoints(NULL, m_hWnd, (LPPOINT)&rect2, 2); m_wndSubmitWebcacheLink2.CreateEx(NULL,0,_T("MsgWnd"),WS_BORDER | WS_VISIBLE | WS_CHILD | HTC_WORDWRAP | HTC_UNDERLINE_HOVER,rect2.left,rect2.top,rect2.Width(),rect2.Height(),m_hWnd,0); m_wndSubmitWebcacheLink2.SetBkColor(::GetSysColor(COLOR_3DFACE)); // still not the right color, will fix this later (need to merge the .rc file before it changes ;) ) m_wndSubmitWebcacheLink2.SetFont(GetFont()); if (!bCreated2){ bCreated2 = true; CString URL = _T("http://ispcachingforemule.de.vu/index.php?show=submitProxy"); CString proxyName, proxyPort, hostName; proxyName.Format(_T("%s"), thePrefs.webcacheName); proxyPort.Format(_T("%i"), thePrefs.webcachePort); hostName.Format(_T("%s"), thePrefs.GetLastResolvedName()); URL += _T("&hostName=") + hostName + _T("&proxyName=") + proxyName + _T("&proxyPort=") + proxyPort; m_wndSubmitWebcacheLink2.AppendText(GetResString(IDS_WC_LINK)); m_wndSubmitWebcacheLink2.AppendHyperLink(GetResString(IDS_WC_SUBMIT_WEB),0,URL,0,0); } //JP hide advanced settings if (showadvanced) { GetDlgItem(IDC_ADVANCEDCONTROLS)->SetWindowText(GetResString(IDS_WC_HIDE_ADV)); GetDlgItem(IDC_EXTRATIMEOUT)->ShowWindow(SW_SHOW); GetDlgItem(IDC_LOCALTRAFFIC)->ShowWindow(SW_SHOW); GetDlgItem(IDC_BLOCKS)->ShowWindow(SW_SHOW); GetDlgItem(IDC_STATIC_NRBLOCKS)->ShowWindow(SW_SHOW); GetDlgItem(IDC_STATIC_BLOCKS)->ShowWindow(SW_SHOW); GetDlgItem(IDC_PERSISTENT_PROXY_CONNS)->ShowWindow(SW_SHOW); GetDlgItem(IDC_UPDATE_WCSETTINGS)->ShowWindow(SW_SHOW); } else { GetDlgItem(IDC_ADVANCEDCONTROLS)->SetWindowText(GetResString(IDS_WC_ADVANCED)); GetDlgItem(IDC_EXTRATIMEOUT)->ShowWindow(SW_HIDE); GetDlgItem(IDC_LOCALTRAFFIC)->ShowWindow(SW_HIDE); GetDlgItem(IDC_BLOCKS)->ShowWindow(SW_HIDE); GetDlgItem(IDC_STATIC_NRBLOCKS)->ShowWindow(SW_HIDE); GetDlgItem(IDC_STATIC_BLOCKS)->ShowWindow(SW_HIDE); GetDlgItem(IDC_PERSISTENT_PROXY_CONNS)->ShowWindow(SW_HIDE); GetDlgItem(IDC_UPDATE_WCSETTINGS)->ShowWindow(SW_HIDE); } return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE}
开发者ID:BackupTheBerlios,项目名称:resurrection,代码行数:63,
示例9: GetDlgItemvoid CPPgStats::Localize(void){ if(m_hWnd) { GetDlgItem(IDC_GRAPHS)->SetWindowText(GetResString(IDS_GRAPHS)); GetDlgItem(IDC_STREE)->SetWindowText(GetResString(IDS_STREE)); GetDlgItem(IDC_STATIC_CGRAPHSCALE)->SetWindowText(GetResString(IDS_PPGSTATS_YSCALE)); GetDlgItem(IDC_STATIC_CGRAPHRATIO)->SetWindowText(GetResString(IDS_PPGSTATS_ACRATIO)); SetWindowText(GetResString(IDS_STATSSETUPINFO)); GetDlgItem(IDC_PREFCOLORS)->SetWindowText(GetResString(IDS_COLORS)); SetDlgItemText(IDC_FILL_GRAPHS, GetResString(IDS_FILLGRAPHS) ); m_colors.ResetContent(); int iItem; iItem = m_colors.AddString(GetResString(IDS_SP_BACKGROUND)); m_colors.SetItemData(iItem, 0); iItem = m_colors.AddString(GetResString(IDS_SP_GRID)); m_colors.SetItemData(iItem, 1); iItem = m_colors.AddString(GetResString(IDS_SP_DL3)); m_colors.SetItemData(iItem, 4); iItem = m_colors.AddString(GetResString(IDS_SP_DL2)); m_colors.SetItemData(iItem, 3); iItem = m_colors.AddString(GetResString(IDS_SP_DL1)); m_colors.SetItemData(iItem, 2); iItem = m_colors.AddString(GetResString(IDS_SP_UL3)); m_colors.SetItemData(iItem, 7); iItem = m_colors.AddString(GetResString(IDS_SP_UL2)); m_colors.SetItemData(iItem, 6); iItem = m_colors.AddString(GetResString(IDS_SP_UL1)); m_colors.SetItemData(iItem, 5); iItem = m_colors.AddString(GetResString(IDS_SP_ULSLOTSNOOVERHEAD)); m_colors.SetItemData(iItem, 14); iItem = m_colors.AddString(GetResString(IDS_SP_ULFRIENDS)); m_colors.SetItemData(iItem, 13); iItem = m_colors.AddString(GetResString(IDS_SP_ULPOWERSHARE)); m_colors.SetItemData(iItem, 15); //MORPH - Added by SiRoB, Powershare Display iItem = m_colors.AddString(GetResString(IDS_SP_ACTCON)); m_colors.SetItemData(iItem, 8); iItem = m_colors.AddString(GetResString(IDS_SP_ACTUL)); m_colors.SetItemData(iItem, 10); iItem = m_colors.AddString(GetResString(IDS_SP_TOTALUL)); m_colors.SetItemData(iItem, 9); iItem = m_colors.AddString(GetResString(IDS_SP_ACTDL)); m_colors.SetItemData(iItem, 12); iItem = m_colors.AddString(GetResString(IDS_SP_ICONBAR)); m_colors.SetItemData(iItem, 11); m_ctlColor.CustomText = GetResString(IDS_COL_MORECOLORS); m_ctlColor.DefaultText = NULL; m_colors.SetCurSel(0); OnCbnSelChangeColorSelector(); ShowInterval(); }}
开发者ID:rusingineer,项目名称:emulemorph,代码行数:42,
示例10: GetDlgItemBOOL CPPgWebcachesettings::OnApply(){ bool bRestartApp = false; CString buffer; // set thePrefs.webcacheName if(GetDlgItem(IDC_webcacheName)->GetWindowTextLength()) { CString nNewwebcache; GetDlgItem(IDC_webcacheName)->GetWindowText(nNewwebcache); if (thePrefs.webcacheName != nNewwebcache){ thePrefs.webcacheName = nNewwebcache; bRestartApp = true; } } // set thePrefs.webcachePort if(GetDlgItem(IDC_webcachePort)->GetWindowTextLength()) { GetDlgItem(IDC_webcachePort)->GetWindowText(buffer); uint16 nNewPort = (uint16)_tstol(buffer); if (!nNewPort) nNewPort=0; if (nNewPort != thePrefs.webcachePort){ thePrefs.webcachePort = nNewPort; } } // set thePrefs.webcacheEnabled thePrefs.webcacheEnabled = IsDlgButtonChecked(IDC_Activatewebcachedownloads)!=0; // set thePrefs.webcacheBlockLimit if(GetDlgItem(IDC_BLOCKS)->GetWindowTextLength()) { GetDlgItem(IDC_BLOCKS)->GetWindowText(buffer); uint16 nNewBlocks = (uint16)_tstol(buffer); if ((!nNewBlocks) || (nNewBlocks > 50000) || (nNewBlocks < 0)) nNewBlocks=0; if (nNewBlocks != thePrefs.GetWebCacheBlockLimit()){ thePrefs.SetWebCacheBlockLimit(nNewBlocks); } } // set thePrefs.WebCacheExtraTimeout thePrefs.SetWebCacheExtraTimeout(IsDlgButtonChecked(IDC_EXTRATIMEOUT) != 0); // set thePrefs.WebCacheCachesLocalTraffic uint8 cachestraffic; cachestraffic = (uint8)IsDlgButtonChecked(IDC_LOCALTRAFFIC); if (cachestraffic == 1) thePrefs.SetWebCacheCachesLocalTraffic(0); else thePrefs.SetWebCacheCachesLocalTraffic(1); // set thePrefs.PersistentConnectionsForProxyDownloads thePrefs.PersistentConnectionsForProxyDownloads = IsDlgButtonChecked(IDC_PERSISTENT_PROXY_CONNS)!=0; // set thePrefs.WCAutoupdate thePrefs.WCAutoupdate = IsDlgButtonChecked(IDC_UPDATE_WCSETTINGS)!=0; SetModified(FALSE); LoadSettings(); if (bRestartApp) { AfxMessageBox(GetResString(IDS_SETTINGCHANGED_RESTART)); thePrefs.WebCacheDisabledThisSession = true; } return CPropertyPage::OnApply();}
开发者ID:BackupTheBerlios,项目名称:resurrection,代码行数:67,
示例11: SetWindowTextvoid CPPgWebServer::Localize(void){ if(m_hWnd){ SetWindowText(GetResString(IDS_PW_WS)); GetDlgItem(IDC_WSPASS_LBL)->SetWindowText(GetResString(IDS_WS_PASS)); GetDlgItem(IDC_WSPORT_LBL)->SetWindowText(GetResString(IDS_PORT)); GetDlgItem(IDC_WSENABLED)->SetWindowText(GetResString(IDS_ENABLED)); GetDlgItem(IDC_WSRELOADTMPL)->SetWindowText(GetResString(IDS_SF_RELOAD)); GetDlgItem(IDC_WSENABLED)->SetWindowText(GetResString(IDS_ENABLED)); SetDlgItemText(IDC_WS_GZIP,GetResString(IDS_WEB_GZIP_COMPRESSION)); GetDlgItem(IDC_WSPASS_LBL2)->SetWindowText(GetResString(IDS_WS_PASS)); GetDlgItem(IDC_WSENABLEDLOW)->SetWindowText(GetResString(IDS_ENABLED)); GetDlgItem(IDC_STATIC_GENERAL)->SetWindowText(GetResString(IDS_PW_GENERAL)); GetDlgItem(IDC_STATIC_ADMIN)->SetWindowText(GetResString(IDS_ADMIN)); GetDlgItem(IDC_STATIC_LOWUSER)->SetWindowText(GetResString(IDS_WEB_LOWUSER)); GetDlgItem(IDC_WSENABLEDLOW)->SetWindowText(GetResString(IDS_ENABLED)); GetDlgItem(IDC_TEMPLATE)->SetWindowText(GetResString(IDS_WS_RELOAD_TMPL));//==> remove MobileMule [shadow2004]#if defined(MM) GetDlgItem(IDC_MMENABLED)->SetWindowText(GetResString(IDS_ENABLEMM)); GetDlgItem(IDC_STATIC_MOBILEMULE)->SetWindowText(GetResString(IDS_MOBILEMULE)); GetDlgItem(IDC_MMPASSWORD)->SetWindowText(GetResString(IDS_WS_PASS)); GetDlgItem(IDC_MMPORT_LBL)->SetWindowText(GetResString(IDS_PORT));#endif //MM//<== remove MobileMule [shadow2004] }}
开发者ID:BackupTheBerlios,项目名称:nextemf,代码行数:32,
示例12: SetWindowTextvoid CPPgScheduler::Localize(void){ if(m_hWnd) { SetWindowText(GetResString(IDS_SCHEDULER)); GetDlgItem(IDC_ENABLE)->SetWindowText(GetResString(IDS_ENABLED)); GetDlgItem(IDC_S_ENABLE)->SetWindowText(GetResString(IDS_ENABLED)); GetDlgItem(IDC_STATIC_S_TITLE)->SetWindowText(GetResString(IDS_TITLE)); GetDlgItem(IDC_STATIC_DETAILS)->SetWindowText(GetResString(IDS_DETAILS)); GetDlgItem(IDC_STATIC_S_TIME)->SetWindowText(GetResString(IDS_TIME)); GetDlgItem(IDC_STATIC_S_ACTION)->SetWindowText(GetResString(IDS_ACTION)); GetDlgItem(IDC_APPLY)->SetWindowText(GetResString(IDS_PW_APPLY)); GetDlgItem(IDC_REMOVE)->SetWindowText(GetResString(IDS_REMOVE)); GetDlgItem(IDC_NEW)->SetWindowText(GetResString(IDS_NEW)); GetDlgItem(IDC_CHECKNOENDTIME)->SetWindowText(GetResString(IDS_CHECKNOENDTIME)); while (m_timesel.GetCount()>0) m_timesel.DeleteString(0); for (int i=0;i<11;i++) m_timesel.AddString(GetDayLabel(i)); m_timesel.SetCurSel(0); if (m_list.GetSelectionMark()!=-1) m_timesel.SetCurSel(theApp.scheduler->GetSchedule(m_timesel.GetCurSel())->day); }}
开发者ID:LjApps,项目名称:eMule-VeryCD,代码行数:25,
示例13: OnCommandBOOL CPPgScheduler::OnCommand(WPARAM wParam, LPARAM lParam){ int item= m_actions.GetSelectionMark(); // add if (wParam>=MP_SCHACTIONS && wParam<MP_SCHACTIONS+20 && m_actions.GetItemCount()<16) { int action=wParam-MP_SCHACTIONS; int i=m_actions.GetItemCount(); m_actions.InsertItem(i,GetActionLabel(action)); m_actions.SetItemData(i,action); m_actions.SetSelectionMark(i); if (action<6) OnCommand(MP_CAT_EDIT,0); } else if (wParam>=MP_SCHACTIONS+20 && wParam<=MP_SCHACTIONS+80) { CString newval; newval.Format(_T("%i"),wParam-MP_SCHACTIONS-22); m_actions.SetItemText(item,1,newval); } else if (wParam == ID_HELP) { OnHelp(); return TRUE; } switch (wParam){ case MP_CAT_EDIT: { if (item!=-1) { InputBox inputbox; // todo: differen prompts CString prompt; switch (m_actions.GetItemData(item)) { case 1: case 2: prompt=GetResString(IDS_SCHED_ENTERDATARATELIMIT)+_T(" (")+GetResString(IDS_KBYTESPERSEC)+_T(")"); break; default: prompt=GetResString(IDS_SCHED_ENTERVAL); } inputbox.SetLabels(GetResString(IDS_SCHED_ACTCONFIG),prompt,m_actions.GetItemText(item,1)); inputbox.DoModal(); CString res=inputbox.GetInput(); if (!inputbox.WasCancelled()) m_actions.SetItemText(item,1,res); } break; } case MP_CAT_REMOVE: { // remove if (item!=-1) { int ix=m_actions.GetSelectionMark(); if (ix!=-1) { m_actions.DeleteItem(ix); } } break; } } return CPropertyPage::OnCommand(wParam, lParam);}
开发者ID:LjApps,项目名称:eMule-VeryCD,代码行数:61,
示例14: GetResStringBOOL CHttpDownloadDlg::OnInitDialog() { CString cap; cap = GetResString(IDS_CANCEL); GetDlgItem(IDCANCEL)->SetWindowText(cap); if (!m_strTitle.IsEmpty()) SetWindowText(m_strTitle); //Let the parent class do its thing CDialog::OnInitDialog(); InitWindowStyles(this); //Setup the animation control m_ctrlAnimate.Open(IDR_HTTPDOWNLOAD_ANI); //Validate the URL ASSERT(m_sURLToDownload.GetLength()); //Did you forget to specify the file to download if (!AfxParseURL(m_sURLToDownload, m_dwServiceType, m_sServer, m_sObject, m_nPort)) { //Try sticking "http://" before it m_sURLToDownload = _T("http://") + m_sURLToDownload; if (!AfxParseURL(m_sURLToDownload, m_dwServiceType, m_sServer, m_sObject, m_nPort)) { TRACE(_T("Failed to parse the URL: %s/n"), m_sURLToDownload); EndDialog(IDCANCEL); return TRUE; } } //Check to see if the file we are downloading to exists and if //it does, then ask the user if they were it overwritten // edited: we always want to overwrite old language dlls and server.mets /*CFileStatus fs; ASSERT(m_sFileToDownloadInto.GetLength()); if (CFile::GetStatus(m_sFileToDownloadInto, fs)) { CString sMsg; sMsg.Format(GetResString(IDS_HTTPDOWNLOAD_OK_TO_OVERWRITE), m_sFileToDownloadInto); if (AfxMessageBox(sMsg, MB_YESNO) != IDYES) { TRACE(_T("Failed to confirm file overwrite, download aborted/n")); EndDialog(IDCANCEL); return TRUE; } }*/ //Try and open the file we will download into if (!m_FileToWrite.Open(m_sFileToDownloadInto, CFile::modeCreate | CFile::modeWrite | CFile::shareDenyWrite)) { TRACE(_T("Failed to open the file to download into, Error:%d/n"), GetLastError()); CString sError; sError.Format(_T("%d"), ::GetLastError()); CString sMsg; sMsg.Format(GetResString(IDS_HTTPDOWNLOAD_FAIL_FILE_OPEN), sError); AfxMessageBox(sMsg); EndDialog(IDCANCEL); return TRUE; } //Pull out just the filename component int nSlash = m_sObject.ReverseFind(_T('/')); if (nSlash == -1) nSlash = m_sObject.ReverseFind(_T('//')); if (nSlash != -1 && m_sObject.GetLength() > 1) m_sFilename = m_sObject.Right(m_sObject.GetLength() - nSlash - 1); else m_sFilename = m_sObject; //Set the file status text CString sFileStatus; ASSERT(m_sObject.GetLength()); ASSERT(m_sServer.GetLength()); sFileStatus.Format(GetResString(IDS_HTTPDOWNLOAD_FILESTATUS), m_sFilename, m_sServer); m_ctrlFileStatus.SetWindowText(sFileStatus); // set labels SetDlgItemText(IDC_TIMELEFTTEXT,GetResString(IDS_ESTTIMELEFT)); SetDlgItemText(IDC_TRANSFER_RATE_LABEL,GetResString(IDS_TRANSFER_RATE_LABEL)); //Spin off the background thread which will do the actual downloading m_pThread = AfxBeginThread(_DownloadThread, this, THREAD_PRIORITY_NORMAL, 0, CREATE_SUSPENDED); if (m_pThread == NULL) { TRACE(_T("Failed to create download thread, dialog is aborting/n")); EndDialog(IDCANCEL); return TRUE; } m_pThread->m_bAutoDelete = FALSE; m_pThread->ResumeThread(); return TRUE;}
开发者ID:litaobj,项目名称:easymule,代码行数:93,
示例15: dc//.........这里部分代码省略......... } else if (client->GetClientSoft() == SO_AMULE){ if(client->credits->GetScoreRatio(client->GetIP()) > 1) image = 12; else image = 11; } else if (client->GetClientSoft() == SO_LPHANT){ if(client->credits->GetScoreRatio(client->GetIP()) > 1) image = 14; else image = 13; } else if (client->ExtProtocolAvailable()){ if(client->credits->GetScoreRatio(client->GetIP()) > 1) image = 3; else image = 1; } else{ if (client->credits->GetScoreRatio(client->GetIP()) > 1) image = 2; else image = 0; } POINT point = {cur_rec.left, cur_rec.top+1}; imagelist.Draw(dc,image, point, ILD_NORMAL | ((client->Credits() && client->Credits()->GetCurrentIdentState(client->GetIP()) == IS_IDENTIFIED) ? INDEXTOOVERLAYMASK(1) : 0)); Sbuffer = client->GetUserName(); cur_rec.left += 20; dc.DrawText(Sbuffer, Sbuffer.GetLength(), &cur_rec, DLC_DT_TEXT); cur_rec.left -= 20; break; } case 1: if (file) Sbuffer = file->GetFileName(); else Sbuffer = _T("?"); break; case 2: Sbuffer = CastItoXBytes(client->GetDatarate(), false, true); break; case 3: // NOTE: If you change (add/remove) anything which is displayed here, update also the sorting part.. if (thePrefs.m_bExtControls) Sbuffer.Format( _T("%s (%s)"), CastItoXBytes(client->GetSessionUp(), false, false), CastItoXBytes(client->GetQueueSessionPayloadUp(), false, false)); else Sbuffer = CastItoXBytes(client->GetSessionUp(), false, false); break; case 4: if (client->HasLowID()) Sbuffer.Format(_T("%s (%s)"), CastSecondsToHM(client->GetWaitTime()/1000), GetResString(IDS_IDLOW)); else Sbuffer = CastSecondsToHM(client->GetWaitTime()/1000); break; case 5: Sbuffer = CastSecondsToHM(client->GetUpStartTimeDelay()/1000); break; case 6: Sbuffer = client->GetUploadStateDisplayString(); break; case 7: cur_rec.bottom--; cur_rec.top++; client->DrawUpStatusBar(dc, &cur_rec, false, thePrefs.UseFlatBar()); cur_rec.bottom++; cur_rec.top--; break; } if (iColumn != 7 && iColumn != 0) dc.DrawText(Sbuffer, Sbuffer.GetLength(), &cur_rec, DLC_DT_TEXT); cur_rec.left += GetColumnWidth(iColumn); } } //draw rectangle around selected item(s) if (lpDrawItemStruct->itemState & ODS_SELECTED) { RECT outline_rec = lpDrawItemStruct->rcItem; outline_rec.top--; outline_rec.bottom++; dc.FrameRect(&outline_rec, &CBrush(GetBkColor())); outline_rec.top++; outline_rec.bottom--; outline_rec.left++; outline_rec.right--; if (bCtrlFocused) dc.FrameRect(&outline_rec, &CBrush(m_crFocusLine)); else dc.FrameRect(&outline_rec, &CBrush(m_crNoFocusLine)); } if (m_crWindowTextBk == CLR_NONE) dc.SetBkMode(iOldBkMode); dc.SelectObject(pOldFont); dc.SetTextColor(crOldTextColor);}
开发者ID:machado2,项目名称:emule,代码行数:101,
示例16: ASSERTvoid CHttpDownloadDlg::DownloadThread(){ ENCODING_INIT; //Create the Internet session handle ASSERT(m_hInternetSession == NULL); m_hInternetSession = ::InternetOpen(AfxGetAppName(), INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0); if (m_hInternetSession == NULL) { TRACE(_T("Failed in call to InternetOpen, Error:%d/n"), ::GetLastError()); HandleThreadErrorWithLastError(GetResString(IDS_HTTPDOWNLOAD_GENERIC_ERROR)); return; } //Should we exit the thread if (m_bAbort) { PostMessage(WM_HTTPDOWNLOAD_THREAD_FINISHED); return; } //Setup the status callback function if (::InternetSetStatusCallback(m_hInternetSession, _OnStatusCallBack) == INTERNET_INVALID_STATUS_CALLBACK) { TRACE(_T("Failed in call to InternetSetStatusCallback, Error:%d/n"), ::GetLastError()); HandleThreadErrorWithLastError(GetResString(IDS_HTTPDOWNLOAD_GENERIC_ERROR)); return; } //Should we exit the thread if (m_bAbort) { PostMessage(WM_HTTPDOWNLOAD_THREAD_FINISHED); return; } //Make the connection to the HTTP server ASSERT(m_hHttpConnection == NULL); if (m_sUserName.GetLength()) // Elandal: Assumes sizeof(void*) == sizeof(unsigned long) m_hHttpConnection = ::InternetConnect(m_hInternetSession, m_sServer, m_nPort, m_sUserName, m_sPassword, m_dwServiceType, 0, (DWORD) this); else // Elandal: Assumes sizeof(void*) == sizeof(unsigned long) m_hHttpConnection = ::InternetConnect(m_hInternetSession, m_sServer, m_nPort, NULL, NULL, m_dwServiceType, 0, (DWORD) this); if (m_hHttpConnection == NULL) { TRACE(_T("Failed in call to InternetConnect, Error:%d/n"), ::GetLastError()); HandleThreadErrorWithLastError(GetResString(IDS_HTTPDOWNLOAD_FAIL_CONNECT_SERVER)); return; } //Should we exit the thread if (m_bAbort) { PostMessage(WM_HTTPDOWNLOAD_THREAD_FINISHED); return; } //Start the animation to signify that the download is taking place PlayAnimation(); //Issue the request to read the file LPCTSTR ppszAcceptTypes[2]; ppszAcceptTypes[0] = _T("*/*"); //We support accepting any mime file type since this is a simple download of a file ppszAcceptTypes[1] = NULL; ASSERT(m_hHttpFile == NULL); // Elandal: Assumes sizeof(void*) == sizeof(unsigned long) m_hHttpFile = HttpOpenRequest(m_hHttpConnection, NULL, m_sObject, NULL, NULL, ppszAcceptTypes, INTERNET_FLAG_RELOAD | INTERNET_FLAG_DONT_CACHE | INTERNET_FLAG_KEEP_CONNECTION, (DWORD)this); if (m_hHttpFile == NULL) { TRACE(_T("Failed in call to HttpOpenRequest, Error:%d/n"), ::GetLastError()); HandleThreadErrorWithLastError(GetResString(IDS_HTTPDOWNLOAD_FAIL_CONNECT_SERVER)); return; } //Should we exit the thread if (m_bAbort) { PostMessage(WM_HTTPDOWNLOAD_THREAD_FINISHED); return; } //fill in what encoding we support HttpAddRequestHeaders(m_hHttpFile, ACCEPT_ENCODING_HEADER, (DWORD)-1L, HTTP_ADDREQ_FLAG_ADD);//label used to jump to if we need to resend the requestresend: //Issue the request BOOL bSend = ::HttpSendRequest(m_hHttpFile, NULL, 0, NULL, 0); if (!bSend) { TRACE(_T("Failed in call to HttpSendRequest, Error:%d/n"), ::GetLastError()); HandleThreadErrorWithLastError(GetResString(IDS_HTTPDOWNLOAD_FAIL_CONNECT_SERVER)); return; } //Check the HTTP status code//.........这里部分代码省略.........
开发者ID:litaobj,项目名称:easymule,代码行数:101,
示例17: STATIC_DOWNCASTvoid CFileDetailDialogInfo::RefreshData(){ CString str; if (m_paFiles->GetSize() == 1) { CPartFile* file = STATIC_DOWNCAST(CPartFile, (*m_paFiles)[0]); // if file is completed, we output the 'file path' and not the 'part.met file path' if (file->GetStatus(true) == PS_COMPLETE) GetDlgItem(IDC_FD_X2)->SetWindowText(GetResString(IDS_DL_FILENAME)); SetDlgItemText(IDC_FNAME, file->GetFileName()); SetDlgItemText(IDC_METFILE, file->GetFullName()); SetDlgItemText(IDC_FHASH, md4str(file->GetFileHash())); if (file->GetTransferringSrcCount() > 0) str.Format(GetResString(IDS_PARTINFOS2), file->GetTransferringSrcCount()); else str = file->getPartfileStatus(); SetDlgItemText(IDC_PFSTATUS, str); str.Format(_T("%u; %s: %u (%.1f%%)"), file->GetPartCount(), GetResString(IDS_AVAILABLE) , file->GetAvailablePartCount(), (float)((file->GetAvailablePartCount()*100)/file->GetPartCount())); SetDlgItemText(IDC_PARTCOUNT, str); // date created if (file->GetCrFileDate() != 0) { str.Format(_T("%s ") + GetResString(IDS_TIMEBEFORE), file->GetCrCFileDate().Format(thePrefs.GetDateTimeFormat()), CastSecondsToLngHM(time(NULL) - file->GetCrFileDate())); } else str = GetResString(IDS_UNKNOWN); SetDlgItemText(IDC_FILECREATED, str); // active download time time_t nDlActiveTime = file->GetDlActiveTime(); //vs2005 if (nDlActiveTime) str = CastSecondsToLngHM(nDlActiveTime); else str = GetResString(IDS_UNKNOWN); SetDlgItemText(IDC_DL_ACTIVE_TIME, str); // last seen complete struct tm tmTemp; struct tm* ptimLastSeenComplete = file->lastseencomplete.GetLocalTm(&tmTemp); if (file->lastseencomplete == NULL || ptimLastSeenComplete == NULL) str.Format(GetResString(IDS_NEVER)); else { str.Format(_T("%s ") + GetResString(IDS_TIMEBEFORE), file->lastseencomplete.Format(thePrefs.GetDateTimeFormat()), CastSecondsToLngHM(time(NULL) - safe_mktime(ptimLastSeenComplete))); } SetDlgItemText(IDC_LASTSEENCOMPL, str); // last receive if (file->GetFileDate() != 0 && file->GetRealFileSize() > (uint64)0) { // 'Last Modified' sometimes is up to 2 seconds greater than the current time ??? // If it's related to the FAT32 seconds time resolution the max. failure should still be only 1 sec. // Happens at least on FAT32 with very high download speed. uint32 tLastModified = file->GetFileDate(); time_t tNow = time(NULL); //vs2005 uint32 tAgo; if (tNow >= tLastModified) tAgo = tNow - tLastModified; else{ TRACE("tNow = %s/n", CTime(tNow).Format("%X")); TRACE("tLMd = %s, +%u/n", CTime(tLastModified).Format("%X"), tLastModified - tNow); TRACE("/n"); tAgo = 0; } str.Format(_T("%s ") + GetResString(IDS_TIMEBEFORE), file->GetCFileDate().Format(thePrefs.GetDateTimeFormat()), CastSecondsToLngHM(tAgo)); } else str = GetResString(IDS_NEVER); SetDlgItemText(IDC_LASTRECEIVED, str); // AICH Hash switch (file->GetAICHRecoveryHashSet()->GetStatus()) { case AICH_TRUSTED: case AICH_VERIFIED: case AICH_HASHSETCOMPLETE: if (file->GetAICHRecoveryHashSet()->HasValidMasterHash()) { SetDlgItemText(IDC_FD_AICHHASH, file->GetAICHRecoveryHashSet()->GetMasterHash().GetString()); break; } default: SetDlgItemText(IDC_FD_AICHHASH, GetResString(IDS_UNKNOWN)); } // file type CString ext; bool showwarning = false; int pos = file->GetFileName().ReverseFind(_T('.')); if (file->GetFileName().ReverseFind(_T('//')) < pos) { ext = file->GetFileName().Mid(pos + 1); ext.MakeUpper();//.........这里部分代码省略.........
开发者ID:e1z0,项目名称:sMule,代码行数:101,
示例18: GetDlgItemvoid CPPgNe::LoadSettings(void){if(m_hWnd){ CString strBuffer; GetDlgItem(IDC_SHOWLEECHERBOX)->SetWindowText(GetResString(IDS_LEECHERBOX)); // [ionix] - LeecherBox //sivka aggressive client handling CheckDlgButton(IDC_CHECK_SIVKABAN, thePrefs.IsSivkaBan());//wert auslesen CheckDlgButton(IDC_CHECK_SIVKA_BANLOG, thePrefs.IsSivkaBanLog()); strBuffer.Format(_T("%u"), thePrefs.GetSivkaTimeCount()); //wir erstellen uns einen string GetDlgItem(IDC_EDIT_SIVKA_TIME)->SetWindowText(strBuffer);// edit box setzen strBuffer.Format(_T("%u"), thePrefs.GetSivkaAskCount()); GetDlgItem(IDC_EDIT_SIVKA_ASK)->SetWindowText(strBuffer); if(!thePrefs.IsSivkaBan()) { GetDlgItem(IDC_EDIT_SIVKA_TIME)->EnableWindow(false);//ausgrauen der felder GetDlgItem(IDC_EDIT_SIVKA_ASK)->EnableWindow(false); GetDlgItem(IDC_CHECK_SIVKA_BANLOG)->EnableWindow(false); } //sivka aggressive client handling //>>> WiZaRd - SP - AutoHL strBuffer.Format(_T("%d"), thePrefs.GetAutoHLUpdateTimer()); GetDlgItem(IDC_AutoHLUpdate)->SetWindowText(strBuffer); CheckDlgButton(IDC_AutoHL, thePrefs.IsUseAutoHL()); strBuffer.Format(_T("%d"), thePrefs.GetMinAutoHL()); GetDlgItem(IDC_MinAutoHL)->SetWindowText(strBuffer); strBuffer.Format(_T("%d"), thePrefs.GetMaxAutoHL()); GetDlgItem(IDC_MaxAutoHL)->SetWindowText(strBuffer); strBuffer.Format(_T("%d"), thePrefs.GetMaxSourcesHL()); GetDlgItem(IDC_MaxSourcesHL)->SetWindowText(strBuffer); //<<< WiZaRd - SP - AutoHL// >>> [Maella/sivka: -ReAsk SRCs after IP Change-] CheckDlgButton(IDC_REASKSRCAFTERIPCHANGE, thePrefs.bReAskSRCAfterIPChange); // <<< [Maella/sivka: -ReAsk SRCs after IP Change-] // [TPT] - quick start GetDlgItem(IDS_QUICK_START_MAX_CONN)->EnableWindow(thePrefs.GetQuickStart()); GetDlgItem(IDS_QUICK_START_MAX_CONN_PER_FIVE)->EnableWindow(thePrefs.GetQuickStart()); GetDlgItem(IDS_QUICK_START_MINUTES)->EnableWindow(thePrefs.GetQuickStart()); strBuffer.Format(_T("%d"), thePrefs.GetQuickStartMaxCon()); GetDlgItem(IDS_QUICK_START_MAX_CONN)->SetWindowText(strBuffer); strBuffer.Format(_T("%d"), thePrefs.GetQuickStartMaxConPerFive()); GetDlgItem(IDS_QUICK_START_MAX_CONN_PER_FIVE)->SetWindowText(strBuffer); strBuffer.Format(_T("%d"), thePrefs.GetQuickStartMinutes()); GetDlgItem(IDS_QUICK_START_MINUTES)->SetWindowText(strBuffer); CheckDlgButton(IDC_PPG_PHOENIX_QUICKSTART, thePrefs.GetQuickStart()); // [TPT] - quick start // [ionix] quickstart after ip change CheckDlgButton(IDC_QUICKSTARTAFTERIPCHANGE, thePrefs.GetQuickStartAfterIPChange()); // [ionix] quickstart after ip change// AntiNickThief GetDlgItem(IDC_IsClientBanTime)->EnableWindow(true); strBuffer.Format(_T("%d"), thePrefs.GetClientBanTime()); GetDlgItem(IDC_IsClientBanTime)->SetWindowText(strBuffer); CheckDlgButton(IDC_ANTINICKTHIEF, thePrefs.GetAntiNickThief()); // AntiNickThief // Anti Mod Faker Version CheckDlgButton(IDC_ANTIMODIDFAKER, thePrefs.IsAntiModIdFaker()); // Anti Mod Faker Version // AntiLeecher CheckDlgButton(IDC_ANTILEECHERMOD, thePrefs.IsLeecherSecure()); // AntiLeecher // LeecherSecureLog CheckDlgButton(IDC_LEECHERSECURELOG, thePrefs.IsLeecherSecureLog()); // LeecherSecureLog }}
开发者ID:BackupTheBerlios,项目名称:resurrection,代码行数:83,
示例19: GetDlgItemvoid CFileDetailDialogInfo::Localize(){ GetDlgItem(IDC_FD_X0)->SetWindowText(GetResString(IDS_FD_GENERAL)); GetDlgItem(IDC_FD_X1)->SetWindowText(GetResString(IDS_SW_NAME)+_T(':')); GetDlgItem(IDC_FD_X2)->SetWindowText(GetResString(IDS_FD_MET)); GetDlgItem(IDC_FD_X3)->SetWindowText(GetResString(IDS_FD_HASH)); GetDlgItem(IDC_FD_X4)->SetWindowText(GetResString(IDS_DL_SIZE)+_T(':')); GetDlgItem(IDC_FD_X9)->SetWindowText(GetResString(IDS_FD_PARTS)+_T(':')); GetDlgItem(IDC_FD_X5)->SetWindowText(GetResString(IDS_STATUS)+_T(':')); GetDlgItem(IDC_FD_X6)->SetWindowText(GetResString(IDS_FD_TRANSFER)); GetDlgItem(IDC_FD_X7)->SetWindowText(GetResString(IDS_DL_SOURCES)+_T(':')); GetDlgItem(IDC_FD_X14)->SetWindowText(GetResString(IDS_FD_TRANS)); GetDlgItem(IDC_FD_X12)->SetWindowText(GetResString(IDS_FD_COMPSIZE)); GetDlgItem(IDC_FD_X13)->SetWindowText(GetResString(IDS_FD_DATARATE)); GetDlgItem(IDC_FD_X15)->SetWindowText(GetResString(IDS_LASTSEENCOMPL)); GetDlgItem(IDC_FD_LASTCHANGE)->SetWindowText(GetResString(IDS_FD_LASTCHANGE)); GetDlgItem(IDC_FD_X8)->SetWindowText(GetResString(IDS_FD_TIMEDATE)); GetDlgItem(IDC_FD_X16)->SetWindowText(GetResString(IDS_FD_DOWNLOADSTARTED)); GetDlgItem(IDC_DL_ACTIVE_TIME_LBL)->SetWindowText(GetResString(IDS_DL_ACTIVE_TIME)+_T(':')); GetDlgItem(IDC_HSAV)->SetWindowText(GetResString(IDS_HSAV)+_T(':')); GetDlgItem(IDC_FD_CORR)->SetWindowText(GetResString(IDS_FD_CORR)+_T(':')); GetDlgItem(IDC_FD_RECOV)->SetWindowText(GetResString(IDS_FD_RECOV)+_T(':')); GetDlgItem(IDC_FD_COMPR)->SetWindowText(GetResString(IDS_FD_COMPR)+_T(':')); GetDlgItem(IDC_FD_XAICH)->SetWindowText(GetResString(IDS_AICHHASH)+_T(':')); SetDlgItemText(IDC_REMAINING_TEXT, GetResString(IDS_DL_REMAINS)+_T(':')); SetDlgItemText(IDC_FD_X10, GetResString(IDS_TYPE)+_T(':') );}
开发者ID:e1z0,项目名称:sMule,代码行数:27,
示例20: GetHeaderCtrlvoid CQueueListCtrl::Localize(){ CHeaderCtrl *pHeaderCtrl = GetHeaderCtrl(); HDITEM hdi; hdi.mask = HDI_TEXT; CString strRes; strRes = GetResString(IDS_QL_USERNAME); hdi.pszText = const_cast<LPTSTR>((LPCTSTR)strRes); pHeaderCtrl->SetItem(0, &hdi); strRes = GetResString(IDS_FILE); hdi.pszText = const_cast<LPTSTR>((LPCTSTR)strRes); pHeaderCtrl->SetItem(1, &hdi); strRes = GetResString(IDS_FILEPRIO); hdi.pszText = const_cast<LPTSTR>((LPCTSTR)strRes); pHeaderCtrl->SetItem(2, &hdi); strRes = GetResString(IDS_QL_RATING); hdi.pszText = const_cast<LPTSTR>((LPCTSTR)strRes); pHeaderCtrl->SetItem(3, &hdi); strRes = GetResString(IDS_SCORE); hdi.pszText = const_cast<LPTSTR>((LPCTSTR)strRes); pHeaderCtrl->SetItem(4, &hdi); strRes = GetResString(IDS_ASKED); hdi.pszText = const_cast<LPTSTR>((LPCTSTR)strRes); pHeaderCtrl->SetItem(5, &hdi); strRes = GetResString(IDS_LASTSEEN); hdi.pszText = const_cast<LPTSTR>((LPCTSTR)strRes); pHeaderCtrl->SetItem(6, &hdi); strRes = GetResString(IDS_ENTERQUEUE); hdi.pszText = const_cast<LPTSTR>((LPCTSTR)strRes); pHeaderCtrl->SetItem(7, &hdi); strRes = GetResString(IDS_BANNED); hdi.pszText = const_cast<LPTSTR>((LPCTSTR)strRes); pHeaderCtrl->SetItem(8, &hdi); strRes = GetResString(IDS_UPSTATUS); hdi.pszText = const_cast<LPTSTR>((LPCTSTR)strRes); pHeaderCtrl->SetItem(9, &hdi); //Xman version see clientversion in every window strRes = GetResString(IDS_CD_CSOFT); hdi.pszText = const_cast<LPTSTR>((LPCTSTR)strRes); pHeaderCtrl->SetItem(10, &hdi); //Xman end //Xman show complete up/down in queuelist strRes = GetResString(IDS_UPDOWNUPLOADLIST); hdi.pszText = const_cast<LPTSTR>((LPCTSTR)strRes); pHeaderCtrl->SetItem(11, &hdi); //Xman end // ==> push small files [sivka] - Stulle strRes = GetResString(IDS_SMALL); hdi.pszText = const_cast<LPTSTR>((LPCTSTR)strRes); pHeaderCtrl->SetItem(12, &hdi); // <== push small files [sivka] - Stulle // ==> push rare file - Stulle strRes = GetResString(IDS_RARE); hdi.pszText = const_cast<LPTSTR>((LPCTSTR)strRes); pHeaderCtrl->SetItem(13, &hdi); // <== push rare file - Stulle // ==> Design Settings [eWombat/Stulle] - Stulle theApp.emuledlg->transferwnd->SetBackgroundColor(style_b_queuelist); // <== Design Settings [eWombat/Stulle] - Stulle}
开发者ID:rusingineer,项目名称:eMule-mephisto-mod,代码行数:75,
示例21: GetTickCount//.........这里部分代码省略......... // add a filter if (bValid) { AddIPRange(start, end, level, desc); iFoundRanges++; } else { sbuffer.Trim(" /t/r/n"); DEBUG_ONLY( (!sbuffer.IsEmpty()) ? TRACE("IP filter: ignored line %u/n", iLine) : 0 ); } } } fclose(readFile); // sort the IP filter list by IP range start addresses qsort(m_iplist.GetData(), m_iplist.GetCount(), sizeof(m_iplist[0]), CmpSIPFilterByStartAddr); // merge overlapping and adjacent filter ranges int iDuplicate = 0; int iMerged = 0; if (m_iplist.GetCount() >= 2) { // On large IP-filter lists there is a noticeable performance problem when merging the list. // The 'CIPFilterArray::RemoveAt' call is way too expensive to get called during the merging, // thus we use temporary helper arrays to copy only the entries into the final list which // are not get deleted. // Reserve a byte array (its used as a boolean array actually) as large as the current // IP-filter list, so we can set a 'to delete' flag for each entry in the current IP-filter list. char* pcToDelete = new char[m_iplist.GetCount()]; memset(pcToDelete, 0, m_iplist.GetCount()); int iNumToDelete = 0; SIPFilter* pPrv = m_iplist[0]; int i = 1; while (i < m_iplist.GetCount()) { SIPFilter* pCur = m_iplist[i]; if ( pCur->start >= pPrv->start && pCur->start <= pPrv->end // overlapping || pCur->start == pPrv->end+1 && pCur->level == pPrv->level) // adjacent { if (pCur->start != pPrv->start || pCur->end != pPrv->end) // don't merge identical entries { //TODO: not yet handled, overlapping entries with different 'level' if (pCur->end > pPrv->end) pPrv->end = pCur->end; //pPrv->desc += _T("; ") + pCur->desc; // this may create a very very long description string... iMerged++; } else { // if we have identical entries, use the lowest 'level' if (pCur->level < pPrv->level) pPrv->level = pCur->level; iDuplicate++; } delete pCur; //m_iplist.RemoveAt(i); // way too expensive (read above) pcToDelete[i] = 1; // mark this entry as 'to delete' iNumToDelete++; i++; continue; } pPrv = pCur; i++; } // Create new IP-filter list which contains only the entries from the original IP-filter list // which are not to be deleted. if (iNumToDelete > 0) { CIPFilterArray newList; newList.SetSize(m_iplist.GetCount() - iNumToDelete); int iNewListIndex = 0; for (int i = 0; i < m_iplist.GetCount(); i++) { if (!pcToDelete[i]) newList[iNewListIndex++] = m_iplist[i]; } ASSERT( iNewListIndex == newList.GetSize() ); // Replace current list with new list. Dump, but still fast enough (only 1 memcpy) m_iplist.RemoveAll(); m_iplist.Append(newList); newList.RemoveAll(); m_bModified = true; } delete[] pcToDelete; } if (thePrefs.GetVerbose()) { DWORD dwEnd = GetTickCount(); AddDebugLogLine(false, _T("Loaded IP filters from /"%s/""), pszFilePath); AddDebugLogLine(false, _T("Parsed lines/entries:%u Found IP ranges:%u Duplicate:%u Merged:%u Time:%s"), iLine, iFoundRanges, iDuplicate, iMerged, CastSecondsToHM((dwEnd-dwStart+500)/1000)); } AddLogLine(bShowResponse, GetResString(IDS_IPFILTERLOADED), m_iplist.GetCount()); } return m_iplist.GetCount();}
开发者ID:LjApps,项目名称:eMule-VeryCD,代码行数:101,
示例22: SetPrefsKeyvoid 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));}
开发者ID:rusingineer,项目名称:eMule-mephisto-mod,代码行数:41,
示例23: SetWindowTextvoid CPPgDisplay::Localize(void){ if(m_hWnd) { SetWindowText(GetResString(IDS_PW_DISPLAY)); GetDlgItem(IDC_MINTRAY)->SetWindowText(GetResString(IDS_PW_TRAY)); GetDlgItem(IDC_DBLCLICK)->SetWindowText(GetResString(IDS_PW_DBLCLICK)); GetDlgItem(IDC_TOOLTIPDELAY_LBL)->SetWindowText(GetResString(IDS_PW_TOOL)); GetDlgItem(IDC_3DDEP)->SetWindowText(GetResString(IDS_3DDEP)); GetDlgItem(IDC_FLAT)->SetWindowText(GetResString(IDS_FLAT)); GetDlgItem(IDC_ROUND)->SetWindowText(GetResString(IDS_ROUND)); GetDlgItem(IDC_UPDATEQUEUE)->SetWindowText(GetResString(IDS_UPDATEQUEUE)); GetDlgItem(IDC_SHOWRATEONTITLE)->SetWindowText(GetResString(IDS_SHOWRATEONTITLE)); GetDlgItem(IDC_DISABLEKNOWNLIST)->SetWindowText(GetResString(IDS_DISABLEKNOWNLIST)); GetDlgItem(IDC_DISABLEQUEUELIST)->SetWindowText(GetResString(IDS_DISABLEQUEUELIST)); GetDlgItem(IDC_STATIC_CPUMEM)->SetWindowText(GetResString(IDS_STATIC_CPUMEM)); GetDlgItem(IDC_SHOWCATINFO)->SetWindowText(GetResString(IDS_SHOWCATINFO)); GetDlgItem(IDC_REPAINT)->SetWindowText(GetResString(IDS_REPAINTGRAPHS)); SetDlgItemText(IDC_HYPERTEXT_FONT_HINT, GetResString(IDS_HYPERTEXT_FONT_HINT)); SetDlgItemText(IDC_SELECT_HYPERTEXT_FONT, GetResString(IDS_SELECT_FONT) + _T("...")); SetDlgItemText(IDC_SHOWDWLPERCENT, GetResString(IDS_SHOWDWLPERCENTAGE)); GetDlgItem(IDC_CLEARCOMPL)->SetWindowText(GetResString(IDS_AUTOREMOVEFD)); GetDlgItem(IDC_STORESEARCHES)->SetWindowText(GetResString(IDS_STORESEARCHES)); GetDlgItem(IDC_RESETLABEL)->SetWindowText(GetResString(IDS_RESETLABEL)); GetDlgItem(IDC_RESETHIST)->SetWindowText(GetResString(IDS_PW_RESET)); GetDlgItem(IDC_DISABLEHIST)->SetWindowText(GetResString(IDS_ENABLED)); GetDlgItem(IDC_SHOWTRANSTOOLBAR)->SetWindowText(GetResString(IDS_PW_SHOWTRANSTOOLBAR)); }}
开发者ID:acat,项目名称:emule,代码行数:31,
示例24: GetHeaderCtrlvoid CQueueListCtrl::Localize(){ CHeaderCtrl* pHeaderCtrl = GetHeaderCtrl(); HDITEM hdi; hdi.mask = HDI_TEXT; if(pHeaderCtrl->GetItemCount() != 0) { CString strRes; strRes = GetResString(IDS_QL_USERNAME); hdi.pszText = strRes.GetBuffer(); pHeaderCtrl->SetItem(0, &hdi); strRes.ReleaseBuffer(); strRes = GetResString(IDS_FILE); hdi.pszText = strRes.GetBuffer(); pHeaderCtrl->SetItem(1, &hdi); strRes.ReleaseBuffer(); strRes = GetResString(IDS_FILEPRIO); hdi.pszText = strRes.GetBuffer(); pHeaderCtrl->SetItem(2, &hdi); strRes.ReleaseBuffer(); strRes = GetResString(IDS_QL_RATING); hdi.pszText = strRes.GetBuffer(); pHeaderCtrl->SetItem(3, &hdi); strRes.ReleaseBuffer(); strRes = GetResString(IDS_SCORE); hdi.pszText = strRes.GetBuffer(); pHeaderCtrl->SetItem(4, &hdi); strRes.ReleaseBuffer(); strRes = GetResString(IDS_ASKED); hdi.pszText = strRes.GetBuffer(); pHeaderCtrl->SetItem(5, &hdi); strRes.ReleaseBuffer(); strRes = GetResString(IDS_LASTSEEN); hdi.pszText = strRes.GetBuffer(); pHeaderCtrl->SetItem(6, &hdi); strRes.ReleaseBuffer(); strRes = GetResString(IDS_ENTERQUEUE); hdi.pszText = strRes.GetBuffer(); pHeaderCtrl->SetItem(7, &hdi); strRes.ReleaseBuffer(); strRes = GetResString(IDS_BANNED); hdi.pszText = strRes.GetBuffer(); pHeaderCtrl->SetItem(8, &hdi); strRes.ReleaseBuffer(); strRes = GetResString(IDS_UPSTATUS); hdi.pszText = strRes.GetBuffer(); pHeaderCtrl->SetItem(9, &hdi); strRes.ReleaseBuffer();//==>Modversion [shadow2004]#ifdef MODVERSION strRes = GetResString(IDS_CLIENTSOFTWARE); hdi.pszText = strRes.GetBuffer(); pHeaderCtrl->SetItem(10, &hdi); strRes.ReleaseBuffer();#endif //Modversion//<==Modversion [shadow2004] }}
开发者ID:BackupTheBerlios,项目名称:nextemf,代码行数:68,
示例25: GetWaitingUserCount/** * Add a client to the waiting queue for uploads. * * @param client address of the client that should be added to the waiting queue * * @param bIgnoreTimelimit don't check time limit to possibly ban the client. */void CUploadQueue::AddClientToQueue(CUpDownClient* client, bool bIgnoreTimelimit){ //This is to keep users from abusing the limits we put on lowID callbacks. //1)Check if we are connected to any network and that we are a lowID. //(Although this check shouldn't matter as they wouldn't have found us.. // But, maybe I'm missing something, so it's best to check as a precaution.) //2)Check if the user is connected to Kad. We do allow all Kad Callbacks. //3)Check if the user is in our download list or a friend.. //We give these users a special pass as they are helping us.. //4)Are we connected to a server? If we are, is the user on the same server? //TCP lowID callbacks are also allowed.. //5)If the queue is very short, allow anyone in as we want to make sure //our upload is always used. if (theApp.IsConnected() && theApp.IsFirewalled() && !client->GetKadPort() && client->GetDownloadState() == DS_NONE && !client->IsFriend() && theApp.serverconnect && !theApp.serverconnect->IsLocalServer(client->GetServerIP(),client->GetServerPort()) && GetWaitingUserCount() > 50) return; client->AddAskedCount(); client->SetLastUpRequest(); if (!bIgnoreTimelimit) client->AddRequestCount(client->GetUploadFileID()); if (client->IsBanned()) return; uint16 cSameIP = 0; // check for double POSITION pos1, pos2; for (pos1 = waitinglist.GetHeadPosition();( pos2 = pos1 ) != NULL;) { waitinglist.GetNext(pos1); CUpDownClient* cur_client= waitinglist.GetAt(pos2); if (cur_client == client) { if (client->m_bAddNextConnect && AcceptNewClient(client->m_bAddNextConnect)) { //Special care is given to lowID clients that missed their upload slot //due to the saving bandwidth on callbacks. if(thePrefs.GetLogUlDlEvents()) AddDebugLogLine(true, _T("Adding ****lowid when reconnecting. Client: %s"), client->DbgGetClientInfo()); client->m_bAddNextConnect = false; RemoveFromWaitingQueue(client, true); // statistic values // TODO: Maybe we should change this to count each request for a file only once and ignore reasks CKnownFile* reqfile = theApp.sharedfiles->GetFileByID((uchar*)client->GetUploadFileID()); if (reqfile) reqfile->statistic.AddRequest(); AddUpNextClient(_T("Adding ****lowid when reconnecting."), client); return; } client->SendRankingInfo(); theApp.emuledlg->transferwnd->queuelistctrl.RefreshClient(client); return; } else if ( client->Compare(cur_client) ) { theApp.clientlist->AddTrackClient(client); // in any case keep track of this client // another client with same ip:port or hash // this happens only in rare cases, because same userhash / ip:ports are assigned to the right client on connecting in most cases if (cur_client->credits != NULL && cur_client->credits->GetCurrentIdentState(cur_client->GetIP()) == IS_IDENTIFIED) { //cur_client has a valid secure hash, don't remove him if (thePrefs.GetVerbose()) AddDebugLogLine(false, GetResString(IDS_SAMEUSERHASH), client->GetUserName(), cur_client->GetUserName(), client->GetUserName()); return; } if (client->credits != NULL && client->credits->GetCurrentIdentState(client->GetIP()) == IS_IDENTIFIED) { //client has a valid secure hash, add him remove other one if (thePrefs.GetVerbose()) AddDebugLogLine(false, GetResString(IDS_SAMEUSERHASH), client->GetUserName(), cur_client->GetUserName(), cur_client->GetUserName()); RemoveFromWaitingQueue(pos2,true); if (!cur_client->socket) { if(cur_client->Disconnected(_T("AddClientToQueue - same userhash 1"))) delete cur_client; } } else { // remove both since we do not know who the bad one is if (thePrefs.GetVerbose()) AddDebugLogLine(false, GetResString(IDS_SAMEUSERHASH), client->GetUserName() ,cur_client->GetUserName(), _T("Both")); RemoveFromWaitingQueue(pos2,true); if (!cur_client->socket) { if(cur_client->Disconnected(_T("AddClientToQueue - same userhash 2"))) delete cur_client; } return;//.........这里部分代码省略.........
开发者ID:dalinhuang,项目名称:dmibox,代码行数:101,
示例26: SetNamevoid 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));}
开发者ID:BackupTheBerlios,项目名称:nextemf,代码行数:33,
示例27: SetWindowTextvoid CPPgFiles::Localize(void){ if (m_hWnd) { SetWindowText(GetResString(IDS_PW_FILES)); //GetDlgItem(IDC_PF_TIMECALC)->SetWindowText(GetResString(IDS_PF_ADVANCEDCALC)); //GetDlgItem(IDC_UAP)->SetWindowText(GetResString(IDS_PW_UAP)); //GetDlgItem(IDC_DAP)->SetWindowText(GetResString(IDS_PW_DAP)); //GetDlgItem(IDC_PREVIEWPRIO)->SetWindowText(GetResString(IDS_DOWNLOADMOVIECHUNKS)); GetDlgItem(IDC_ADDNEWFILESPAUSED)->SetWindowText(GetResString(IDS_ADDNEWFILESPAUSED)); GetDlgItem(IDC_WATCHCB)->SetWindowText(GetResString(IDS_PF_WATCHCB)); GetDlgItem(IDC_WATCHCB_URL)->SetWindowText(GetResString(IDS_PF_WATCHCB_URL)); //GetDlgItem(IDC_FULLCHUNKTRANS)->SetWindowText(GetResString(IDS_FULLCHUNKTRANS)); GetDlgItem(IDC_STARTNEXTFILE)->SetWindowText(GetResString(IDS_STARTNEXTFILE)); //GetDlgItem(IDC_STARTNEXTFILECAT)->SetWindowText(GetResString(IDS_PREF_STARTNEXTFILECAT)); //GetDlgItem(IDC_STARTNEXTFILECAT2)->SetWindowText(GetResString(IDS_PREF_STARTNEXTFILECATONLY)); //GetDlgItem(IDC_FNC)->SetWindowText(GetResString(IDS_EDIT)); GetDlgItem(IDC_ONND)->SetWindowText(GetResString(IDS_ONNEWDOWNLOAD)); //GetDlgItem(IDC_FNCLEANUP)->SetWindowText(GetResString(IDS_AUTOCLEANUPFN)); GetDlgItem(IDC_STATICVIDEOPLAYER)->SetWindowText(GetResString(IDS_PW_VIDEOPLAYER)); GetDlgItem(IDC_VIDEOPLAYER_CMD_LBL)->SetWindowText(GetResString(IDS_COMMAND)); GetDlgItem(IDC_VIDEOPLAYER_ARGS_LBL)->SetWindowText(GetResString(IDS_ARGUMENTS)); GetDlgItem(IDC_VIDEOBACKUP)->SetWindowText(GetResString(IDS_VIDEOBACKUP)); GetDlgItem(IDC_BROWSEV)->SetWindowText(GetResString(IDS_PW_BROWSE)); //GetDlgItem(IDC_REMEMBERDOWNLOADED)->SetWindowText(GetResString(IDS_PW_REMEMBERDOWNLOADED)); //GetDlgItem(IDC_REMEMBERCANCELLED)->SetWindowText(GetResString(IDS_PW_REMEMBERCANCELLED)); GetDlgItem(IDC_IE_MENU)->SetWindowText(GetResString(IDS_IE_MENU)); GetDlgItem(IDC_MONITOR)->SetWindowText(GetResString(IDS_LABEL_MONITOR)); GetDlgItem(IDC_MONITOR_LINK)->SetWindowText(GetResString(IDS_MONITOR_LINK)); GetDlgItem(IDC_MONITOR_ED2K)->SetWindowText(GetResString(IDS_MONITOR_ED2K)); m_ttc.UpdateTipText(GetResString(IDS_TIP_ADDFILE_INPAUSE), GetDlgItem(IDC_ADDNEWFILESPAUSED)); m_ttc.UpdateTipText(GetResString(IDS_TIP_VIEDO_PLAYER), GetDlgItem(IDC_VIDEOPLAYER)); }}
开发者ID:kevinzhwl,项目名称:easyMuleVeryCD,代码行数:37,
示例28: dc//.........这里部分代码省略.........//<== Xman CreditSystem [shadow2004] image = 2; else image = 0; } } else image = 0; POINT point = {cur_rec.left, cur_rec.top+1}; m_ImageList.Draw(dc,image, point, ILD_NORMAL | ((client->Credits() && client->Credits()->GetCurrentIdentState(client->GetIP()) == IS_IDENTIFIED) ? INDEXTOOVERLAYMASK(1) : 0)); Sbuffer = client->GetUserName(); cur_rec.left +=20; dc.DrawText(Sbuffer,Sbuffer.GetLength(),&cur_rec,DLC_DT_TEXT); cur_rec.left -=20; break; } case 1: Sbuffer.Format(_T("%s"), client->GetClientSoftVer()); break; case 2: Sbuffer.Format(_T("%s"), client->GetRequestFile()->GetFileName()); break; case 3: Sbuffer=CastItoXBytes( (float)client->GetDownloadDatarate() , false, true); dc.DrawText(Sbuffer,Sbuffer.GetLength(),&cur_rec, DLC_DT_TEXT | DT_RIGHT); break; case 4: cur_rec.bottom--; cur_rec.top++; client->DrawStatusBar(dc, &cur_rec, false); cur_rec.bottom++; cur_rec.top--; break; case 5: if(client->Credits() && client->GetSessionDown() < client->credits->GetDownloadedTotal()) Sbuffer.Format(_T("%s (%s)"), CastItoXBytes(client->GetSessionDown()), CastItoXBytes(client->credits->GetDownloadedTotal())); else Sbuffer.Format(_T("%s"), CastItoXBytes(client->GetSessionDown())); break; case 6: if(client->Credits() && client->GetSessionUp() < client->credits->GetUploadedTotal()) Sbuffer.Format(_T("%s (%s)"), CastItoXBytes(client->GetSessionUp()), CastItoXBytes(client->credits->GetUploadedTotal())); else Sbuffer.Format(_T("%s"), CastItoXBytes(client->GetSessionUp())); break; case 7: switch(client->GetSourceFrom()){ case SF_SERVER: Sbuffer = _T("eD2K Server"); break; case SF_KADEMLIA: Sbuffer = GetResString(IDS_KADEMLIA); break; case SF_SOURCE_EXCHANGE: Sbuffer = GetResString(IDS_SE); break; case SF_PASSIVE: Sbuffer = GetResString(IDS_PASSIVE); break; case SF_LINK: Sbuffer = GetResString(IDS_SW_LINK); break; default: Sbuffer = GetResString(IDS_UNKNOWN); break; } break; } if( iColumn != 4 && iColumn != 0 && iColumn != 3 && iColumn != 11) dc.DrawText(Sbuffer,Sbuffer.GetLength(),&cur_rec,DLC_DT_TEXT); cur_rec.left += GetColumnWidth(iColumn); } } //draw rectangle around selected item(s) if (lpDrawItemStruct->itemState & ODS_SELECTED) { RECT outline_rec = lpDrawItemStruct->rcItem; outline_rec.top--; outline_rec.bottom++; dc.FrameRect(&outline_rec, &CBrush(GetBkColor())); outline_rec.top++; outline_rec.bottom--; outline_rec.left++; outline_rec.right--; if (bCtrlFocused) dc.FrameRect(&outline_rec, &CBrush(m_crFocusLine)); else dc.FrameRect(&outline_rec, &CBrush(m_crNoFocusLine)); } if (m_crWindowTextBk == CLR_NONE) dc.SetBkMode(iOldBkMode); dc.SelectObject(pOldFont); dc.SetTextColor(crOldTextColor);}
开发者ID:BackupTheBerlios,项目名称:nextemf,代码行数:101,
示例29: switchCString CPPgScheduler::GetDayLabel(int index) { switch (index) { case DAY_DAYLY : return GetResString(IDS_DAYLY); case DAY_MO : return GetResString(IDS_MO); case DAY_DI : return GetResString(IDS_DI); case DAY_MI : return GetResString(IDS_MI); case DAY_DO : return GetResString(IDS_DO); case DAY_FR : return GetResString(IDS_FR); case DAY_SA : return GetResString(IDS_SA); case DAY_SO : return GetResString(IDS_SO); case DAY_MO_FR : return GetResString(IDS_DAY_MO_FR); case DAY_MO_SA : return GetResString(IDS_DAY_MO_SA); case DAY_SA_SO : return GetResString(IDS_DAY_SA_SO); } return NULL;}
开发者ID:LjApps,项目名称:eMule-VeryCD,代码行数:16,
注:本文中的GetResString函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetResetTimeFor函数代码示例 C++ GetResID函数代码示例 |