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
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