Bonjours voila je cherche a recuperer la valeurs de 3 variables situé a
l'interieure d'un thread et je voie pas comment faire qq peut 'il
m'aider (il s'agit des variables strHeure strMin strSec)
UINT ThreadHorloge(LPVOID pParam)
{
CHologe* pObject = (CHologe*)pParam;
bool bTopSeconde=false;
CTime horloge /*= CTime::GetCurrentTime()*/;
int nHeure;
int nMin;
int nSec;
CString strHeure;
CString strMin;
CString strSec;
while(pObject->m_bFin!=true)
{
horloge = CTime::GetCurrentTime();
nHeure=horloge.GetHour();
nMin=horloge.GetMinute();
nSec=horloge.GetSecond();
/*CStatic * heure=(CStatic *)pObject->GetDlgItem(IDC_TEXT_HEURE);
CStatic * min=(CStatic *)pObject->GetDlgItem(IDC_TEXT_MIN);
CStatic * sec=(CStatic *)pObject->GetDlgItem(IDC_TEXT_SEC);*/
strHeure.Format("%d",nHeure);
strMin.Format("%d",nMin);
strSec.Format("%d",nSec);
/*heure->SetWindowText(strHeure);
min->SetWindowText(strMin);
sec->SetWindowText(strSec);
pObject->Invalidate();*/
Sleep(1000);
}
return 1;
}