?? _afxwin.h
字號:
#include "_afxstat_.h"
extern CThreadSlotData* _afxThreadData;
typedef UINT (__cdecl *AFX_THREADPROC)(LPVOID);
class CWinThread
{
public:
// 線程對象的初始化(Constructors)
CWinThread();
BOOL CreateThread(DWORD dwCreateFlags = 0, UINT nStackSize = 0,
LPSECURITY_ATTRIBUTES lpSecurityAttrs = NULL);
// 保存和設置線程對象特有的屬性(Attributes)
BOOL m_bAutoDelete; // 指示在線程結束后,是否要銷毀此對象
HANDLE m_hThread;
DWORD m_nThreadID;
operator HANDLE() const
{ return this == NULL ? NULL : m_hThread; }
int GetThreadPriority()
{ return ::GetThreadPriority(m_hThread); }
BOOL SetThreadPriority(int nPriority)
{ return ::SetThreadPriority(m_hThread, nPriority); }
// 對線程的操作(Operations)
DWORD SuspendThread()
{ return ::SuspendThread(m_hThread); }
DWORD ResumeThread()
{ return ::ResumeThread(m_hThread); }
// 具體實現(Implementation)
public:
virtual ~CWinThread();
virtual void Delete();
void CommonConstruct();
public:
CWinThread(AFX_THREADPROC pfnThreadProc, LPVOID pParam);
LPVOID m_pThreadParams; // 用戶傳遞給新線程的參數
AFX_THREADPROC m_pfnThreadProc; // 線程函數的地址
};
// 提供給用戶使用的全局函數
CWinThread* AfxBeginThread(AFX_THREADPROC pfnThreadProc, LPVOID pParam,
int nPriority = THREAD_PRIORITY_NORMAL, UINT nStackSize = 0,
DWORD dwCreateFlags = 0, LPSECURITY_ATTRIBUTES lpSecurityAttrs = NULL);
CWinThread* AfxGetThread();
void AfxEndThread(UINT nExitCode, BOOL bDelete = TRUE);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -