• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GetPathName函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetPathName函数的典型用法代码示例。如果您正苦于以下问题:C++ GetPathName函数的具体用法?C++ GetPathName怎么用?C++ GetPathName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: Update

// Check filename and update preview
BOOL DFUFileDialog::Update()
{
	// Update the preview
	CString comment;
	CStringX xcomment;
	bool valid = false;
	if (GetPathName().IsEmpty()
		|| !DFUEngine::IsDFUFileValid(GetPathName(), xcomment))
	{
		comment.Format(m_bOpenFileDialog
		               ? IDS_FILE_SELECT_NONE_OPEN
					   : IDS_FILE_SELECT_NONE_SAVE);
	}
	else
	{
		comment = xcomment;

		valid = true;
		if (comment.IsEmpty())
		{
			comment.Format(IDS_FILE_SELECT_NO_COMMENT, (LPCTSTR) GetFileName());
		}
	}
	editPreview.SetWindowText(comment);
	editPreview.EnableScrollBarCtrl(SB_VERT, true);
	if (editPreview.GetScrollLimit(SB_VERT) == 0)
	{
		editPreview.EnableScrollBarCtrl(SB_VERT, false);
	}

	// Return whether the file is valid
	return valid;
}
开发者ID:philiplin4sp,项目名称:production-test-tool,代码行数:34,代码来源:DFUFileDialog.cpp


示例2: SetModifiedFlag

void CBonfireDoc::OnFileReload() 
{
	if (!GetPathName().IsEmpty())
	{
		SetModifiedFlag(FALSE);
		m_xTextBuffer.FreeAll();
		m_xTextBuffer.LoadFromFile(GetPathName(),
			CRLF_STYLE_AUTOMATIC,ExistsSourceView(GetPathName()));
		UpdateAllViews(NULL);
	}
}
开发者ID:Qeeet,项目名称:nz-software,代码行数:11,代码来源:BonfireDoc.cpp


示例3: OnFileSaveAs

void CColorEyeIDoc::OnFileSave() 
{
    // TODO: Add your command handler code here
//    SetPathName()
    if (GetPathName().IsEmpty())            //若還沒有存過的檔
        OnFileSaveAs();                     //就另存新檔
    else
    {
        SetModifiedFlag(FALSE);
//        saveTxtFile(GetPathName());
         saveOmdFile(GetPathName());
    }
    SetModifiedFlag(FALSE);
}
开发者ID:dwatow,项目名称:ColorEyeI,代码行数:14,代码来源:ColorEyeIDoc.cpp


示例4: UE_LOG

