Hello,
I am Crating a thread in dialog based application where i am calling a function in the thread which should display the .jpg image to the static text control. but i am unable to display it on the static text control using thread. what is mistake i am doing in the below code,
void Fun()
{
CreateThread(0, 0, myThread, &myCounter, 0, NULL);
}
DWORD WINAPI myThread(LPVOID lpParameter)
{
unsigned int& myCounter = *((unsigned int*)lpParameter);
CRecognitionDlg* pDlg = (CRecognitionDlg*)lpParameter;
pDlg->PictureCount = 0;
pDlg->iCount = 0;
while(myCounter < 0xFFFFFFFF)
{
pDlg->ShowFacesForEnrollement();
if (pDlg->sFlag == FALSE)
{
break;
}
}
CloseHandle(myHandle);
return 0;
}
CPictureCtrl m_pFaceImages;
void dlg ShowFacesForEnrollement()
{
m_pFaceImages.Load(CString(_T("Normal.jpg")));
}
in the above code where i am doing wrong can anyone help me out.
Thanks in advance.