using: Microsoft VC++ and MFC
I am trying to thread off a Dialog when I click on a button, that way I launch several dialogs from a particular Dialog.
example:
void CTestthreadDlg::OnButton1()
{
//does not allow acess to this dialog that is calling
AfxBeginThread(ThreadFunction, tm);
}
void CTestthreadDlg::OnButton2()
{
//this dialog will allow me access to this dialog that is calling after I click my messagboxes.
AfxMessageBox("START");
AfxBeginThread(ThreadFunction, tm);
AfxMessageBox("AFTER");
}
///////////////////////////////////////////////////////////////////////
UINT ThreadFunction(LPVOID pParm)
{
//AfxMessageBox("HELLO");
threadManager tm;
tm.DoModal();
return 0;
}