Accéder a une splitter view depuis un thread
Slt a tous,
j'ai une application SDI splittée avec 4 panes. J'ai ajouter un bouton dans la toolbar, si bien que j arrive a ma fonction CMyApp::MyFunction.
Dans cette fonction j arrive a avoir ma vue sans probleme en utilisant :
Code:
1 2 3 4 5 6 7 8 9
|
CBottomView* CDigicontApp::GetBottomView()
{
CMainFrame *pFrame=static_cast<CMainFrame*>( AfxGetMainWnd());
CBottomView*pView=static_cast<CBottomView*>(pFrame->m_wndSplitter.GetPane(1,1));
ASSERT(pView->IsKindOf(RUNTIME_CLASS(CBottomView)));
return pView;
} |
Probleme est que si dans ma fonction CMyApp::MyFunction, je cree un thread, dans ce meme thread l'appel a CDigicontApp::GetBottomView() ASSERT, ca ne marche pas...
Comment accéder a ma vue depuis ce thread, car je dois absolument ecrire des informations en temps reel dans cette bottomView.
Merci