Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - how to get HWNDs of all view displayed?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

how to get HWNDs of all view displayed?

 Post Reply Post Reply
Author
Message
freehawk View Drop Down
Groupie
Groupie


Joined: 22 April 2004
Status: Offline
Points: 95
Post Options Post Options   Thanks (0) Thanks(0)   Quote freehawk Quote  Post ReplyReply Direct Link To This Post Topic: how to get HWNDs of all view displayed?
    Posted: 05 July 2004 at 1:35am

Hello

I want to get HWNDs of all view displayed in the Tabbed MDI. Please help me how to do?

Thank you.

-Freehawk

 

Back to Top
brucesinner View Drop Down
Newbie
Newbie
Avatar

Joined: 19 July 2004
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote brucesinner Quote  Post ReplyReply Direct Link To This Post Posted: 19 July 2004 at 4:11pm
You must get a pointer to your main app and then get a pointer to your DocTemplate.
This code below do something like this:

    POSITION viewpos;
    POSITION pos = m_pDocTemplate->GetFirstDocPosition();

    while (pos != NULL)
    {
        CDocument *pDoc = m_pDocTemplate->GetNextDoc(pos);

        viewpos = pDoc->GetFirstViewPosition();
        CMDIView* tmpView = (CMDIView *) pDoc->GetNextView(viewpos);
                   
        tmpView->Invalidate(TRUE);
    }           

This code repaints all views in a MDI app.

Hope this helps,
Bruce Sinner
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.