当前位置: 首页>>代码示例>>C++>>正文


C++ CString::MakeLower方法代码示例

本文整理汇总了C++中CString::MakeLower方法的典型用法代码示例。如果您正苦于以下问题:C++ CString::MakeLower方法的具体用法?C++ CString::MakeLower怎么用?C++ CString::MakeLower使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CString的用法示例。


在下文中一共展示了CString::MakeLower方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: AddVirtKeyStr

//******************************************************************
void CBCGPKeyHelper::AddVirtKeyStr (CString& str, UINT uiVirtKey, BOOL bLast) const
{
	CString strKey;

	if (uiVirtKey == VK_PAUSE)
	{
		strKey = _T("Pause");
	}
	else
	{
		#define BUFFER_LEN 50
		TCHAR szBuffer [BUFFER_LEN + 1];

		ZeroMemory (szBuffer, sizeof (szBuffer));
		
		UINT nScanCode = ::MapVirtualKeyEx (uiVirtKey, 0, 
					::GetKeyboardLayout (0)) <<16 | 0x1;

		if (uiVirtKey >= VK_PRIOR && uiVirtKey <= VK_HELP)
		{
			nScanCode |= 0x01000000;
		}
		
		::GetKeyNameText (nScanCode, szBuffer, BUFFER_LEN);

		strKey = szBuffer;
	}
	
	strKey.MakeLower();

	//--------------------------------------
	// The first letter should be uppercase:
	//--------------------------------------
	for (int nCount = 0; nCount < strKey.GetLength(); nCount++)
	{
		TCHAR c = strKey[nCount];
		if (IsCharLower (c))
		{
			c = (TCHAR) toupper (c); // Convert single character JY 4-Dec-99
			strKey.SetAt (nCount, c);
			break;
		}
	}

	str += strKey;
	
	if (!bLast)
	{
		str += '+';
	}
}
开发者ID:iclosure,项目名称:jframework,代码行数:52,代码来源:BCGPKeyHelper.cpp

示例2: WizTodoDataArrayRemoveMultiItem

BOOL WIZTODODATAEX::WizTodoDataArrayRemoveMultiItem(WIZTODODATAEX::CWizTodoDataExArray& arrayData)
{
    BOOL bCombined = FALSE;
    //
    std::deque<int> arrayMultiIndex;
    //
    std::map<CString, int> mapTextAndIndex;
    for (WIZTODODATAEX::CWizTodoDataExArray::iterator it = arrayData.begin();
    it != arrayData.end();
    it++)
    {
        WIZTODODATAEX& dataCurr = *it;
        int nIndex = (int)(it - arrayData.begin());
        //
        CString strText = it->strText;
        strText.MakeLower();
        //
        std::map<CString, int>::const_iterator itMap = mapTextAndIndex.find(strText);
        if (itMap == mapTextAndIndex.end())
        {
            mapTextAndIndex[strText] = nIndex;
            //
            if (!dataCurr.arrayChild.empty())
            {
                bCombined = WizTodoDataArrayRemoveMultiItem(dataCurr.arrayChild);
            }
        }
        else
        {
            WIZTODODATAEX& dataDest = arrayData[itMap->second];
            WIZTODODATAEX::WizTodoDataItemCopyAndCombine(dataDest, dataCurr);
            //
            arrayMultiIndex.push_back(nIndex);
            //
            bCombined = TRUE;
        }
    }
    //
    if (arrayMultiIndex.empty())
        return bCombined;
    //
    size_t nMultiIndexCount = arrayMultiIndex.size();
    for (intptr_t i = nMultiIndexCount - 1; i >= 0; i--)
    {
        int nIndex = arrayMultiIndex[i];
        //
        arrayData.erase(arrayData.begin() + nIndex);
    }
    //
    return TRUE;
}
开发者ID:a781947241,项目名称:WizQTClient,代码行数:51,代码来源:wizobject.cpp

示例3: OnOK

