当前位置:网站首页>Simple use of MFC multithreading
Simple use of MFC multithreading
2022-07-26 10:54:00 【Forest_ one thousand and ten】
int main()
{
CWinThread thread1(CreateLoginDlg,"Thread1");// Define a thread object
thread1.m_bAutoDelete=false;// Automatically destroy objects when the thread ends
thread1.CreateThread();// Create thread
WaitForSingleObject(thread1.m_hThread,INFINITE);// Wait for the thread to finish executing
return 0;
}
// Thread execution function
UINT CreateLoginDlg(LPVOID Param)
{
CLoginDlg *dlg=new CLoginDlg;
dlg->Create(IDD_DIALOG_LOGIN,NULL);
dlg->ShowWindow(SW_SHOW);
Sleep(10000);
return 0;
}
边栏推荐
猜你喜欢

20210807 1 c language program structure

Bash shell学习笔记(一)

Bash shell学习笔记(六)

RT thread learning notes (III) -- building a compilation environment with scons

postman 导出导入

菜鸟看源码之LinkedBlockingQueue

Wireshark basic tutorial Ethernet frame analysis.

二叉树的遍历 递归+迭代

Traversal recursion + iteration of binary tree

RT thread learning notes (VII) -- open the elmfat file system based on SPI flash (middle)
随机推荐
pytest 前后置方法
mysql学习笔记
27.移除元素
很多人都不清楚自己找的是Kanban软件还是看板软件
Koin
Wechat official account message notice "errCode": 40164, "errmsg": "invalid IP
Sql Server之查询总结
Implementing queues with two stacks
postman 导出导入
菜鸟看源码之LinkedBlockingQueue
242.有效的字母异位词
flutter 背景变灰效果,如何透明度,灰色蒙板遮罩
SCADA和三大工业控制系统PLC、DCS、FCS
RT thread learning notes (III) -- building a compilation environment with scons
Bash shell learning notes (4)
Shell script fails to execute repeatedly automatically
pytest pytest.ini配置 用例分组 用例跳过
Tutorial of putty
Bash shell learning notes (V)
11 handle "self assignment" in operator=