// WaitDlgThread.h
#pragma once

#include <afxmt.h>

/////////////////////////////////////////////////////////////////////////////
// WaitDlgThread thread

class CWaitDlgThread : public CWinThread
{
	DECLARE_DYNCREATE(CWaitDlgThread)

public:
   CWaitDlgThread();           // protected constructor used by dynamic creation

protected:
// Attributes
   
public:
   CString  m_Text;
   CString  m_sTitle;
   bool m_bSetText;
   BOOL m_bShowDlg;
   bool m_bShowWaitDlg;
   HANDLE m_event_End;
   bool setPos;
   HWND windowPos;
   CWnd* m_pParentWnd;
   CWaitDlg* m_pDlgWnd;
   DWORD m_ParentThreadId; // Поток из которого был вызван текущий

	// Текущее кол-во Запущенных WaitDlg	
   static long st_iCurrentThreadCounter;

	// Разрешение нескольких WaitDlg одновременно	
   static bool st_bEnableMultipleWaitDialog;

// Operations
public:
	void SetText(LPCTSTR text=NULL, LPCTSTR title=NULL);
	void ShowWaitDlg(BOOL bShow);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(cWaitDlgThread)
	public:
	virtual BOOL InitInstance();
	virtual int ExitInstance();
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CWaitDlgThread();

protected:

	// Generated message map functions
	//{{AFX_MSG(cWaitDlgThread)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.


