Print Page | Close Window

how to get HWNDs of all view displayed?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=914
Printed Date: 18 September 2025 at 6:30pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: how to get HWNDs of all view displayed?
Posted By: freehawk
Subject: how to get HWNDs of all view displayed?
Date 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

 




Replies:
Posted By: brucesinner
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net