MFC 中解析一个路径

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/baijiaheizhiganmao/article/details/51392855

MFC 中解析一个路径

	CString target("E:\\Downloads\\MobaXterm_v8.1\\MobaXterm.log");
	int n = target.ReverseFind('\\');//从后往前寻找
	CString  tmp = target.Mid(n+1,target.GetLength()-n);		//获取后缀  MobaXterm.log
	target = target.Left(n);									//获取前缀	E:\Downloads\MobaXterm_v8.1




展开阅读全文

MFC解析!!!!~~~~~~????????

06-12

下面文件包含在#include "ChildFrm.cpp"rnrnrnrnrn// ChildFrm.cpp : implementation of the CChildFrame classrn//rnrn#include "stdafx.h"rn#include "test_four.h"rnrn#include "ChildFrm.h"rnrn#ifdef _DEBUGrn#define new DEBUG_NEWrn#undef THIS_FILErnstatic char THIS_FILE[] = __FILE__;rn#endifrnrn/////////////////////////////////////////////////////////////////////////////rn// CChildFramernrnIMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd)rnrnBEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)rn //AFX_MSG_MAP(CChildFrame)rn // NOTE - the ClassWizard will add and remove mapping macros here.rn // DO NOT EDIT what you see in these blocks of generated code !rn //AFX_MSG_MAPrnEND_MESSAGE_MAP()rnrn/////////////////////////////////////////////////////////////////////////////rn// CChildFrame construction/destructionrnrnCChildFrame::CChildFrame()rnrn // TODO: add member initialization code herern rnrnrnCChildFrame::~CChildFrame()rnrnrnrnBOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)rnrn // TODO: Modify the Window class or styles here by modifyingrn // the CREATESTRUCT csrnrn if( !CMDIChildWnd::PreCreateWindow(cs) )rn return FALSE;rnrn return TRUE;rnrnrnrnrn/////////////////////////////////////////////////////////////////////////////rn// CChildFrame diagnosticsrnrn#ifdef _DEBUGrnvoid CChildFrame::AssertValid() constrnrn CMDIChildWnd::AssertValid();rnrnrnvoid CChildFrame::Dump(CDumpContext& dc) constrnrn CMDIChildWnd::Dump(dc);rnrnrn#endif //_DEBUGrnrn/////////////////////////////////////////////////////////////////////////////rn// CChildFrame message handlersrnrnrnrnrn请问上面的程序什么意思啊???rn!!!rn~~~~~~~~~~~~~~~~大哥大姐们讲的清楚点啊~~!!!!!!!!rn~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~谢谢啊 !!!~~~~rn 论坛

没有更多推荐了,返回首页