void CAddGroupDlg::OnOK() 
{
	UpdateData(TRUE);

	if(m_strGroupName.GetLength() == 0)
	{
		MessageBox(TRL("Enter a group name!"), PWM_PRODUCT_NAME_SHORT, MB_ICONWARNING | MB_OK);
		return;
	}

	CString strId = m_strGroupName;
	strId = strId.MakeLower();

	CString strSearch = PWS_SEARCHGROUP; // PWS_SEARCHGROUP is translated
	strSearch = strSearch.MakeLower();
	CString strBackup1 = PWS_BACKUPGROUP;
	strBackup1 = strBackup1.MakeLower();
	CString strBackup2 = PWS_BACKUPGROUP_SRC;
	strBackup2 = strBackup2.MakeLower();

	if(m_strGroupName == m_strInitialName) { } // Always allow unchanged
	else if(strId == strSearch)
	{
		MessageBox(TRL("The group you selected cannot store entries. Please select a different group."),
			PWM_PRODUCT_NAME_SHORT, MB_ICONWARNING | MB_OK);
		return;
	}
	else if((strId == strBackup1) || (strId == strBackup2))
	{
		CString strResMsg = TRL("The specified name is reserved.");
		strResMsg += _T("\r\n\r\n");
		strResMsg += TRL("Please choose a different name.");
		MessageBox(strResMsg, PWM_PRODUCT_NAME_SHORT, MB_ICONWARNING | MB_OK);
		return;
	}

	CDialog::OnOK();
}
开发者ID:xt9852,项目名称:KeePassXT,代码行数:38,代码来源:AddGroupDlg.cpp

示例4: ResultFind

CString CFilesHashDlg::ResultFind(CString strFile, CString strHash)
{
	CString strResult(MAINDLG_FIND_IN_RESULT);
	strResult.Append(_T("\r\n"));
	strResult.Append(HASHVALUE_STRING);
	strResult.Append(_T(" "));
	strResult.Append(strHash);
	strResult.Append(_T("\r\n\r\n"));
	strResult.Append(MAINDLG_RESULT);
	strResult.Append(_T("\r\n\r\n"));

	strHash.MakeUpper();
	strFile.MakeLower();

	size_t count = 0;
	CString strPathLower;
	ResultList::iterator itr = m_thrdData.resultList.begin();
	for(; itr != m_thrdData.resultList.end(); ++itr)
	{
		strPathLower = itr->strPath;
		strPathLower.MakeLower();
		if(strPathLower.Find(strFile) >= 0 && 
			(itr->strMD5.Find(strHash) >= 0 ||
			itr->strSHA1.Find(strHash) >= 0 ||
			itr->strSHA256.Find(strHash) >= 0 ||
			itr->strCRC32.Find(strHash) >= 0 ))
		{
			++count;

			AppendResult(*itr, strResult);
		}
	}

	if(count == 0)
		strResult.Append(MAINDLG_NORESULT);

	return strResult;
}
开发者ID:Koogoo,项目名称:fhash,代码行数:38,代码来源:FilesHashDlg.cpp

示例5: GetImageHost

