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


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

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


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

示例1: IsValidPath

BOOL CDirTreeCtrl::IsValidPath(LPCTSTR strPath)
{
	// This function check the Pathname
	
	HTREEITEM hChild;
	CString   strItem;
	CString   strTempPath = strPath;
	BOOL      bFound = FALSE;
	CFileFind find;

	hChild = GetChildItem( TVI_ROOT );
	strTempPath.MakeUpper();
	strTempPath.TrimRight('\\');

	while ( hChild )
	{
		strItem = GetItemText( hChild );
		strItem.MakeUpper();
		if ( strItem == strTempPath.Mid( 0, strItem.GetLength() ) )
		{
			bFound = TRUE;
			break;
		}
		hChild = GetNextItem( hChild, TVGN_NEXT );
	}
    
	if ( !bFound )
		return FALSE;

	strTempPath += _T("\\nul");
	if ( find.FindFile( strTempPath ) )
		return TRUE;
     
	return FALSE;
}
开发者ID:AutoCAD-DCI,项目名称:CADTools,代码行数:35,代码来源:DirTreeCtrl.cpp

示例2: FindItemByPrefix

//**************************************************************************
int CBCGPRibbonComboBox::FindItemByPrefix(LPCTSTR lpszPrefix, CString& strResult) const
{
	ASSERT_VALID (this);
	ASSERT (lpszPrefix != NULL);

	strResult.Empty();

	CString strPrefix = lpszPrefix;
	strPrefix.MakeUpper();

	int iIndex = 0;
	for (POSITION pos = m_lstItems.GetHeadPosition (); pos != NULL; iIndex++)
	{
		CString strItem = m_lstItems.GetNext (pos);
		strItem.MakeUpper();

		if (strItem.Find(strPrefix) == 0)
		{
			strResult = GetItem(iIndex);
			return iIndex;
		}
	}

	return -1;
}
开发者ID:iclosure,项目名称:jframework,代码行数:26,代码来源:BCGPRibbonComboBox.cpp

示例3: OnVKeyToItem

int CProcessDlg::OnVKeyToItem( UINT nKey, CListBox* pListBox, UINT nIndex )
{
	if (m_title != _T("Process"))
		return false;

	UINT count = pListBox->GetCount();

	UINT cur = nIndex + 1;
	if (cur >= count)
		return -2;

	CString keyStr;
	keyStr.Format(_T(" %c"), nKey);
	keyStr = keyStr.MakeUpper();

	CString txt;
	while (cur != nIndex) {
		pListBox->GetText(cur, txt);
		txt = txt.MakeUpper();
		if (txt.Find(keyStr) != -1) {
			pListBox->SetCurSel(cur);
			break;
		}

		cur = (cur + 1) % count;
	}

	return -2;
}
开发者ID:brock7,项目名称:XTrace,代码行数:29,代码来源:ProcessDlg.cpp

示例4: SelectShortname

BOOL CDomainListBox::SelectShortname( int nStart, CString strText )
{
	SelectItem( -1, FALSE );

	strText.MakeUpper();
	int	nLen	=	strText.GetLength();
	if( nLen <= 0 )
		return FALSE;

	CString	rString;
	int	nPos	=	nStart;
	for( int i=0; i<GetCount(); i++ )
	{
		if( nPos == GetCount() || nPos < 0 )
			nPos	=	0;

		GetText( nPos, rString );
		rString.MakeUpper();
		int	nIndex	=	rString.Find( '(' );
		if( -1 != nIndex )
		{
			rString	=	rString.Mid( nIndex+1 );
			if( 0 == strncmp( rString, strText, min(nLen,rString.GetLength()) ) )
			{
				SelectItem( i, TRUE );
				SetTopIndex( i > 6 ? i-6 : 0 );
				return TRUE;
			}
		}

		nPos	++;
	}
	return FALSE;
}
开发者ID:amikey,项目名称:tradingstrategyking,代码行数:34,代码来源:SetGroupDlg.cpp

