-
C 串行端口
C 串行端口
- 2022-02-06 09:53:22下载
- 积分:1
-
stk
基于MFC的STK卫星工开发包搭建方法和一些类的说明,来之不易啊(STK satellite workers MFC-based development kit to build a description of the methods and classes, the hard-won)
- 2020-09-17 10:27:56下载
- 积分:1
-
VC6.0 使用信号量Semaphore实现线程的同步
VC6.0 使用信号量Semaphore实现线程的同步,使用信号量实现线程同步,设置访问保护对象的最多线程数为2,确定当前已经启动运行的线程数目,可以创建线程。
CWinThread* pThread=AfxBeginThread(ThreadProc,&m_Edit);//开辟一个工作线程,
int thread=0;//全局变量记录当前运行线程的数目
CSemaphore mySemaphore(2,2);//创建CSemaphore类对象
UINT ThreadProc(LPVOID pParam)//工作线程入口函数
{
CEdit *pedit=(CEdit*)pParam;
CString str;
thread++;//线程数目加1
str.Format("%d",thread);
pedit->SetWindowText(str);//编辑框显示
CSingleLock singlelock(&mySemaphore);//创建CSingleLock类对象
singlelock.Lock();//计数器初始值减1
MessageBox(NULL,"信号量控制访问资源线程数","提示",MB_ICONWARNING);//弹出对话框
thread--;//线程数目减1
str.Format("%d",thread);
pedit->SetWindowText(str);//编辑框显示
return 0;
}
- 2022-02-20 19:37:49下载
- 积分:1
-
Crazy
说明: 绝影花了几分钟让自己平静下来,然后回过头来平静地对大爷说:“我想先写篇小说,题目叫《疯狂的程序员》。”(Shadow must take a few minutes to calm down, and then come back to Grandpa said calmly: " I would like to write a novel called" The mad programmer " ." )
- 2011-03-16 22:21:24下载
- 积分:1
-
Visual.C++.MFC编程实例
说明: 本书通过 85 个实例全面讲述了应用 MFC 进行 Visual C++编程的思想。(This book through 85 examples comprehensively describes the application of MFC for Visual C + + programming ideas.)
- 2021-03-19 22:06:43下载
- 积分:1
-
C
说明: c/c++中常见的错误以及分析。对初学者较为帮助。可以从中学到。(the c/c++ common errors. More help for beginners. Can learn.)
- 2012-12-23 21:23:44下载
- 积分:1
-
VC_DialogBox_Control
详细讲解了VC++访问对话框控件的方式,有独到的观点,值得参考。(Explain in detail the VC++ to access the dialog box controls the way a unique point of view, worth considering.)
- 2011-01-19 22:02:44下载
- 积分:1
-
C-plus-plus-From-The-Ground-Up
C++ 6 from the ground up by Herbert Schildt
- 2010-08-28 04:08:03下载
- 积分:1
-
VC++ 6.0 改变视图窗口的背景色
VC++ 改变视图窗口的背景色,在窗口的显示区自定义颜色,有兴趣可参考以下代码:
void CFaceControl1View::OnChageviewbk() //改变背景色
{
m_rgbBack=RGB(0,128,128);
Invalidate(true);
}
BOOL CFaceControl1View::OnEraseBkgnd(CDC* pDC)
{
CBrush Brush (m_rgbBack);// 创建一个新的刷子
CBrush* pOldBrush = pDC->SelectObject (&Brush);// 把刷子选入设备环境
//获得需要檫除背景的区域
CRect reClip;
GetClientRect(&reClip);
//重绘该区域
pDC->PatBlt(reClip.left , reClip.top , reClip.Width () , reClip.Height() , PATCOPY);
//释放刷子
pDC->SelectObject (pOldBrush);
return TRUE;//必须返回TURE
}
- 2022-08-04 05:28:13下载
- 积分:1
-
MFC-ODBC
基于MFC的窗口编程,连接了数据库的一个表,并使用MFC进行表操作(MFC-based windows programming, connected a table in the and table operations using MFC)
- 2014-10-30 19:01:27下载
- 积分:1