如何在线程里面显示一个对话框?
我尝试以下代码不行....
//线程函数 - 显示一个对话框
DWORD WINAPI ThreadDialogWaitShow(LPVOID lpParameter)
{
CDialogTest *pCDialogTest= (CDialogTest*)lpParameter;
CDialogWait myCDialogWait;
//myCDialogWait.Create(IDD_DIALOG_WAIT, pCDialogTest);
//myCDialogWait.SetParent(pCDialogTest);
//myCDialogWait.ShowWindow(true);
myCDialogWait.DoModal();
return 0;
}
BOOL CDialogTest::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
HANDLE hthread;
hthread = CreateThread(NULL,0,ThreadDialogWaitShow,this, 0,NULL);
CloseHandle(hthread);
//做长时间工作
//做长时间工作
//做长时间工作
}
...全文


进程/线程/DLL