示例5: matches

 bool matches(CTreeListItem * tli)
 {
     LPCSTR name = tli->getName(NULL), value = tli->getValue();
     if(matchCase)
     {
         if(strstr(name, findWhat)) return true;
         if(value && !tli->isBinary() && strstr(value, findWhat)) return true;           
     }
     else
     {
         static CString what, nbuf;
         what = findWhat;
         nbuf = name;
         what.MakeUpper();
         nbuf.MakeUpper();
         if(strstr(nbuf, what)) return true;     
         if(value && !tli->isBinary())
         {
             static CString vbuf;
             vbuf= value;
             vbuf.MakeUpper();
             if(strstr(vbuf, what)) return true;
         }
     }
     return false;
 }
开发者ID:AlexLuya,项目名称:HPCC-Platform,代码行数:26,代码来源:inspectctrl.cpp

示例6: GetMimicList

int CMimicFile::GetMimicList(vector<CString>& MimicInfoList)
{
	DWORD t1 = GetTickCount();
	char				SrcfilePathFile[255];
	WIN32_FIND_DATA     FindFileData;
	HANDLE				handle;
	MimicInfoList.clear();

	//获取系统图存放路径
	char SrcfilePath[255];
	GetPrivateProfileString("Drawings Dir", "MimicPath", "C:\\Drawings", SrcfilePath, 255, MIMICSYSCONFINI);

	//判断路径是否存在
	if (_access(SrcfilePath, 0) == -1)
	{
		return -1;
	}
	sprintf_s(SrcfilePathFile, "%s\\*.grb", SrcfilePath);
	handle = FindFirstFile(SrcfilePathFile, &FindFileData);
	if (handle != INVALID_HANDLE_VALUE)
	{
		BOOL		bResult = TRUE;
		CString		csGrb;
		while (bResult)
		{
			csGrb.Format("%s", FindFileData.cFileName);
			if(csGrb.GetLength() != 12)
			{
				bResult = FindNextFile(handle, &FindFileData);
				continue;
			}
			csGrb.MakeUpper();
			csGrb = csGrb.Left(8);

			//检查图是否合法的图
			if(CheckGrbValid(csGrb) == TRUE)
			{
				MimicInfoList.push_back(csGrb);

				//修改文件名为全大写
				CString OriFile = FindFileData.cFileName;
				CString DstFile = OriFile;
				if (OriFile != DstFile.MakeUpper())
				{
					CString PathFile;
					PathFile.Format("%s\\%s", SrcfilePath, DstFile);
					BOOL b = MoveFile(PathFile, PathFile);
				}
			}
			bResult = FindNextFile(handle, &FindFileData);
		}
	}
	FindClose(handle);

	DWORD t2 = GetTickCount();
	TRACE("GetMimicInfoList()耗时=%dms\n", t2 - t1);

	return (int)MimicInfoList.size();
}
开发者ID:redparrot,项目名称:CoreViewSrc,代码行数:59,代码来源:MimicFile.cpp

示例7: SearchTree

/****************************************************************************
*
*	FUNCTION:	SearchTree(	HTREEITEM treeNode,
*							CString szSearchName )
*
*	PURPOSE:	Too crude to explain, just use it
*
*	WARNING:	Only works if you use the default PopulateTree()
*				Not guaranteed to work on any future or existing
*				version of windows. Use with caution. Pretty much
*				ok if you're using on local drives
*
****************************************************************************/
bool CShellTreeCtrl::SearchTree(HTREEITEM treeNode,
							CString szSearchName,
							FindAttribs attr)
{
	LPTVITEMDATA	lptvid;  //Long pointer to TreeView item data
	LPSHELLFOLDER	lpsf2=NULL;
	char	drive[_MAX_DRIVE];
	char	dir[_MAX_DIR];
	char	fname[_MAX_FNAME];
	char	ext[_MAX_EXT];
	bool	bRet=false;
	HRESULT	hr;
	CString	szCompare;

	szSearchName.MakeUpper();
	while(treeNode && bRet==false)
	{
		lptvid=(LPTVITEMDATA)GetItemData(treeNode);
		if (lptvid && lptvid->lpsfParent && lptvid->lpi)
		{
			hr=lptvid->lpsfParent->BindToObject(lptvid->lpi,
					 0,IID_IShellFolder,(LPVOID *)&lpsf2);
			if (SUCCEEDED(hr))
			{
				ULONG ulAttrs = SFGAO_FILESYSTEM;
				lptvid->lpsfParent->GetAttributesOf(1, (const struct _ITEMIDLIST **)&lptvid->lpi, &ulAttrs);
				if (ulAttrs & (SFGAO_FILESYSTEM))
				{
					if(SHGetPathFromIDList(lptvid->lpifq,szCompare.GetBuffer(MAX_PATH)))
					{
						switch(attr)
						{
						case type_drive:
							_splitpath(szCompare,drive,dir,fname,ext);
							szCompare=drive;
							break;
						case type_folder:
							szCompare = GetItemText(treeNode);
							break;
						}
						szCompare.MakeUpper();
						if(szCompare == szSearchName)
						{
							EnsureVisible(treeNode);
							SelectItem(treeNode);
							Expand(treeNode, TVE_EXPAND);
							bRet=true;
						}
					}
				}
				lpsf2->Release();
			}
		}
		treeNode = GetNextSiblingItem(treeNode);
	}
	return bRet;
}
开发者ID:vicentdsmin,项目名称:myie,代码行数:70,代码来源:ShellTreeCtrl.cpp

