#pragma once

#include "ServerController.h"
#include "SortArray.h"

// CDirectoryListCtrl

class CDirectoryListCtrl : public CWnd
{
	DECLARE_DYNAMIC(CDirectoryListCtrl)

public:
	CDirectoryListCtrl();
	virtual ~CDirectoryListCtrl();
	void UpdateAll();

protected:
	DECLARE_MESSAGE_MAP()
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
public:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);


protected:
	void DrawListItem(CDC *pDC,int index,int fover,int fill=1);
	CString GetSettingString(CWorkspaceAccess info);
	
	void RedrawItem();
	int	GetItemCount();
	void SetupScroll();
	int GetPointItem(CPoint pt);

	CWorkspaceAccess		m_pathSetting;




	afx_msg void OnPaint();
public:
	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
};


