自己在外部设置变量来标记吧。如: m_bSuspend = FALSE;调用SuspendThread之后把m_bSuspend设置为TRUE调用ResumeThread之后把m_bSuspend设置为FALSE以后要查询是不是挂起,只要看这个变量就好了
解决方案 »
- mfc的工具栏(cmfctoolbar)的背景样式能改吗?
- VS调查了,大家快来啊!
- Windows Sockets
- 我在看Windows程序设计 一书,运行其中代码出错了,大家指教!
- m_pConnection.CreateInstancefq无法建立
- DLL中可以动态分配内存吗?
- 【一万】欢迎大家来程序人生聊天谈心,我们给大家准备的话题有:
- 属性页中找不到OnSetActive函数
- 头疼!各位用datagrid的朋友如何打印报表????
- MFC窗口显示顺序问题
- VC++中如何获取按钮的禁用/使用状态
- OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 中的pContext为啥为味NULL?
调用SuspendThread之后把m_bSuspend设置为TRUE
你怎么能做到这一点呢
The SuspendThread function suspends the specified thread. DWORD SuspendThread(
HANDLE hThread // handle to the thread
);
Parameters
hThread
Handle to the thread.
Windows NT: The handle must have THREAD_SUSPEND_RESUME access. Return Values
If the function succeeds, the return value is the thread's previous suspend count; otherwise, it is 0xFFFFFFFF. To get extended error information, use the GetLastError function.