当前位置:网站首页>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;
}
边栏推荐
- @The difference and use of jsonformat and @datetimeformat
- 13 managing resources by objects
- Flutter报错 Incorrect use of ParentDataWidget When the exception was thrown, this was the stack:
- Software Testing Overview: the background, essence and process of software testing
- Sql Server 数据库之初学体验
- 微信公众号开发 获取openid时报错40029 invalid code 问题的解决
- pytest 用例执行顺序
- Bash shell学习笔记(四)
- SparseArray of the source code for novices
- Flutter CachedNetworkImage圆角
猜你喜欢

Bash shell学习笔记(一)

RT thread learning notes (VI) -- start the elmfat file system based on SPI flash (Part 1)

Bash shell learning notes (4)

Wireshark basic tutorial Ethernet frame analysis.

Bash shell learning notes (VII)

Newbie sees the source code arraydeque

Traversal recursion + iteration of binary tree

344.反转字符串

Bash shell学习笔记(六)

Flutter编译报错 version of NDK matched the requested version 21.0.6113669. Versions available locally: 2
随机推荐
pytest conftest.py和fixture的配合使用
0x00007FFD977C04A8 (Qt5Sqld.dll)处(位于 a.exe 中)引发的异常: 0xC0000005: 读取位置 0x0000000000000010 时发生访问冲突
菜鸟看源码之HashTable
Sql Server 数据库之数据类型
c 语言中宏参数的字符串化跟宏参数的连接
@The real difference and usage between validated and @valid
Flutter TextField设置高度并且自动换行,圆角边框去除下划线
Bash shell learning notes (V)
菜鸟看源码之ArrayList
11 handle "self assignment" in operator=
Esxi6.5 patch update
Bash shell学习笔记(三)
10 let operator= return a reference to *this
pytest 前后置方法
20210807 1 c language program structure
Flutter TextField怎样去除下划线及有焦点时颜色
Sword finger offer (52): regularization expression
Happens-Before原则深入解读
Pengge C language lesson 4 (3)
2021-08-12 function recursion_ Learn C language with brother Peng