bool CPhotoManager::GetImageHost(CString& szImageHost) 
{
	CString szTemp = m_strHost;
	szTemp.MakeLower();

	if (szTemp.Find(_T("//dev")) >= 0)
		szImageHost.Replace(_T("//www"), _T("//dev"));
	else if (szTemp.Find(_T("//work")) >= 0)
		szImageHost.Replace(_T("//www"), _T("//work"));
	else if (szTemp.Find(_T("//stage")) >= 0)
		szImageHost.Replace(_T("//www"), _T("//stage"));

	return true;
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:14,代码来源:PhotoManager.cpp

示例6: put_TangramTreeViewCallBack

STDMETHODIMP CTangramTreeView::put_TangramTreeViewCallBack(BSTR bstrKey, ITangramTreeViewCallBack* newVal)
{
	CString strKey = OLE2T(bstrKey);
	strKey.Trim();
	strKey.MakeLower();
	map<CString,ITangramTreeViewCallBack*>::iterator it = m_mapTangramTreeViewCallBack.find(strKey);
	if(it==m_mapTangramTreeViewCallBack.end())
	{
		m_mapTangramTreeViewCallBack[strKey] = newVal;
		newVal->AddRef();
	}

	return S_OK;
}
开发者ID:SmallMrKong,项目名称:TANGRAM,代码行数:14,代码来源:TangramTreeView.cpp

示例7: assert

//------------------------------------------------------------------*
CSysVar *
    CSysVarPool::LookupSysVar(LPCTSTR pszName)
{
    CSysVar *pVar = NULL;
    CString strName = pszName;
    strName.MakeLower();
    if (m_sysVarMap.Lookup(strName, pVar)) {
        // found it, do update
        assert(pVar != NULL);
        pVar->addRef();
        return pVar;
    }
    return NULL;
}
开发者ID:LM25TTD,项目名称:ATCMcontrol_Engineering,代码行数:15,代码来源:SysVarPool.cpp

示例8: SetValue

void CXTPPropertyGridItemFlags::SetValue(CString strValue)
{
	int nValue = 0;
	strValue.MakeLower();

	CXTPPropertyGridItemConstraints* pConstraints = GetConstraints();
	for (int i = 0; i < pConstraints->GetCount(); i++)
	{
		if (HasFlag(strValue, pConstraints->GetAt(i)))
			nValue |= pConstraints->GetConstraintAt(i)->m_dwData;
	}

	SetFlags(nValue);
}
开发者ID:lai3d,项目名称:ThisIsASoftRenderer,代码行数:14,代码来源:XTPPropertyGridItemBool.cpp

示例9: IsStringAutopost

const bool CStringMatch::IsStringAutopost(CString s)
{
	// Check for bad parameters
	if (!s || s == "")
		return false;

	s.Remove(' ');
	s.Remove('-');

	CString s_lower_case = s.MakeLower();
	s = s_lower_case.Left(8);

	return (s == "autopost" || s == "aut0p0st");
}
开发者ID:BehnamEmamian,项目名称:openholdembot,代码行数:14,代码来源:CStringMatch.cpp

示例10: sReadFromIni

CString sReadFromIni(CString strSection, CString strKey, CString sDefValue =_T(""))
{
	wchar_t pstrString[MAX_PATH];
	CString sFileName;
	sFileName = AfxGetApp()->m_pszProfileName;
	sFileName.MakeLower();
	
	if(!GetPrivateProfileString(strSection, strKey,sDefValue, pstrString,MAX_PATH, sFileName))
		return sDefValue;
	CString strString;
	strString =pstrString;

	return strString;
}
开发者ID:BeL1kOFF,项目名称:SHATE,代码行数:14,代码来源:stdafx.cpp

示例11: lock

// Finding a fragment in the fragment cache
PHTTP_DATA_CHUNK
RequestQueue::FindFragment(CString p_prefix)
{
  AutoCritSec lock(&m_lock);

  p_prefix.MakeLower();
  Fragments::iterator it = m_fragments.find(p_prefix);
  if(it != m_fragments.end())
  {
    return it->second;
  }
  // Fragment not found
  return nullptr;
}
开发者ID:edwig,项目名称:Marlin,代码行数:15,代码来源:RequestQueue.cpp

示例12: LoadDataImpl

void CSettingGitConfig::LoadDataImpl(CAutoConfig& config)
{
	m_bInheritSigningKey = (config.GetString(_T("user.signingkey"), m_UserSigningKey) == GIT_ENOTFOUND);

	// special handling for UserName and UserEmail, because these can also be defined as environment variables for effective settings
	if (m_iConfigSource == CFG_SRC_EFFECTIVE)
	{
		m_UserName = g_Git.GetUserName();
		m_UserEmail = g_Git.GetUserEmail();
		m_bInheritUserName = FALSE;
		m_bInheritEmail = FALSE;
		m_bInheritSigningKey = FALSE;
	}
	else
	{
		m_bInheritUserName = (config.GetString(_T("user.name"), m_UserName) == GIT_ENOTFOUND);
		m_bInheritEmail = (config.GetString(_T("user.email"), m_UserEmail) == GIT_ENOTFOUND);
	}

	if (git_config_get_bool(&m_bAutoCrlf, config, "core.autocrlf") == GIT_ENOTFOUND)
		m_bAutoCrlf = BST_INDETERMINATE;

	if (git_config_get_bool(&m_bQuotePath, config, "core.quotepath") == GIT_ENOTFOUND)
	{
		if (m_iConfigSource == CFG_SRC_EFFECTIVE)
			m_bQuotePath = BST_CHECKED;
		else
			m_bQuotePath = BST_INDETERMINATE;
	}

	BOOL bSafeCrLf = FALSE;
	if (git_config_get_bool(&bSafeCrLf, config, "core.safecrlf") == GIT_ENOTFOUND)
		m_cSafeCrLf.SetCurSel(0);
	else if (bSafeCrLf)
		m_cSafeCrLf.SetCurSel(2);
	else
	{
		CString sSafeCrLf;
		config.GetString(_T("core.safecrlf"), sSafeCrLf);
		sSafeCrLf = sSafeCrLf.MakeLower().Trim();
		if (sSafeCrLf == _T("warn"))
			m_cSafeCrLf.SetCurSel(3);
		else
			m_cSafeCrLf.SetCurSel(1);
	}

	m_bNeedSave = false;
	SetModified(FALSE);
	UpdateData(FALSE);
}
开发者ID:tribis,项目名称:TortoiseGit,代码行数:50,代码来源:SettingGitConfig.cpp

示例13: OnFileSave

void CPLViewerDoc::OnFileSave()
{
    CFileDialog  SaveDlg (false, ".jpg", NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
                          "JPEG File (*.jpg)|*.jpg|Windows Bitmap (*.bmp)|*.bmp|TIFF File (*.tif)|*.tif|PNG File (*.png)|*.png|",
                          AfxGetMainWnd());
    if (SaveDlg.DoModal() == IDOK)
    {
      CString sFName = SaveDlg.GetPathName();
      CString sExt = SaveDlg.GetFileExt();
      sExt.MakeLower();
      try
        {
          if (sExt == "jpg")
          {
              PLJPEGEncoder Encoder;
              Encoder.MakeFileFromBmp(sFName, m_pDib);
          }
          else if (sExt == "tif")
          {
              PLTIFFEncoder Encoder;
              Encoder.MakeFileFromBmp(sFName, m_pDib);
          }
          else if (sExt == "png")
          {
              PLPNGEncoder Encoder;
              Encoder.MakeFileFromBmp(sFName, m_pDib);
          }
          else if (sExt == "bmp")
          {
              PLBmpEncoder Encoder;
              Encoder.MakeFileFromBmp(sFName, m_pDib);
          }
          else
          {
              // Extension must be one of the supported types. If not,
              // something is wrong in the user interface code.
              ASSERT (false);
          }
        }
      catch(PLTextException e)
        {
          CString bmpEx;
          bmpEx.Format("Error saving the file: %s", 
                       (LPCTSTR) e, 
                       (LPCTSTR) e.GetCode());
          AfxMessageBox(bmpEx);
        }
    }
}
开发者ID:JesperMikkelsen,项目名称:Big-Numbers,代码行数:49,代码来源:Doc.cpp

示例14: FillListCtrlForShadowTree

void CBrowseRefsDlg::FillListCtrlForShadowTree(CShadowTree* pTree, CString refNamePrefix, bool isFirstLevel)
{
	if(pTree->IsLeaf())
	{
		CString filter;
		m_ctrlFilter.GetWindowText(filter);
		filter.MakeLower();
		bool positive = filter[0] != '!';
		if (!positive)
			filter = filter.Mid(1);
		CString ref = refNamePrefix + pTree->m_csRefName;
		if (!(pTree->m_csRefName.IsEmpty() || pTree->m_csRefName == "refs" && pTree->m_pParent == NULL) && IsMatchFilter(pTree, ref, filter, positive))
		{
			int indexItem = m_ListRefLeafs.InsertItem(m_ListRefLeafs.GetItemCount(), L"");

			m_ListRefLeafs.SetItemData(indexItem,(DWORD_PTR)pTree);
			m_ListRefLeafs.SetItemText(indexItem,eCol_Name, ref);
			m_ListRefLeafs.SetItemText(indexItem, eCol_Upstream, pTree->m_csUpstream);
			m_ListRefLeafs.SetItemText(indexItem, eCol_Date, pTree->m_csDate != 0 ? CLoglistUtils::FormatDateAndTime(pTree->m_csDate, m_DateFormat, true, m_bRelativeTimes) : _T(""));
			m_ListRefLeafs.SetItemText(indexItem,eCol_Msg, pTree->m_csSubject);
			m_ListRefLeafs.SetItemText(indexItem,eCol_LastAuthor, pTree->m_csAuthor);
			m_ListRefLeafs.SetItemText(indexItem,eCol_Hash, pTree->m_csRefHash);
			int pos = 0;
			m_ListRefLeafs.SetItemText(indexItem,eCol_Description, pTree->m_csDescription.Tokenize(_T("\n"), pos));
		}
	}
	else
	{

		CString csThisName;
		if (!isFirstLevel && !m_bIncludeNestedRefs)
			return;
		else if (!isFirstLevel)
			csThisName=refNamePrefix+pTree->m_csRefName+L"/";
		else
			m_pListCtrlRoot = pTree;
		for(CShadowTree::TShadowTreeMap::iterator itSubTree=pTree->m_ShadowTree.begin(); itSubTree!=pTree->m_ShadowTree.end(); ++itSubTree)
		{
			FillListCtrlForShadowTree(&itSubTree->second,csThisName,false);
		}
	}
	if (isFirstLevel)
	{
		CRefLeafListCompareFunc compareFunc(&m_ListRefLeafs, m_currSortCol, m_currSortDesc);
		m_ListRefLeafs.SortItemsEx(&CRefLeafListCompareFunc::StaticCompare, (DWORD_PTR)&compareFunc);

		SetSortArrow(&m_ListRefLeafs,m_currSortCol,!m_currSortDesc);
	}
}
开发者ID:konlytest,项目名称:TortoiseGit,代码行数:49,代码来源:BrowseRefsDlg.cpp

示例15: ProcessString

void CClipboardMonitorDlg::ProcessString(CString& str)
{
	if (str.IsEmpty())
		return;

	int len = str.GetLength();

	// remove quotes if present
	if (str[0] == L'\"' && str[len - 1] == L'\"')
	{
		str.Delete(len - 1);
		str.Delete(0);
		len -= 2;
	}

	str.MakeLower();
	
	// check extension
	if (str.Right(2) != ".h")
		return;

	// make UNIX-style slashes
	str.Replace('\\', '/');

	for (int i=0; i<m_includes.GetSize(); ++i)
	{
		const CString& path = m_includes[i]; 
		int pos = str.Find(path);
		if (pos == -1) continue;

		// check to be a valid file name
		DWORD attr = GetFileAttributes(str);
		if (attr ==  INVALID_FILE_ATTRIBUTES || (attr & FILE_ATTRIBUTE_DIRECTORY))
			return;

		// remove extra path part
		str.Delete(0, pos + path.GetLength());
		if (str[0] == '/')
			str.Delete(0);

		// create c-style #include string
		CString include;
		include.Format(L"#include \"%s\"\r\n", str); 

		// put it on the clipboard
		CopyToClipboard(include);
		break;
	}
}
开发者ID:oyefremov,项目名称:clipboard_monitor,代码行数:49,代码来源:clipboardmonitordlg.cpp


注:本文中的CString::MakeLower方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。