Bonjour,
Voila j'aimerais pouvoir lancer une dialog (DisplayDlg) depuis un Thread(ThreadDisplay)
DisplayDlg est de Type CDialog
Et ThreadDisplay est une classe utilisant _beginthreadex(0,0,ThreadDisplayFunc,this,0,&(this->Id)); pour se lancer.
dans ThreadDisplayFunc j'ai :
inlineunsignedint__stdcall CThreadDisplay::ThreadDisplayFunc(void *pvParam)
{
SetThreadPriority(GetCurrentThread(),THREAD_PRIORITY_ABOVE_NORMAL );
CThreadDisplay *pThis=reinterpret_cast< CThreadDisplay *>( pvParam) ;
pThis->Display = new DisplayDlg(pThis->Parent);
// pThis->Display->Create(IDD_Display,pThis->Parent);
// pThis->Display->ShowWindow(SW_SHOW);
// pThis->Display->EnableWindow(1);
pThis->Display->DoModal();
Le DoModal() ca marche pas et le Create() non plus j'ai pourtant cru comprendre que c'était possible de lancer une dialog depuis un thread!!!!
Vous voyez le prob?
Le but étant d'effectuer les opérations d'affichage d'un preview (display toutes les X milisecondes) dans un thread séparé pour ne pas figer l'interface principale!
Merci!
Ps : j'ai pris soins d'include ma classe DisplayDlg dans le fichier de ma classe CThreadDisplay
---Perig---
Pour vous servir 
Et parfois en galère 
Souvent même 