Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Manually Cascading through CEditView MDI Childs

Posted on 1998-05-05
2
Medium Priority
?
209 Views
Last Modified: 2013-11-20
I am implementing a find and replace feature in a project (MDI) and I decided to give the option of searching through all open views.  How can I gain access to each view sequentially?
0
Comment
Question by:bradk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
piano_boxer earned 280 total points
ID: 1307697
This code will walk through all open views in a app:
------------

POSITION pos = AfxGetApp()->GetFirstDocTemplatePosition();
while(pos)
{
    CDocTemplate* pTemplate = AfxGetApp()->GetNextDocTemplate(pos);
    POSITION docpos = pTemplate->GetFirstDocPosition();
    while(docpos)
    {
        CDocument* pDoc = pTemplate->GetNextDoc(docpos);
        POSITION viewpos = pDoc->GetFirstViewPosition();
        while(viewpos)
        {
            CView* pView = pDoc->GetNextView(viewpos);

            //
            // Do your stuff
            //
        }
    }
}

0
 

Author Comment

by:bradk
ID: 1307698
Thanks
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question