示例8: OnInitDialog

BOOL CMeritChangeDialog::OnInitDialog()
{
	BOOL ret = __super::OnInitDialog();
	if (!ret) return FALSE;

	// create a nice big font
	GraphStudio::MakeFont(font_filter, _T("Arial"), 12, true, false);
	label_filter.SetFont(&font_filter);
	label_filter.SetWindowText(filter_name);

	// original value
	int		idx = -1;
	int		i;

	for (i=0; i<TableMeritCount; i++) {
		if (old_merit == TableMerits[i].merit) {
			idx = i;
			break;
		}
	}

	CString		str;
	if (idx >= 0) {
		str.Format(_T("%08x (%s)"), old_merit, TableMerits[idx].name);
	} else {
		// simply format the hexadecimal code
		str.Format(_T("%08x"), old_merit);
	}
	str = str.MakeUpper();
	str = _T("0x") + str;
	edit_original.SetWindowText(str);

	// combobox
	idx = -1;
	cb_newmerit.ResetContent();
	for (i=0; i<TableMeritCount; i++) {
		str.Format(_T("%08x (%s)"), TableMerits[i].merit, TableMerits[i].name);
		str = str.MakeUpper();
		str = _T("0x") + str;
		cb_newmerit.AddString(str);
		if (TableMerits[i].merit == old_merit) {
			idx = i;
		}
	}

	if (idx >= 0) {
		cb_newmerit.SetCurSel(idx);
	} else {
		str.Format(_T("%08x"), old_merit);
		str = str.MakeUpper();
		str = _T("0x") + str;
		cb_newmerit.SetWindowText(str);
	}
	
	return TRUE;
}
开发者ID:EnigmaIndustries,项目名称:graph-studio-next,代码行数:56,代码来源:MeritForm.cpp

示例9: IsSubstring

bool Utils::IsSubstring(CString strString, CString strCheck)
{
	Utils::trim(strString);
	strString.MakeUpper();

	Utils::trim(strCheck);
	strCheck.MakeUpper();

	return (strstr(strString, strCheck) != NULL);
}
开发者ID:gomoku,项目名称:RenLib,代码行数:10,代码来源:Utils.cpp

示例10: FindWhatYouNeed

/**
	@brief	FindName을 찾는다.

	@author KHS	

	@date 2009-05-26 오후 3:18:13	

	@param	

	@return		
**/
bool CGridCtrlEx::FindWhatYouNeed(CString FindName, bool bMatchCase, bool bMatchWholeWord, bool bSearchDown)
{
	if(bMatchCase == false)
		FindName.MakeUpper();

	bool bContinueSearch = true;
	
	CCellID startCell = GetFocusCell();
	CCellID actCell = startCell;

	if(IsValid(actCell))
	{
		goto L_SEARCH;
	}

	do
	{
		actCell.col = 1;
		actCell.row = 1;
		for(actCell = bSearchDown ? actCell
			: GetPrevCell(actCell);
			bContinueSearch && IsValid(actCell);)
		{
			if(actCell == startCell)
			{
				bContinueSearch = false;
				break;
			}
			{
				CString rName = CGridCtrlEx::GetItemText(actCell.row, actCell.col);
				if(bMatchCase == false) rName.MakeUpper();

				if((bMatchWholeWord && rName == FindName) || (!bMatchWholeWord && (rName.Find(FindName) >= 0)))
				{
					SetSelectedRange(actCell.row, actCell.col,actCell.row, actCell.col);
					SetFocusCell(actCell);
					//!SCROL BAR MOVE
					ScrollMove(startCell, actCell);

					return true;
				}
			}

L_SEARCH:
			actCell = bSearchDown ? GetNextCell(actCell) : GetPrevCell(actCell);
		}
		if(!IsValid(actCell))
		{
			bContinueSearch = false;
		}
	}while(bContinueSearch);

	return false;	// not found
}
开发者ID:radtek,项目名称:e-load,代码行数:65,代码来源:GridCtrlEx.cpp

