本文整理汇总了C++中wxString::SpanExcluding方法的典型用法代码示例。如果您正苦于以下问题:C++ wxString::SpanExcluding方法的具体用法?C++ wxString::SpanExcluding怎么用?C++ wxString::SpanExcluding使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxString
的用法示例。
在下文中一共展示了wxString::SpanExcluding方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnOpenDocument
bool DrawProgDoc::OnOpenDocument(const wxString& filename)
{
INXString filename;
int len;
int response;
#ifdef _UNUSED_FUNCTIONS_TO_LOAD_THE_FILE
CLabLgbBaseApp *pApp = ( CLabLgbBaseApp * ) AfxGetApp();
double dFreeDiskSpace = pApp->MyGetFreeDiskSpaceMB();
if (dFreeDiskSpace < DISK_SPACE_WARNING_MB) {
response = AfxMessageBox("Warning, less than 50MB of free disk space remaining.\nYou may not be able save your work.\nContinue?",MB_YESNO | MB_ICONWARNING);
if (response == IDNO) {
return FALSE;
}
} else if (dFreeDiskSpace < DISK_SPACE_CRITICAL_MB) {
AfxMessageBox("Unable to open project, less than 10MB of free disk space remaining.",MB_ICONWARNING);
return FALSE;
}
#endif
// Extract filename
filename = (INXString)lpszPathName;
//filename = filename.SpanExcluding(".");
filename.MakeReverse();
filename = filename.SpanExcluding("\\");
filename.MakeReverse();
// remove .prg to get filename
len = filename.GetLength() - 4;
filename = filename.Left(len);
if (!wxDocument::OnOpenDocument(lpszPathName))
return FALSE;
// TODO: Add your specialized creation code here
POSITION pos = GetFirstViewPosition();
DrawProgView* pView = (DrawProgView*) GetNextView(pos);
if (pFrame->m_wndProjectBar.m_cProjTree.openProject) {
pProject = pFrame->m_wndProjectBar.m_cProjTree.openProj;
}
else {
pProject = pFrame->m_wndProjectBar.m_cProjTree.GetProjectPtr(pFrame->m_wndProjectBar.m_cProjTree.hSelItem);
}
// Check Folder Structure
INXString csProjDir;
pProject->pProjMData->initProjFolderMinder();
if(pProject->pProjMData->folderStructureNotOk()){
AfxMessageBox("Unable to open this project, because the directory structure is invalid");
return kErr_InvalidFolderStructure;
}
// Create DEP, load and initialise
pDEP = pProject->AddDEP();
pDEP->LoadProg((INXString)lpszPathName);
pDEP->InitTagLists();
pDEP->depFilename = filename;
// Populate project tree if opening a project. Uses the loaded DEP to populate the tree
if (pFrame->m_wndProjectBar.m_cProjTree.openProject) {
pFrame->m_wndProjectBar.m_cProjTree.PopulateProjectTree(pDEP->condata, pProject);
}
pDEP->hItem = pFrame->m_wndProjectBar.m_cProjTree.hSelItem;
// Set the project and DEP pointers in the view
pView->pProject = pProject;
pView->pDEP = pDEP;
pView->RedrawWindow();
// Need to initialise undo for case when the view is already open
pView->initUndo();
return true;
}