|
-
August 12th, 2011, 11:17 AM
#6
Re: MFC Modeless dialog hangs
I have created a ModalDialog using thread
void CMenuDlg::OnBnClickedOk()
{
HANDLE hCommReadThread = CreateThread(NULL, 0, ThreadFunc, NULL, 0, NULL);
//hCommReadThread = CreateThread(NULL, 0, ThreadFunc, NULL, 0, NULL);
if (hCommReadThread != NULL)
{
CloseHandle(hCommReadThread);
hCommReadThread = NULL;
}
return;
}
DWORD WINAPI ThreadFunc(LPVOID lParam)
{
//Ctest oTest; Declared globally
oTest.DoModal();
return 1;
}
How can I now close the dialog on click of some button?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|