#pragma once
#include "WndCtrl.h"


#define MAX_CHANNEL 64

class CWndManager:public CWnd
{
public:
	CWndManager(void);

	~CWndManager(void);

private:
	CWndCtrl *m_pWndCtrl[MAX_CHANNEL];
	unsigned int m_iXRow;
	unsigned int m_iYRow;
	
	unsigned int m_iCurShow;
	DECLARE_MESSAGE_MAP()
	afx_msg void OnSize(UINT nType, int cx, int cy);

	int m_iWidth, m_iHeight;

public:
	void   OpenDigitZoom(BOOL bOpen, int lPlayID);
	void FullScreen();
	void EndFullScreen();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	void SetWndSize(int iW, int iH);
	HWND GetCurSelWnd();
	
	int  m_iCurSelWndIndex;
	void SetWndUser(HWND hWnd, LPCTSTR strKey);
	CString GetWndUser(HWND hWnd);
	void ClearWndUser();
	void SetViewWnd(int x, int y);
	void SetCurSelWnd(int iIndex);
	long GetCurWndUser(CString& csName);

private:
	WINDOWPLACEMENT m_wndpl;
	HBRUSH m_hBrush;
	int m_iRow, m_iCol;
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	afx_msg void OnPaint();
	int ReLayoutWnd();

	
};