示例11: CheckAction

int CSDMdlAttrMdlNameCheck::CheckAction(void *pData, const CheckRule &checkRule, CheckResult &checkResult)
{ 
	ProMdl pMdl = (ProMdl)pData;
	if (NULL == pMdl)
	{
		checkResult.nResultType = CHECK_RESULT_INVALID_MODEL;
		return checkResult.nResultType;
	}

	if (!IsMdlTypeValid(pMdl, checkRule.dwMdlFilter))
	{
		checkResult.nResultType = CHECK_RESULT_INVALID_MODEL;
		return checkResult.nResultType;
	}

	// 检查输入值有效性
	if (checkRule.arrRuleContent.GetCount() < 2)
	{
		checkResult.nResultType = CHECK_RESULT_INVALID_INPUT;
		return checkResult.nResultType;
	}

	ProError status;
	ProName CheckedMdlName;
	status = ProMdlNameGet(pMdl,CheckedMdlName);

	CString strMdlNameCheckType;
	CString strCheckContent;
	CString strCheckedMdlName = CheckedMdlName;

	strMdlNameCheckType = checkRule.arrRuleContent[0];
	strCheckContent = checkRule.arrRuleContent[1];
	//转换成大写字母
	strCheckContent.MakeUpper();
	strCheckedMdlName.MakeUpper();

	int nIndex;
	nIndex = strCheckedMdlName.Find(strCheckContent);

	if (strMdlNameCheckType.CompareNoCase(L"包含") == 0 && nIndex != -1)
	{
		checkResult.nResultType = CHECK_RESULT_NO_ERROR;
		return CHECK_RESULT_NO_ERROR;
	}
	else if (strMdlNameCheckType.CompareNoCase(L"不包含") == 0 && nIndex == -1)
	{
		checkResult.nResultType = CHECK_RESULT_NO_ERROR;
		return CHECK_RESULT_NO_ERROR;
	}
	checkResult.nResultType = CHECK_RESULT_INVALID_VALUE;
	return CHECK_RESULT_INVALID_VALUE;
}
开发者ID:bjliugq,项目名称:SmartDoctor,代码行数:52,代码来源:SDMdlAttrMdlNameCheck.cpp

示例12: DeleteTextStyle

BOOL CPreStylePag::DeleteTextStyle(CString strTSName)
{
    CMObject obj, tsobj;
    long     i, nCount;
    CString  strtmp;

    //进行参数检查和初始化
    strTSName.TrimLeft();
    strTSName.TrimRight();
    strTSName.MakeUpper();
    if(strTSName.GetLength() <= 0) return FALSE;

    try
    {
        if(FindAcad() == FALSE)
        {
            return FALSE;
        }
        
        //SETUP-1: 获取ACAD文本样式列表
        obj = EDIBAcad::objAcadDoc.GetPropertyByName(
                                      _T("TextStyles"));
        
        //SETUP-2: 获取样式对象
		nCount = (long)obj.GetPropertyByName(_T("Count"));
		for( i = 0; i < nCount; i++)
		{
			tsobj = obj.Invoke(_T("Item"), 1, &_variant_t(i));
			strtmp = vtos(tsobj.GetPropertyByName(_T("Name")));
			strtmp.TrimLeft();
            strtmp.TrimRight();
			strtmp.MakeUpper();
			if(strtmp == strTSName)
			{
                //删除目标样式
                tsobj.Invoke0(_T("Delete"));
                return TRUE;
			}
		}
    }
	catch (_com_error &e)
	{
		CString strMsg;
		strMsg.Format("%s:%d %s", __FILE__, __LINE__, (LPSTR)e.Description());
		AfxMessageBox(strMsg);
	}
    catch(...)
    {
    }
    return FALSE;
}
开发者ID:uesoft,项目名称:AutoPHS,代码行数:51,代码来源:PreStylePag.cpp

