本文整理汇总了C++中CDocument::DoFileSave方法的典型用法代码示例。如果您正苦于以下问题:C++ CDocument::DoFileSave方法的具体用法?C++ CDocument::DoFileSave怎么用?C++ CDocument::DoFileSave使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDocument
的用法示例。
在下文中一共展示了CDocument::DoFileSave方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnSave
//**************************************************************************************
void CBCGPWindowsManagerDlg::OnSave()
{
int nItems = m_wndList.GetCount();
if (nItems > 0)
{
for (int i = 0; i < nItems; i++)
{
if (m_wndList.GetSel (i) > 0)
{
HWND hWnd=(HWND) m_wndList.GetItemData (i);
if (m_lstSaveDisabled.Find (hWnd) == NULL)
{
CWnd* pWnd = CWnd::FromHandle (hWnd);
CFrameWnd* pFrame = DYNAMIC_DOWNCAST (CFrameWnd, pWnd);
if (pFrame != NULL)
{
CDocument *pDoc = pFrame->GetActiveDocument();
if (pDoc != NULL)
{
ASSERT_VALID (pDoc);
pDoc->DoFileSave();
}
}
}
}
}
}
FillWindowList ();
SelActive ();
UpdateButtons ();
}
示例2: OnCmdBuild
void CMainFrame::OnCmdBuild()
{
CDocument *pDoc = GetActiveFrame()->GetActiveDocument();
pDoc->DoFileSave();
CString strFolder = theApp.CombinePath( theApp.GetPath(), theApp.m_strSDKOutput );
CString strApp = theApp.CombinePath( theApp.GetPath(), theApp.m_strCompilerApp );
SetEnvironmentVariable( _T("NEWPAS"), '"' + strApp + '"' );
CString strArgs;
// using an environ. var. because cmd /C doesn't support more than 1 quoted path
strArgs.Format( _T("/C %%NEWPAS%% \"%s\" outvm || pause"), (LPCTSTR)pDoc->GetPathName() );
::ShellExecute( 0, _T("open"), _T("cmd"), strArgs, strFolder, SW_SHOW );
}
示例3: OnCmdRun
void CMainFrame::OnCmdRun()
{
CDocument *pDoc = GetActiveFrame()->GetActiveDocument();
pDoc->DoFileSave();
CString strApp = theApp.CombinePath( theApp.GetPath(), theApp.m_strCompilerApp );
SetEnvironmentVariable( _T("NEWPAS"), '"' + strApp + '"' );
CString strArgs;
// using an environ. var. because cmd /C doesn't support more than 1 quoted path
strArgs.Format( _T("/C %%NEWPAS%% \"%s\" execvm & pause"), (LPCTSTR)pDoc->GetPathName() );
TCHAR szFolder[MAX_PATH];
_tcscpy_s( szFolder, MAX_PATH, pDoc->GetPathName() );
PathRemoveFileSpec( szFolder );
::ShellExecute( 0, _T("open"), _T("cmd"), strArgs, szFolder, SW_SHOW );
}