Hi,
I've a problem, which i don't know how to solve.
I've a class LoginDlg, which is defined this way
Dialog has one button, which has methodCode:class LoginDlg : public CDialog
In this method a I create a ThreadCode:void LoginDlg::OnBnClickedOk()
I want to call OnOK() method after pLoginThread finish its job. Part of code is:Code:pLoginThread = AfxBeginThread(LogIn, myUserInfo, THREAD_PRIORITY_NORMAL);
I really don't know, how to do it. So please, help meCode:UINT LogIn(LPVOID lParam) { // Any code... (Downloading file) return 1; } void LoginDlg::OnBnClickedOk() { CWinThread* pLoginThread = AfxBeginThread(LogIn, myUserInfo, THREAD_PRIORITY_NORMAL); // If i write OnOK() here, it doesn't wait on finishing thread }![]()




Reply With Quote