CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: MDI Windows

  1. #1
    Join Date
    May 1999
    Posts
    2

    MDI Windows

    How can I check for presence of MDI Child window without making it active ? Thanks in advance.


  2. #2
    Join Date
    May 1999
    Location
    Paris, France
    Posts
    216

    Re: MDI Windows

    This might help you
    =================================
    POSITION pos = AfxGetApp()->GetFirstDocTemplatePosition();

    while (pos != NULL)
    {
    CDocTemplate* pDocTemplate = GetNextDocTemplate(pos);
    if (pDocTemplate != NULL)
    {
    POSITION docPos = pDocTemplate->GetFirstDocPosition();
    while (docPos != NULL)
    {
    CDocument *pDoc = pDocTemplate->GetNextDoc(docPos);
    if (pDoc != NULL &&
    (pDoc->IsKindOf(RUNTIME_CLASS(COrderDoc)) || pDoc->IsKindOf(RUNTIME_CLASS(CRealTimeDoc))))
    {
    POSITION posView = pDoc->GetFirstViewPosition();
    CView* pView;
    while (posView != NULL)
    {
    pView = pDoc->GetNextView(posView);
    if (pView->IsKindOf(RUNTIME_CLASS(COrderView)))
    {
    pView->RedrawWindow();
    break;
    }
    }
    }

    if (pDoc->IsKindOf(RUNTIME_CLASS(CRealTimeDoc)) || pDoc->IsKindOf(RUNTIME_CLASS(CHistoricDoc)))
    {
    if (bRedrawSeparator || bRedrawDate)
    ((CGraphicListDoc*)pDoc)->UpdateAllViewsFormat();
    ((CGraphicListDoc*)pDoc)->SetUpdateTime (CIni::GetFlash (GENERAL_SECTION));
    }
    }
    }
    }



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured