Click to See Complete Forum and Search --> : Update all views by CMainFrame


Thoemmi
April 29th, 1999, 09:01 AM
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

LALeonard
April 29th, 1999, 05:50 PM
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