当前位置:网站首页>MFC多线程的简单使用
MFC多线程的简单使用
2022-07-26 10:42:00 【Forest_1010】
int main()
{
CWinThread thread1(CreateLoginDlg,"Thread1");//定义一个线程对象
thread1.m_bAutoDelete=false;//线程结束的时候自动销毁对象
thread1.CreateThread();//创建线程
WaitForSingleObject(thread1.m_hThread,INFINITE);//等待线程执行完毕
return 0;
}
//线程执行函数
UINT CreateLoginDlg(LPVOID Param)
{
CLoginDlg *dlg=new CLoginDlg;
dlg->Create(IDD_DIALOG_LOGIN,NULL);
dlg->ShowWindow(SW_SHOW);
Sleep(10000);
return 0;
}
边栏推荐
- 10 令 operator= 返回一个 reference to *this
- Redis implementation of distributed lock solution
- Zongzi battle - guess who can win
- 剑指Offer(四十九):把字符串转换成整数
- Issue 8: cloud native -- how should college students learn in the workplace
- 2021-08-14三子棋
- 反射机制简述
- [leetcode每日一题2021/4/29]403. 青蛙过河
- [machine learning notes] [face recognition] deeplearning ai course4 4th week programming
- 10 let operator= return a reference to *this
猜你喜欢

oracle 启动不了 tnslistener服务启动不了
![[leetcode daily question 2021/4/29]403. Frogs cross the river](/img/fb/612777c77df5a611506e72f4f4c3c8.png)
[leetcode daily question 2021/4/29]403. Frogs cross the river
![[notes on machine learning] [building a cyclic neural network and its application] deeplearning ai course5 1st week programming(keras)](/img/02/f85da2a2f2524fb034b17ed8d06692.png)
[notes on machine learning] [building a cyclic neural network and its application] deeplearning ai course5 1st week programming(keras)

Oracle cannot start tnslistener service cannot start

Problems encountered in QRcode QR code (C language)

STM32 Alibaba cloud mqtt esp8266 at command

Uniapp uses the simple method signalr (only for web debugging, cannot package apps)

从蚂蚁的觅食过程看团队研发(转载)

flutter 背景变灰效果,如何透明度,灰色蒙板遮罩

Analysis of the transaction problem of chained method call
随机推荐
鹏哥C语言第四课(3)
MySQL速学笔记-2021-08-31
.net operation redis sorted set ordered set
RT-Thread 学习笔记(七)---开启基于SPI Flash的elmfat文件系统(中)
如何实现临时的图形要素现实
Datav beautiful data screen production experience
The problem of large fluctuation of hx711 data
SuperMap IClient for Leaflet 加载高斯克吕格投影三度分带CGCS2000大地坐标系WMTS服务
[paper after dinner] deep mining external perfect data for chestx ray disease screening
[leetcode daily question 2021/4/29]403. Frogs cross the river
[leetcode daily question 2021/8/31] 1109. Flight reservation statistics [medium] differential array
第4期:大学生提前职业技能准备之一
oracle 启动不了 tnslistener服务启动不了
反射机制简述
第5期:大学生入职必备技能之二
[leetcode daily question 2021/2/14]765. Lovers hold hands
MD5 encryption
[notes on machine learning] [building a cyclic neural network and its application] deeplearning ai course5 1st week programming(keras)
Problems encountered in QRcode QR code (C language)
Redis special data type usage scenarios