www.pudn.com > LECTEUR-MP3.zip > WorkerThread.h


// WorkerThread.h: interface for the CWorkerThread class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_WORKERTHREAD_H__A381F965_0048_4FB9_A597_C702F16E06C6__INCLUDED_) 
#define AFX_WORKERTHREAD_H__A381F965_0048_4FB9_A597_C702F16E06C6__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
 
/**************************************** 
Thread qui s'occupe : 
Pour la lecture Normale : 
	-Calcule et affiche le temp écoulé 
Pour la playlist 
	-Calcule et affiche le temp ecouler 
	-Permet de switcher de fichier si la  
	lecture d'un se termine 
*****************************************/ 
class CWorkerThread   
{ 
public: 
  
	CWorkerThread(CView * pParam, CView * pPlayBar, CString * pStrTime); 
    virtual ~CWorkerThread(); 
    
    bool InitThread(); 
   	bool StopThread();  
	void PauseThread(bool bWait = true);  
 
	void SetWaitTime(int iWait)  
	{ 
		m_iWaitTime = iWait; 
	} 
	 
	bool IsStopped() {return m_bStop;} 
	void ChangePos(int iModif); 
 
     
private: 
 
    CWinThread * m_hThread; 
	bool m_bStop; 
	int m_iWaitTime; 
	int m_iTime; 
 
	 
	CView * m_pParam; 
	CView * m_pPlayBarView; 
	CString * m_pstrTime ; 
 
	static UINT TabThreadFunc(LPVOID pvParam); 
 
	HANDLE m_WaitThread; 
}; 
 
#endif // !defined(AFX_WORKERTHREAD_H__A381F965_0048_4FB9_A597_C702F16E06C6__INCLUDED_)