Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example of finding CView from CDocument
void CShowOfflineFilesDoc::Example()
CView* pv = FindView(RUNTIME_CLASS(CSearchResult));
CView* CShowOfflineFilesDoc::FindView(CRuntimeClass* rc)
POSITION p = GetFirstViewPosition();
CView* pRet;
while (p != NULL) {
pRet = GetNextView(p);
if (pRet->IsKindOf(rc)) {
return pRet;
return nullptr;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.