本文整理汇总了C++中TView::IsOK方法的典型用法代码示例。如果您正苦于以下问题:C++ TView::IsOK方法的具体用法?C++ TView::IsOK怎么用?C++ TView::IsOK使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TView
的用法示例。
在下文中一共展示了TView::IsOK方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NotifyViews
//
/// DetachView is invoked from TView's destructor so that the view can detach
/// itself from this document. True is returned if the detachment is successful
/// indicating that this document should be deleted.
//
bool
TDocument::DetachView(TView& view)
{
TView** plist = &ViewList;
for (; *plist; plist = &(*plist)->NextView) {
if (*plist == &view) {
// Found the view, now detach it and notify app and other views
//
DocManager->PostEvent(dnClose, view);
*plist = view.NextView;
NotifyViews(vnViewClosed, (long)&view, &view);
// Cleanup doc if last view was just closed and dtAutoDelete
// or dtAutoOpen is set. dtAutoOpen will cause an autoclose, while
// dtAutoDelete will delete this doc also.
//
if (!ViewList) {
if (Template && ((Template->Flags & dtAutoDelete) ||
(Template->Flags & dtAutoOpen))) {
// Close document streams
//
if (IsOpen())
Close();
// Returning true will cause ~TView to delete document. Using
// 'view.IsOK()' caters for cases where TView's construction failed.
//
return (Template->Flags & dtAutoDelete) && view.IsOK();
}
}
else {
ReindexFrames();
}
break;
}
}
return false;
}