void USoundWave::GetChunkData(int32 ChunkIndex, uint8** OutChunkData)
{
	if (RunningPlatformData->TryLoadChunk(ChunkIndex, OutChunkData) == false)
	{
		// Unable to load chunks from the cache. Rebuild the sound and try again.
		UE_LOG(LogAudio, Warning, TEXT("GetChunkData failed for %s"), *GetPathName());
#if WITH_EDITORONLY_DATA
		ForceRebuildPlatformData();
		if (RunningPlatformData->TryLoadChunk(ChunkIndex, OutChunkData) == false)
		{
			UE_LOG(LogAudio, Error, TEXT("Failed to build sound %s."), *GetPathName());
		}
#endif // #if WITH_EDITORONLY_DATA
	}
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:15,代码来源:SoundWave.cpp


示例5: GetFileExtension

BOOL CBonfireDoc::ExistsSourceView(LPCTSTR lpszPathName)
{
	CStringList pTabList;
	CString ext = (lpszPathName == NULL) 
				? GetFileExtension(GetPathName()) 
				: GetFileExtension(lpszPathName);
	
	// generate tabs based on the file extension
	CString strViews	= theApp.m_opOptions.views.vAssociations[0].strViews; // init to default views
	CString strExtList	= "";
	size_t nExt			= theApp.m_opOptions.views.vAssociations.size();
	
	// see if the current file's extension is in the list
	while (nExt-- > 0) // 0 is the default file extension
	{
		strExtList = (CString)theApp.m_opOptions.views.vAssociations[nExt].strExtensions;
		strExtList.Remove(' ');

		if (IsStringPresent(strExtList, ext))
		{
			strViews = theApp.m_opOptions.views.vAssociations[nExt].strViews;
			break;
		}
	}

	return (strViews[0] != '-' || strViews[0] == 's');
}
开发者ID:Qeeet,项目名称:nz-software,代码行数:27,代码来源:BonfireDoc.cpp


示例6: dlg

bool CTwiBootProgDoc::SaveFileAs()
{
    CFileDialog dlg(FALSE, NULL, NULL, OFN_HIDEREADONLY, m_strFileTypeFilter, NULL);
    CString FilePath = GetPathName();
    CString FileName = GetTitle();
    if (FilePath.IsEmpty())
        FilePath = FileName;
    dlg.m_ofn.lpstrTitle = FileName;
    dlg.m_ofn.lpstrFile = FilePath.GetBuffer(_MAX_PATH);
    INT_PTR res = dlg.DoModal();
    FilePath.ReleaseBuffer();
    if (res == IDCANCEL)
        return false;
    CString FileExt = dlg.GetFileExt();

    switch(dlg.m_ofn.nFilterIndex)
    {
    case 1:
        m_FileType = ftBinary;
        if (FileExt.IsEmpty())
            FilePath += ".bin";
        break;
    case 2:
        m_FileType = ftIntelHex;
        if (FileExt.IsEmpty())
            FilePath += ".hex";
        break;
    default:
        ASSERT(FALSE);
        return false;
    }
    SetPathName(FilePath);
    SetTitle(FilePath);
    return SaveFile();
}
开发者ID:AndySze,项目名称:OpenServo,代码行数:35,代码来源:TwiBootProgDoc.cpp


示例7: UE_LOG

void UEdGraphNode::PostLoad()
{
	Super::PostLoad();

	// Create Guid if not present (and not CDO)
	if(!NodeGuid.IsValid() && !IsTemplate() && GetLinker() && GetLinker()->IsPersistent() && GetLinker()->IsLoading())
	{
		UE_LOG(LogBlueprint, Warning, TEXT("Node '%s' missing NodeGuid."), *GetPathName());

		// Generate new one
		CreateNewGuid();
	}

	// Duplicating a Blueprint needs to have a new Node Guid generated, which was not occuring before this version
	if(GetLinkerUE4Version() < VER_UE4_POST_DUPLICATE_NODE_GUID)
	{
		// Generate new one
		CreateNewGuid();
	}
	// Moving to the new style comments requires conversion to preserve previous state
	if(GetLinkerUE4Version() < VER_UE4_GRAPH_INTERACTIVE_COMMENTBUBBLES)
	{
		bCommentBubbleVisible = !NodeComment.IsEmpty();
	}
}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:25,代码来源:EdGraphNode.cpp


示例8: OnFileSaveAs

void CKaiDoc::OnFileSave()
{
    // TODO: Add your command handler code here
    if (pco_Doc_->b_IsImported())
    {
        OnFileSaveAs();
        return;
    }

    CString cstr_path = GetPathName();
    if (!cstr_path.IsEmpty())
    {
        CString cstr_ext = PathFindExtension (cstr_path);
        SetPathName (CString (cstr_path.Left (cstr_path.GetLength() - 
                                              cstr_ext.GetLength())) + 
                              _T(".kai"));
    }
    else
    {
        SetTitle (pco_Doc_->str_Title_.data());
    }

    CDocument::OnFileSave();

    if (IsModified())
    {
        SetTitle (CString (pco_Doc_->str_Title_.data()) + _T("*"));
    }

}
开发者ID:kbogatyrev,项目名称:Kai,代码行数:30,代码来源:KaiDoc.cpp


示例9: sndPlaySound

void CWaveOpen::OnBtnPlay() {
	sndPlaySound( NULL, NULL );
	CString str = GetPathName();
	if( str.GetLength() > 0 ) {
		sndPlaySound( str, SND_FILENAME | SND_ASYNC );
	}
}
开发者ID:SL987654,项目名称:The-Darkmod-Experimental,代码行数:7,代码来源:WaveOpen.cpp


示例10: GetPathName

CString CGenethonDoc::ConvertPathname( const char *nExt )
{
    char *pName;
    CString PathName = GetPathName();

    int NameLen = PathName.GetLength();

    pName = PathName.GetBuffer(NameLen);

    int tLen = NameLen - 1;
    int i;
    for ( i = 0; i < 4; ++i ) {
        if ( pName[tLen] == '.' ) {
            break;
        }
        tLen--;
    }

    if ( pName[tLen] == '.' ) {
        i = 0;
        while ( (tLen < NameLen) && (i < 4) ) {
            pName[tLen] = nExt[i];
            i++;
            tLen++;
        }
        PathName.ReleaseBuffer();
    } else {
        PathName.ReleaseBuffer();
        PathName += nExt;
    }

    return PathName;
}
开发者ID:karlnicholas,项目名称:GeneThon,代码行数:33,代码来源:GenethonDoc.cpp


示例11: OnSaveDocument

void CStorageDoc::Close (bool blAsk/* = true*/, bool blSave/* = true*/) {
	if (blSave)
		OnSaveDocument (GetPathName ());
	if (!blAsk)
		SetModifiedFlag (false);
	OnCloseDocument ();
}
开发者ID:macx0r,项目名称:dias-inet,代码行数:7,代码来源:StorageDoc.cpp


示例12: AddDirToVhd

//Implementation of CreateDirectory.
BOOL APIENTRY AddDirToVhd(HANDLE hVhdObj,LPCSTR pDirName)    //Create directory.
{
	DWORD                    dwDirCluster                  = 0;
	CHAR                     DirName[MAX_FILE_NAME_LEN]    = {0};
	CHAR                     SubDirName[MAX_FILE_NAME_LEN] = {0};
	__FAT32_SHORTENTRY       DirShortEntry                 = {0};
	__FAT32_FS*              pFat32Fs                      = (__FAT32_FS*)hVhdObj;
	

	if((NULL == pFat32Fs) || (NULL == pDirName))
	{
		return FALSE;
	}

	if(!GetPathName((LPSTR)pDirName,DirName,SubDirName))
	{
		return FALSE;
	}

	//Try to open the parent directory.
	if(!GetDirEntry(pFat32Fs,DirName,&DirShortEntry,NULL,NULL))
	{	
		return FALSE;
	}

	if(!(DirShortEntry.FileAttributes & FILE_ATTR_DIRECTORY))  //Is not a directory.
	{
		return FALSE;
	}

	dwDirCluster = MAKELONG(DirShortEntry.wFirstClusLow,DirShortEntry.wFirstClusHi);

	return CreateFatDir(pFat32Fs,dwDirCluster,SubDirName,0);
}
开发者ID:AlexShiLucky,项目名称:HelloX_OS,代码行数:35,代码来源:Fat32FileAccess.cpp


示例13: GetPathName

PathName
DviDoc::GetDocDir ()
{
  PathName result = GetPathName();
  result.RemoveFileSpec ();
  return (result);
}
开发者ID:bngabonziza,项目名称:miktex,代码行数:7,代码来源:DviDoc.cpp


示例14: GetOwner

bool UPagedVolumeComponent::SetPagedVolume(UVoreealPagedVolume* NewVolume)
{
	if (NewVolume == Volume && NewVolume == nullptr)
		return false;

	AActor* Owner = GetOwner();
	if (!AreDynamicDataChangesAllowed() && Owner != NULL)
	{
		FMessageLog("PIE").Warning(FText::Format(
			FText::FromString(TEXT("Calling SetPagedVolume on '{0}' but Mobility is Static.")),
			FText::FromString(GetPathName())));
		return false;
	}

	Volume = NewVolume;

	// If there were a volume before we call then we force gc
	UWorld* World = GetWorld();
	if (World)
	{
		World->ForceGarbageCollection(true);
	}

	return true;
}
开发者ID:ChillyFlashER,项目名称:Voreeal,代码行数:25,代码来源:VoreealPagedVolumeComponent.cpp


示例15: _T

BOOL CSkinButtonResource::LoadSkin(const TCHAR *skinfile, const CString& strControlType)
{
    static const TCHAR * ps = _T("Buttons");
    TCHAR buf[1000];
    CString path = GetPathName( skinfile );
	
	//wyw
	if (m_bInited)
	{
		m_bmpButton.DeleteObject();
	}

//    GetPrivateProfileString( ps, "Bitmap", "", buf, 1000, skinfile );
    GetPrivateProfileString( ps, strControlType, _T(""), buf, 1000, skinfile );
    if ( *buf == 0 || !m_bmpButton.LoadBitmap( path + _T("/")+ GetFileName( buf,1 )) )
        return FALSE;

    m_TopHeight = GetPrivateProfileInt( ps, _T("TopHeight"), 0, skinfile );
    m_BottomHeight = GetPrivateProfileInt( ps, _T("BottomHeight"), 0, skinfile );
    m_LeftWidth = GetPrivateProfileInt( ps, _T("LeftWidth"), 0, skinfile );
    m_RightWidth = GetPrivateProfileInt( ps, _T("RightWidth"), 0, skinfile );

    m_bTrans = GetPrivateProfileInt( ps, _T("Trans"), 0, skinfile );
    

    m_bInited = TRUE;
    return TRUE;
}
开发者ID:jiangchengxu,项目名称:spreadtrum-w160,代码行数:28,代码来源:SkinButton.cpp


示例16: GetPathName

void CWedDoc::Serialize(CArchive& ar)

{
    CString	 docname  = GetPathName();
    // Call overridden version
	Serialize(ar, docname);
}
开发者ID:akavel,项目名称:wed-editor,代码行数:7,代码来源:weddoc.cpp


示例17: GetOwner

bool UBasicVolumeComponent::SetBasicVolume(UBasicVolume* NewVolume)
{
	if (NewVolume == GetVolume() && NewVolume == nullptr)
		return false;

	AActor* Owner = GetOwner();
	if (!AreDynamicDataChangesAllowed() && Owner != NULL)
	{
		FMessageLog("PIE").Warning(FText::Format(
			FText::FromString(TEXT("Calling SetBasicVolume on '{0}' but Mobility is Static.")),
			FText::FromString(GetPathName())));
		return false;
	}

	if (m_octree.IsValid())
	{
		m_octree.Reset();
	}

	PRAGMA_DISABLE_DEPRECATION_WARNINGS
	Volume = NewVolume;
	PRAGMA_ENABLE_DEPRECATION_WARNINGS

	// If there were a volume before we call then we force gc
	UWorld* World = GetWorld();
	if (World)
	{
		World->ForceGarbageCollection(true);
	}

	EnsureRendering();

	return true;
}
开发者ID:ChillyFlashER,项目名称:Voreeal,代码行数:34,代码来源:VoreealBasicVolumeComponent.cpp


示例18: GetPathName

//------------------------------------------------------------------KBDelete
void CScriptDoc::SetModifiedFlag()
{ CString Path;
  Path = GetPathName( );
  if (Path.IsEmpty()==FALSE) 
    OnSaveDocument(Path); 
  else CDocument::SetModifiedFlag();
}
开发者ID:Stas777,项目名称:Exsylor,代码行数:8,代码来源:Scrdocmd.cpp


示例19: GetPathName

void COpenFileDlg::OnDestroy()
{
    int i = GetPathName().Find(__DUMMY__);
    if(i >= 0) m_pOFN->lpstrFile[i] = m_pOFN->lpstrFile[i+1] = 0;

    CFileDialog::OnDestroy();
}
开发者ID:Fluffiest,项目名称:mpc-hc,代码行数:7,代码来源:OpenFileDlg.cpp


示例20: check

FString UUserDefinedEnum::GenerateFullEnumName(const TCHAR* InEnumName) const
{
	check(CppForm == ECppForm::Namespaced);

	FString PathName;
	GetPathName(NULL, PathName);
	return UEnum::GenerateFullEnumName(this, InEnumName);
}
开发者ID:WasPedro,项目名称:UnrealEngine4.11-HairWorks,代码行数:8,代码来源:UserDefinedEnum.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetPawn函数代码示例发布时间:2022-05-30
下一篇:
C++ GetPathData函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap