   MFC Document/View How to triger paint func?
  Hey all, I"m using MFC document view architecture.My question is how to triger the OnDraw function from the document.AppDoc - here found all the information about what i need to drawAppView - and here is the OnDraw functionI know that I used to triger OnDraw using InvalidateRectbut i dont know how to use it in Doc/View.PLZ help :)   
  CDocument::UpdateAllViews   ;  I see that UpdateAllViews work well from a member function which belongs to my CDocument calss, BUT I need to call this from a static function of my document.However, when I do call it from my static func I get a runtime error :/My static function is a thread Function.I had to build a parallel matrix row sorting program, so i wanted draw the state of the matrix after a thread finishes sorting each row.UINT CParallelMatrixSortDoc::ThreadFunc(LPVOID param){  CParallelMatrixSortDoc *p=(CParallelMatrixSortDoc *)param;   [the sroting ...]  //here i want to call OnDraw of my view  p->UpdateAllViews()};  I managed to call my View::OnDraw using:POSITION pos = GetFirstViewPosition();while (pos != NULL)   { CView* pView = GetNextView(pos); pView->UpdateWindow();  pView->Invalidate();   }  