www.pudn.com > MultiThread.rar > MultiThread1Dlg.h
// MultiThread1Dlg.h : header file
//
#if !defined(AFX_MULTITHREAD1DLG_H__E825A2B8_8005_44CD_A82B_4BE6BB097CBD__INCLUDED_)
#define AFX_MULTITHREAD1DLG_H__E825A2B8_8005_44CD_A82B_4BE6BB097CBD__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CMultiThread1Dlg dialog
//添加线程函数声明
void ThreadFunc();//注意,线程函数的声明应在类CMultiThread1Dlg的外部
class CMultiThread1Dlg : public CDialog
{
// Construction
public:
CMultiThread1Dlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CMultiThread1Dlg)
enum { IDD = IDD_MULTITHREAD1_DIALOG };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMultiThread1Dlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
//在类CMultiThread1Dlg内部添加protected型变量:
HANDLE hThread;//线程的句柄
DWORD ThreadID;//线程ID。
// Generated message map functions
//{{AFX_MSG(CMultiThread1Dlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnStart();
afx_msg void OnStop();
afx_msg void OnChangeTime();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MULTITHREAD1DLG_H__E825A2B8_8005_44CD_A82B_4BE6BB097CBD__INCLUDED_)