本文整理汇总了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());
}
}
示例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);
}
示例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);
}