当前位置:网站首页>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;
}
边栏推荐
- Asynctask < T> decoration and await are not used in synchronous methods to obtain asynchronous return values (asynchronous methods are called in synchronous methods)
- [notes on machine learning] [building a cyclic neural network and its application] deeplearning ai course5 1st week programming(keras)
- 剑指Offer(四十四):翻转单词顺序序列
- 控制随机抽中几率 [ C# | Random ]
- Successfully transplanted stemwin v5.22 on Shenzhou IV development board
- 构建ARM嵌入式开发环境
- C语言鹏哥20210812C语言函数
- 抽象工厂及其改进示例
- px2rem-loader将px转化为rem,适配移动端vant-UI等框架
- Issue 8: cloud native -- how should college students learn in the workplace
猜你喜欢
![[leetcode每日一题2021/2/14]765. 情侣牵手](/img/be/8639a05c733638bf0b3fdeb11abccf.png)
[leetcode每日一题2021/2/14]765. 情侣牵手

The problem of large fluctuation of hx711 data

Centos8 (liunx) deploying WTM (asp.net 5) using PgSQL

工厂模式详解

抽象工厂及其改进示例

el-table实现可编辑表格
控制随机抽中几率 [ C# | Random ]

Oracle cannot start tnslistener service cannot start

【机器学习小记】【人脸识别】deeplearning.ai course4 4th week programming

Issue 7: how do you choose between curling up and lying flat
随机推荐
第5期:大学生入职必备技能之二
Uniapp uses the simple method signalr (only for web debugging, cannot package apps)
Issue 8: cloud native -- how should college students learn in the workplace
Redis implementation of distributed lock solution
Dry goods likeshop takeout order system is open source, 100% open source, no encryption
[leetcode每日一题2021/8/30]528. 按权重随机选择【中等】
.net operation redis list list
13 managing resources by objects
SAP ABAP 守护进程的实现方式
[leetcode每日一题2021/8/31]1109. 航班预订统计【中等】差分数组
剑指Offer(五十二):正则化表达式
[paper after dinner] deep mining external perfect data for chestx ray disease screening
使用定位实现左中右布局,中间内容自适应
MySQL速学笔记-2021-08-31
GIS方法类期刊和论文的综述(Introduction)怎么写?
父类对子类的引用(父类引用指向子类对象)
[notes on machine learning] [building a cyclic neural network and its application] deeplearning ai course5 1st week programming(keras)
Sql Server之查询总结
Build ARM embedded development environment
Uninstall Meizu app store