本文整理汇总了C++中TDocument::IsOpen方法的典型用法代码示例。如果您正苦于以下问题:C++ TDocument::IsOpen方法的具体用法?C++ TDocument::IsOpen怎么用?C++ TDocument::IsOpen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TDocument
的用法示例。
在下文中一共展示了TDocument::IsOpen方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: while
//
/// Destruct this DocManager. Close all open documents (views close with them),
/// and delete all non-static doc templates
///
/// Destroys a TDocManager object removes attached documents templates. The
/// constructor resets TDocTemplate::DocTemplateStaticHead to point to the head of
/// the static template list.
//
TDocManager::~TDocManager()
{
// Iterate through document list, closing and deleting each
//
TDocument* doc;
while ((doc = DocList.Next(0)) != 0) {
if (doc->IsOpen())
doc->Close();
// NOTE: deleting the document deletes all attached views, and unlinks
// the document from the docmanager's document list
//
delete doc;
// Flush (dispatch) any pending MDI-Child-destroy messages
//
GetApplication()->PumpWaitingMessages();
}
// Reset the 'Docmanager' pointer of static templates and delete
// dynamic ones...
//
while (TemplateList) {
TDocTemplate* tpl = TemplateList;
TemplateList = tpl->GetNextTemplate();
if (tpl->IsStatic())
tpl->SetDocManager(0);
else
delete tpl;
}
}