本文整理汇总了C++中AcApDocument::lockMode方法的典型用法代码示例。如果您正苦于以下问题:C++ AcApDocument::lockMode方法的具体用法?C++ AcApDocument::lockMode怎么用?C++ AcApDocument::lockMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AcApDocument
的用法示例。
在下文中一共展示了AcApDocument::lockMode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onAcadUpdateDialog
LRESULT CMDITestDialog::onAcadUpdateDialog( WPARAM, LPARAM )
{
// update elements of the dialog to reflect the current
// state of the documents
// get the current number of documents
m_staticDocNum.SetWindowText( getDocCount() );
// check/uncheck document activation
m_activationCheck.SetCheck( acDocManager->isDocumentActivationEnabled() );
// set the current document fields
CString fName;
AcApDocument *pCurrDoc = acDocManager->curDocument();
if( pCurrDoc ) {
fName = pCurrDoc->docTitle();
m_staticCurrentDoc.SetWindowText(fName);
m_staticToBeCurrDoc.SetWindowText(fName);
m_staticCurDocLockStatus.SetWindowText( modeStr(pCurrDoc->lockMode()) );
m_staticCurDocMyLockStatus.SetWindowText( modeStr(pCurrDoc->myLockMode()) );
}
else {
m_staticCurrentDoc.SetWindowText(fName);
m_staticToBeCurrDoc.SetWindowText("");
m_staticCurDocLockStatus.SetWindowText("");
m_staticCurDocMyLockStatus.SetWindowText("");
}
// set the active document data
AcApDocument *pActDoc = acDocManager->mdiActiveDocument();
if( pActDoc ) {
// active document name
fName = pActDoc->docTitle();
m_staticActiveDoc.SetWindowText(fName);
// active document lock modes
m_staticActDocLockStatus.SetWindowText( modeStr(pActDoc->lockMode()) );
m_staticActDocMyLockStatus.SetWindowText( modeStr(pActDoc->myLockMode()) );
}
else {
m_staticActiveDoc.SetWindowText("");
m_staticActDocLockStatus.SetWindowText("");
m_staticActDocMyLockStatus.SetWindowText("");
}
// rebuild listbox
RebuildListBox();
return TRUE;
}
示例2: OnIsquiescentButton
void CMDITestDialog::OnIsquiescentButton()
{
AcApDocument *pDoc = acDocManager->curDocument();
if(pDoc) {
CString tempStr;
tempStr.Format("Current Doc is %s\nlockMode() returned %s\nand myLockMode() returned %s.",
pDoc->isQuiescent() ? "Quiescent." : "NOT Quiescent.",
modeStr(pDoc->lockMode()),
modeStr(pDoc->myLockMode()) );
AfxMessageBox( tempStr );
}
}