示例13:

void MyDialog4::AddRoute(unsigned int Dest, unsigned int Gate, int Metric,
						 char *Int)
{
	CString DestStr;
	CString GateStr;
	CString MetricStr;
	CString IntStr;
	int Idx;

	DestStr.Format("%d.%d.%d.%d",
		((unsigned char *)&Dest)[0], ((unsigned char *)&Dest)[1],
		((unsigned char *)&Dest)[2], ((unsigned char *)&Dest)[3]);

	GateStr.Format("%d.%d.%d.%d",
		((unsigned char *)&Gate)[0], ((unsigned char *)&Gate)[1],
		((unsigned char *)&Gate)[2], ((unsigned char *)&Gate)[3]);

	MetricStr.Format("%d", Metric);

	IntStr.Format("%c%c%c%c", Int[0], Int[1], Int[2], Int[3]);
	IntStr.MakeUpper();

	Idx = m_RoutingTable.GetItemCount();

	m_RoutingTable.InsertItem(Idx, DestStr);

	m_RoutingTable.SetItemText(Idx, 1, GateStr);
	m_RoutingTable.SetItemText(Idx, 2, MetricStr);
	m_RoutingTable.SetItemText(Idx, 3, IntStr);
}
开发者ID:CharlieTLe,项目名称:qurinet,代码行数:30,代码来源:MyDialog4.cpp

示例14: InitFromStr

bool CLicenseKey::InitFromStr(LPCTSTR szKey)
{
	CString strKey = szKey;
	if (strKey.IsEmpty())
		return false;
	
	strKey.MakeUpper();

	CString strKeyLic = strKey.Left (m_nProductKeyLen + m_nModulesKeyLen + m_nExpDateKeyLen);
	CString strParity = strKey.Mid (m_nProductKeyLen + m_nModulesKeyLen + m_nExpDateKeyLen, m_nParityKeyLen);
	
	if (CalculateParity(strKeyLic)  !=  Base36ToDec (strParity) )
		return false;
	
	long nUID = Base36ToDec (  strKeyLic.Left (m_nProductKeyLen) );
	long nModules = Base36ToDec (  strKeyLic.Mid (m_nProductKeyLen, m_nModulesKeyLen));

	DATE dtExp = DecodeExpireDate (Base36ToDec(strKeyLic.Mid (m_nProductKeyLen + m_nModulesKeyLen, m_nExpDateKeyLen)));
	if ( (long)dtExp == 0 )
		return false;

	m_nUID = nUID;
	m_nModules = nModules;
	m_dtExpiration = dtExp;
	m_strKey = strKey;

	return true;
}
开发者ID:AlexS2172,项目名称:IVRMstandard,代码行数:28,代码来源:LicenseKey.cpp

示例15: ChangeAmPm

//*****************************************************************************************
void CBCGPDateTimeCtrl::ChangeAmPm (UINT uiAmPm)
{
	int iDay = m_Date.GetDay ();
	int iMonth = m_Date.GetMonth ();
	int iYear = m_Date.GetYear ();
	int iHour = m_Date.GetHour ();
	int iMin = m_Date.GetMinute ();

	CString str;
	str += (char) uiAmPm;
	str.MakeUpper ();

	if (str == m_strPM [0] && iHour < 12)
	{
		iHour += 12;
	}

	if (str == m_strAM [0] && iHour >= 12)
	{
		iHour -= 12;
	}

	COleDateTime date (iYear, iMonth, iDay, iHour, iMin, 0);
	if (IsDateValid (date) && m_Date != date)
	{
		m_Date = date;
		RedrawWindow (m_rectText);

		OnDateChanged ();
	}
}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:32,代码来源:BCGPDateTimeCtrl.cpp


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