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

    Update all views by CMainFrame

    Hi all,

    in my MDI application all views are textual and use the same font. In each 'CMyView::OnDraw', they call 'CMainFrame::GetViewFont' to get the font. Therefore, the 'OnViewFont' is located in CMainFrame. My problem is, that I don't know how to update my views after changing the font. 'CMainFrame::Invalidate' does not work. Do I have to enumerate all documents, and enumerate all views for each? Is there a simplier way?

    Thanks in advance,
    Thömmi


  2. #2

    Re: Update all views by CMainFrame

    You will have to enumerate the MDI children, and then for each one use UpdateAllViews() to send all the views in that MDI child a "Hint" that it's time to repaint everything because the font has changed.

    LA Leonard - http://www.DefinitiveSolutions.com

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