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


C++ Filename::GetFileString方法代码示例

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


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

示例1: BrowsePath

/*********************************************************************\
	Function name    : CResEditBrowser::BrowsePath
	Description      :
	Created at       : 26.09.01, @ 11:59:42
	Created by       : Thomas Kunert
	Modified by      :
\*********************************************************************/
void CResEditBrowser::BrowsePath(Filename fn)
{
	AutoAlloc <BrowseFiles> pBrowse;
	pBrowse->Init(fn, false);

	Filename fnBrowse;
	TreeViewItem* pNewItem;

	//TRACE_STRING(fn.GetString());

	while (pBrowse->GetNext())
	{
		fnBrowse = pBrowse->GetFilename();
		if (pBrowse->IsDir())
		{
			BrowsePath(fn + fnBrowse);
			continue;
		}
		pNewItem = nullptr;
		if (fnBrowse.CheckSuffix("res"))
			pNewItem = m_wndTreeView.AddItem(fnBrowse.GetFileString(), m_pDialogsItem);
		else if (fnBrowse.CheckSuffix("tif") || fnBrowse.CheckSuffix("jpg") || fnBrowse.CheckSuffix("bmp"))
			pNewItem = m_wndTreeView.AddItem(fnBrowse.GetFileString(), m_pImagesItem);

		if (pNewItem)
			pNewItem->GetData()->SetString(ITEM_PATH_NAME, (fn + fnBrowse).GetString());
	}
}
开发者ID:nr-plugins,项目名称:resedit,代码行数:35,代码来源:ResEditBrowser.cpp

示例2: ForceOpenFileWrite

Bool ForceOpenFileWrite(BaseFile* pFile, const Filename &fn)
{
	if (pFile->Open(fn, FILEOPEN_WRITE))
		return true;
	String str = GeLoadString(IDS_WRITE_PROTECTION, fn.GetFileString());
	if (GeOutString(str, GEMB_ICONQUESTION | GEMB_YESNO) != GEMB_R_YES)
		return false;
	GeFKill(fn, GE_FKILL_FORCE);
	return pFile->Open(fn, FILEOPEN_WRITE);
}
开发者ID:nr-plugins,项目名称:resedit,代码行数:10,代码来源:globals.cpp

示例3: Filename

CCompareTableDialog::CCompareTableDialog(Filename fnOriginal, Filename fnNew)
{
	fnOriginal.SetSuffix("");
	fnNew.SetSuffix("");

	String str;
	str = fnNew.GetString();
	fnNew = Filename(str.SubStr(0, str.GetLength() - 1));

	str = fnOriginal.GetString();
	fnOriginal = Filename(str.SubStr(0, str.GetLength() - 1));

	String strOriginalFileString = fnOriginal.GetFileString();
	String strNewFileString = fnNew.GetFileString();

	Filename fn;

	Bool bOriginalDiag = false, bNewDiag = false;

	fn = fnOriginal.GetDirectory(); // fn contains strings_* or dialogs
	if (fn.GetFileString().LexCompare("dialogs") == 0)
	{
		fn = fn.GetDirectory(); // now, we are in the strings_* path
		bOriginalDiag = true;
	}
	fn = fn.GetDirectory();
	fnOriginal = fn;

	fn = fnNew.GetDirectory(); // fn contains strings_* or dialogs
	if (fn.GetFileString().LexCompare("dialogs") == 0)
	{
		fn = fn.GetDirectory(); // now, we are in the strings_* path
		bNewDiag = true;
	}
	fn = fn.GetDirectory();
	fnNew = fn;

	TRACE_STRING(fnOriginal.GetString());
	TRACE_STRING(fnNew.GetString());

	m_OriginalDoc.LoadGlobalStringTable(fnOriginal, strOriginalFileString);
	m_NewDoc.LoadGlobalStringTable(fnNew, strNewFileString);

	TRACE_STRING(fnNew.GetDirectory().GetFileString());

	m_pOriginalTable = m_OriginalDoc.GetStringTable();
	m_pNewTable = m_NewDoc.GetStringTable();

	if (bOriginalDiag)
		m_fnOriginal = fnOriginal + String("strings_*") + String("dialogs") + (strOriginalFileString + ".str");
	else
		m_fnOriginal = fnOriginal + String("strings_*") + (strOriginalFileString + ".str");

	if (bNewDiag)
		m_fnNew = fnNew + String("strings_*") + String("dialogs") + (strNewFileString + ".str");
	else
		m_fnNew = fnNew + String("strings_*") + (strNewFileString + ".str");

	//TRACE_STRING(m_fnNew.GetString());
	//TRACE_STRING(m_fnOriginal.GetString());

	m_bIsCommandTable = (m_OriginalDoc.m_StringTableType == typeCommandStrings) &&
											(m_NewDoc.m_StringTableType == typeCommandStrings);
}
开发者ID:phohale,项目名称:ResEdit,代码行数:64,代码来源:CompareTableDialog.cpp


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