Index: trunk/ab5.0/abdev/abdev/CFileInfo.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/CFileInfo.cpp	(revision 640)
+++ trunk/ab5.0/abdev/abdev/CFileInfo.cpp	(revision 651)
@@ -3,14 +3,11 @@
 #include "common.h"
 
-CFileInfo::CFileInfo(char *path,HTREEITEM hTreeItem){
-	m_path=(char *)HeapAlloc(hHeap,0,lstrlen(path)+1);
-	lstrcpy(m_path,path);
-	m_hTreeItem=hTreeItem;
-}
-CFileInfo::~CFileInfo(){
-	HeapDefaultFree(m_path);
+CFileInfo::CFileInfo( const std::string &filepath, HTREEITEM hTreeItem )
+	: filepath( filepath )
+	, m_hTreeItem( hTreeItem )
+{
 }
 void CFileInfo::GetFullPath(char *buffer){
-	lstrcpy(buffer,m_path);
+	lstrcpy(buffer,this->GetPath().c_str());
 	lstrcpy( buffer, projectInfo.GetWorkDir().GetFullPath( buffer ).c_str() );
 }
@@ -46,11 +43,16 @@
 	for(;i<iNum;i++) ppobj_FileInfo[i]=ppobj_FileInfo[i+1];
 }
-char *CDBFileInfo::GetPath(HTREEITEM hTreeItem){
-	int i;
-	for(i=0;i<iNum;i++){
-		if(ppobj_FileInfo[i]->m_hTreeItem==hTreeItem) break;
+const std::string &CDBFileInfo::GetPath(HTREEITEM hTreeItem)
+{
+	for( int i=0; i<iNum; i++ )
+	{
+		if(ppobj_FileInfo[i]->m_hTreeItem==hTreeItem)
+		{
+			return ppobj_FileInfo[i]->GetPath();
+		}
 	}
-	if(i==iNum) return 0;
-	return ppobj_FileInfo[i]->m_path;
+
+	_ASSERTE( false );
+	throw;
 }
 BOOL CDBFileInfo::IsMainFile(HTREEITEM hTreeItem){
@@ -68,5 +70,5 @@
 	TV_INSERTSTRUCT tv;
 
-	TreeView_DeleteAllItems(pobj_FileTree->hTree);
+	pobj_FileTree->DeleteAllItems();
 
 	tv.hInsertAfter=TVI_SORT;
@@ -77,15 +79,15 @@
 	tv.item.iSelectedImage=0;
 	tv.item.pszText="Source Files";
-	tv.hParent=TreeView_InsertItem(pobj_FileTree->hTree,&tv);
+	tv.hParent = pobj_FileTree->InsertItem( &tv );
 
 	int i;
 	char temporary[MAX_PATH],temp2[MAX_PATH];
 	for(i=0;i<iNum;i++){
-		_splitpath(ppobj_FileInfo[i]->m_path,0,0,temporary,temp2);
+		_splitpath(ppobj_FileInfo[i]->GetPath().c_str(),0,0,temporary,temp2);
 		lstrcat(temporary,temp2);
 		tv.item.iImage=2;
 		tv.item.iSelectedImage=2;
 		tv.item.pszText=temporary;
-		ppobj_FileInfo[i]->m_hTreeItem=TreeView_InsertItem(pobj_FileTree->hTree,&tv);
+		ppobj_FileInfo[i]->m_hTreeItem = pobj_FileTree->InsertItem( &tv );
 	}
 }
@@ -94,5 +96,5 @@
 	int i;
 	for(i=0;i<iNum;i++){
-		if(lstrcmpi(ppobj_FileInfo[i]->m_path,path)==0){
+		if(lstrcmpi(ppobj_FileInfo[i]->GetPath().c_str(),path)==0){
 			return 1;
 		}
Index: trunk/ab5.0/abdev/abdev/Common.h
===================================================================
--- trunk/ab5.0/abdev/abdev/Common.h	(revision 640)
+++ trunk/ab5.0/abdev/abdev/Common.h	(revision 651)
@@ -28,10 +28,4 @@
 #include "BREGEXP.H"
 #include "../compiler_x86/CommandValue.h"
-
-
-typedef struct _charrange { 
-    LONG cpMin;
-    LONG cpMax;
-} CHARRANGE;
 
 
@@ -413,9 +407,13 @@
 
 class CFileInfo{
+	std::string filepath;
 public:
-	char *m_path;
 	HTREEITEM m_hTreeItem;
-	CFileInfo(char *path,HTREEITEM hTreeItem);
-	~CFileInfo();
+	CFileInfo( const std::string &filepath, HTREEITEM hTreeItem );
+
+	const std::string &GetPath() const
+	{
+		return filepath;
+	}
 
 	void GetFullPath(char *buffer);
@@ -431,5 +429,5 @@
 	void add(char *path,HTREEITEM hTreeItem);
 	void del(HTREEITEM hTreeItem);
-	char *GetPath(HTREEITEM hTreeItem);
+	const std::string &GetPath(HTREEITEM hTreeItem);
 	BOOL IsMainFile(HTREEITEM hTreeItem);
 
@@ -648,5 +646,5 @@
 BOOL GetFilePathDialog(HWND hwnd,char *filename,LPSTR Filter,LPSTR Title,_int8 IsOpen);
 BOOL GetFolder(HWND hWnd,char *folder,char *OpenFolderTitle);
-int GetFileExtension(char *path);
+int GetFileExtension( const char *path );
 HWND OpenFileWithExtension( const std::string &filePath );
 BOOL SaveDocument(HWND hChild,char *SaveFileName);
Index: trunk/ab5.0/abdev/abdev/Debugger.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/Debugger.cpp	(revision 640)
+++ trunk/ab5.0/abdev/abdev/Debugger.cpp	(revision 651)
@@ -281,5 +281,5 @@
 //////////////////////////
 
-CFileBreakPoint::CFileBreakPoint(const char *lpszFileName,int iLineNum){
+BreakPointsPerFile::BreakPointsPerFile(const char *lpszFileName,int iLineNum){
 	this->lpszFileName=(char *)HeapAlloc(hHeap,0,lstrlen(lpszFileName)+1);
 	lstrcpy(this->lpszFileName,lpszFileName);
@@ -289,9 +289,9 @@
 	num=1;
 }
-CFileBreakPoint::~CFileBreakPoint(){
+BreakPointsPerFile::~BreakPointsPerFile(){
 	HeapDefaultFree(lpszFileName);
 	HeapDefaultFree(piLine);
 }
-void CFileBreakPoint::add(int iLineNum){
+void BreakPointsPerFile::add(int iLineNum){
 	piLine=(int *)HeapReAlloc(hHeap,0,piLine,(num+1)*sizeof(int));
 
@@ -309,5 +309,5 @@
 	num++;
 }
-void CFileBreakPoint::remove(int iLineNum){
+void BreakPointsPerFile::remove(int iLineNum){
 	int i;
 	for(i=0;i<num;i++){
@@ -321,5 +321,5 @@
 	}
 }
-BOOL CFileBreakPoint::check(int iLineNum){
+BOOL BreakPointsPerFile::check(int iLineNum){
 	int i;
 	for(i=0;i<num;i++){
@@ -329,5 +329,5 @@
 }
 
-void CFileBreakPoint::replace(LPSTR lpszBuffer,CHARRANGE *pDelRange,CHARRANGE *pRange,LPSTR lpszNewStr){
+void BreakPointsPerFile::replace(LPSTR lpszBuffer,CHARRANGE *pDelRange,CHARRANGE *pRange,LPSTR lpszNewStr){
 	int i;
 
@@ -379,5 +379,5 @@
 
 CDBBreakPoint::CDBBreakPoint(){
-	ppItem=(CFileBreakPoint **)HeapAlloc(hHeap,0,1);
+	ppItem=(BreakPointsPerFile **)HeapAlloc(hHeap,0,1);
 	num=0;
 }
@@ -399,6 +399,6 @@
 
 	if(i==num){
-		ppItem=(CFileBreakPoint **)HeapReAlloc(hHeap,0,ppItem,(num+1)*sizeof(CFileBreakPoint *));
-		ppItem[num]=new CFileBreakPoint(lpszFileName,iLineNum);
+		ppItem=(BreakPointsPerFile **)HeapReAlloc(hHeap,0,ppItem,(num+1)*sizeof(BreakPointsPerFile *));
+		ppItem[num]=new BreakPointsPerFile(lpszFileName,iLineNum);
 		num++;
 	}
@@ -503,5 +503,5 @@
 
 
-CFileBreakPoint *CDBBreakPoint::EnumLines(const char *lpszFilePath){
+BreakPointsPerFile *CDBBreakPoint::EnumLines(const char *lpszFilePath){
 	int i;
 	for(i=0;i<num;i++){
Index: trunk/ab5.0/abdev/abdev/Debugger.h
===================================================================
--- trunk/ab5.0/abdev/abdev/Debugger.h	(revision 640)
+++ trunk/ab5.0/abdev/abdev/Debugger.h	(revision 651)
@@ -46,5 +46,5 @@
 /////////////////////////////////
 
-class CFileBreakPoint{
+class BreakPointsPerFile{
 public:
 	char *lpszFileName;
@@ -53,6 +53,6 @@
 	int num;
 
-	CFileBreakPoint(const char *lpszFileName,int iLineNum);
-	~CFileBreakPoint();
+	BreakPointsPerFile(const char *lpszFileName,int iLineNum);
+	~BreakPointsPerFile();
 
 	void add(int iLineNum);
@@ -65,5 +65,5 @@
 
 class CDBBreakPoint{
-	CFileBreakPoint **ppItem;
+	BreakPointsPerFile **ppItem;
 	int num;
 
@@ -78,5 +78,5 @@
 	void SaveToTempFile(void);
 
-	CFileBreakPoint *EnumLines(const char *lpszFilePath);
+	BreakPointsPerFile *EnumLines(const char *lpszFilePath);
 
 	void replace(const char *lpszFilePath,LPSTR lpszBuffer,CHARRANGE *pDelRange,CHARRANGE *pRange,LPSTR lpszNewStr);
Index: trunk/ab5.0/abdev/abdev/DrawBuffer.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/DrawBuffer.cpp	(revision 640)
+++ trunk/ab5.0/abdev/abdev/DrawBuffer.cpp	(revision 651)
@@ -190,5 +190,5 @@
 
 			//ブレークポイントの描画を準備
-			CFileBreakPoint *pobj_FileBreakPoint=0;
+			BreakPointsPerFile *pobj_FileBreakPoint=0;
 			if( projectInfo.IsOpened() ){
 				pobj_FileBreakPoint=
Index: trunk/ab5.0/abdev/abdev/FileOperation.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/FileOperation.cpp	(revision 640)
+++ trunk/ab5.0/abdev/abdev/FileOperation.cpp	(revision 651)
@@ -271,5 +271,6 @@
 }
 
-int GetFileExtension(char *path){
+int GetFileExtension( const char *path )
+{
 	char temporary[MAX_PATH];
 	_splitpath(path,0,0,0,temporary);
Index: trunk/ab5.0/abdev/abdev/FileTree.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/FileTree.cpp	(revision 640)
+++ trunk/ab5.0/abdev/abdev/FileTree.cpp	(revision 651)
@@ -3,5 +3,5 @@
 #include "common.h"
 
-CFileTree *pobj_FileTree;
+FileListTreeViewCtrl *pobj_FileTree;
 
 WNDPROC OldFileTreeViewProc;
@@ -17,63 +17,64 @@
 	switch(message){
 		case WM_INITDIALOG:
-			SetPosCenter(hwnd);
-
-			hTreeItem=TreeView_GetSelection(pobj_FileTree->hTree);
-
-			char *path;
-			path=projectInfo.pobj_DBFileInfo->GetPath(hTreeItem);
-
-			//絶対パス、相対パスを表示
-			lstrcpy(temporary,path);
-			lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
-			SetDlgItemText(hwnd,IDC_USING_FILE,temporary);
-			SetDlgItemText(hwnd,IDC_DEFINED_FILE,path);
-
-			//最終更新日時を表示
-			hFile=CreateFile(temporary,GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
-			if(hFile==INVALID_HANDLE_VALUE){
-				//"エラー"
-				lstrcpy(temporary,STRING_ERROR);
-			}
-			else{
-				GetFileTime(hFile,NULL,NULL,&LastWriteTime);
-				FileTimeToLocalFileTime(&LastWriteTime,&LocalTime);
-				FileTimeToSystemTime(&LocalTime,&SystemTime);
-				if(SystemTime.wHour>=12){
-					//"午後 "
-					lstrcpy(temporary,STRING_AFTERNOON);
-					lstrcat(temporary," ");
-					SystemTime.wHour-=12;
+			{
+				SetPosCenter(hwnd);
+
+				hTreeItem = pobj_FileTree->GetSelectedItem();
+
+				std::string tempPath = projectInfo.pobj_DBFileInfo->GetPath(hTreeItem);
+
+				//絶対パス、相対パスを表示
+				lstrcpy( temporary, tempPath.c_str() );
+				lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
+				SetDlgItemText(hwnd,IDC_USING_FILE,temporary);
+				SetDlgItemText(hwnd,IDC_DEFINED_FILE,tempPath.c_str());
+
+				//最終更新日時を表示
+				hFile=CreateFile(temporary,GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
+				if(hFile==INVALID_HANDLE_VALUE){
+					//"エラー"
+					lstrcpy(temporary,STRING_ERROR);
 				}
 				else{
-					//"午前 "
-					lstrcpy(temporary,STRING_MORNING);
-					lstrcat(temporary," ");
+					GetFileTime(hFile,NULL,NULL,&LastWriteTime);
+					FileTimeToLocalFileTime(&LastWriteTime,&LocalTime);
+					FileTimeToSystemTime(&LocalTime,&SystemTime);
+					if(SystemTime.wHour>=12){
+						//"午後 "
+						lstrcpy(temporary,STRING_AFTERNOON);
+						lstrcat(temporary," ");
+						SystemTime.wHour-=12;
+					}
+					else{
+						//"午前 "
+						lstrcpy(temporary,STRING_MORNING);
+						lstrcat(temporary," ");
+					}
+					sprintf(temporary+5,"%02d:%02d:%02d %04d/%02d/%02d",
+						SystemTime.wHour,SystemTime.wMinute,SystemTime.wSecond,
+						SystemTime.wYear,SystemTime.wMonth,SystemTime.wDay);
+					CloseHandle(hFile);
 				}
-				sprintf(temporary+5,"%02d:%02d:%02d %04d/%02d/%02d",
-					SystemTime.wHour,SystemTime.wMinute,SystemTime.wSecond,
-					SystemTime.wYear,SystemTime.wMonth,SystemTime.wDay);
-				CloseHandle(hFile);
-			}
-			SetDlgItemText(hwnd,IDC_UPDATE_TIME,temporary);
-
-
-			//////////////
-			// 形式を表示
-			//////////////
-			i=GetFileExtension(path);
-
-			//"Basic プログラム"
-			if(i==FT_BASICPROGRAM) lstrcpy(temporary,STRING_FILETYPE_BASICPROGRAM);
-			//"サブ プログラム"
-			else if(i==FT_SUBPROGRAM) lstrcpy(temporary,STRING_FILETYPE_SUBPROGRAM);
-			//"テキスト ドキュメント"
-			else if(i==FT_TEXT) lstrcpy(temporary,STRING_FILETYPE_TEXT);
-			//"判別できません"
-			else lstrcpy(temporary,STRING_FILETYPE_UNKNOWN);
-
-			SetDlgItemText(hwnd,IDC_FILETYPE,temporary);
-
-			break;
+				SetDlgItemText(hwnd,IDC_UPDATE_TIME,temporary);
+
+
+				//////////////
+				// 形式を表示
+				//////////////
+				i=GetFileExtension(tempPath.c_str());
+
+				//"Basic プログラム"
+				if(i==FT_BASICPROGRAM) lstrcpy(temporary,STRING_FILETYPE_BASICPROGRAM);
+				//"サブ プログラム"
+				else if(i==FT_SUBPROGRAM) lstrcpy(temporary,STRING_FILETYPE_SUBPROGRAM);
+				//"テキスト ドキュメント"
+				else if(i==FT_TEXT) lstrcpy(temporary,STRING_FILETYPE_TEXT);
+				//"判別できません"
+				else lstrcpy(temporary,STRING_FILETYPE_UNKNOWN);
+
+				SetDlgItemText(hwnd,IDC_FILETYPE,temporary);
+
+				break;
+			}
 		case WM_COMMAND:
 			switch(LOWORD(wParam)){
@@ -93,5 +94,4 @@
 	HTREEITEM hTreeItem;
 	char temporary[MAX_PATH];
-	char *path;
 	switch(message){
 		case WM_COMMAND:
@@ -104,13 +104,14 @@
 					break;
 				case IDM_FILETREE_OPEN:
-					hTreeItem=TreeView_GetSelection(hwnd);
-
-					path=projectInfo.pobj_DBFileInfo->GetPath(hTreeItem);
-					if(!path) break;
-
-					lstrcpy(temporary,path);
-					lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
-					OpenFileWithExtension(temporary);
-					break;
+					{
+						hTreeItem=TreeView_GetSelection(hwnd);
+
+						std::string tempPath = projectInfo.pobj_DBFileInfo->GetPath(hTreeItem);
+
+						lstrcpy( temporary, tempPath.c_str() );
+						lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
+						OpenFileWithExtension(temporary);
+						break;
+					}
 				case IDM_FILETREE_DELETE:
 					hTreeItem=TreeView_GetSelection(hwnd);
@@ -141,11 +142,14 @@
 }
 
-CFileTree::CFileTree(HWND hParent){
-	hTree=CreateWindowEx(WS_EX_CLIENTEDGE,WC_TREEVIEW,"",
-		WS_CHILD|TVS_HASLINES|TVS_HASBUTTONS|TVS_LINESATROOT|TVS_SHOWSELALWAYS,
-		0,0,0,0,
-		hParent,0,hInst,0);
-	OldFileTreeViewProc=(WNDPROC)GetWindowLongPtr(hTree,GWLP_WNDPROC);
-	SetWindowLongPtr(hTree,GWLP_WNDPROC,(long)FileTreeViewProc);
+FileListTreeViewCtrl::FileListTreeViewCtrl( HWND hParent )
+	: CTreeViewCtrl()
+{
+	this->Create( hParent, NULL, NULL, 
+		WS_CHILD | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_SHOWSELALWAYS,
+		WS_EX_CLIENTEDGE
+	);
+
+	OldFileTreeViewProc=(WNDPROC)this->GetWindowLongPtr(GWLP_WNDPROC);
+	this->SetWindowLongPtr(GWLP_WNDPROC,(long)FileTreeViewProc);
 
 	//イメージリスト読み込み、設定
@@ -154,30 +158,36 @@
 	ImageList_AddIcon(hImageList,LoadIcon(hResInst,MAKEINTRESOURCE(IDI_FOLDER_OPEN)));
 	ImageList_AddIcon(hImageList,LoadIcon(hResInst,MAKEINTRESOURCE(IDI_TEXTDOCUMENT)));
-	TreeView_SetImageList(hTree,hImageList,TVSIL_NORMAL);
-}
-CFileTree::~CFileTree(){
-	DestroyWindow(hTree);
+	this->SetImageList(hImageList,TVSIL_NORMAL);
+}
+FileListTreeViewCtrl::~FileListTreeViewCtrl()
+{
+	this->DestroyWindow();
 	ImageList_Destroy(hImageList);
 }
 
-void CFileTree::ContextMenu(POINT *pPos){
+void FileListTreeViewCtrl::ContextMenu(POINT *pPos)
+{
 	//右クリックによるメニューを表示
 	TV_HITTESTINFO tvHitTestInfo;
 	tvHitTestInfo.pt=*pPos;
-	ScreenToClient(hTree,&tvHitTestInfo.pt);
-
-	HTREEITEM hTreeItem;
-	hTreeItem=TreeView_HitTest(hTree,&tvHitTestInfo);
+	this->ScreenToClient(&tvHitTestInfo.pt);
+
+	HTREEITEM hTreeItem = this->HitTest(&tvHitTestInfo);
 	if(hTreeItem){
-		TreeView_SelectItem(hTree,hTreeItem);
+		this->SelectItem(hTreeItem);
 
 		extern HMENU hFileTreeMenuBase;
-		if(TreeView_GetRoot(hTree)==hTreeItem)
-			TrackPopupMenu(GetSubMenu(hFileTreeMenuBase,0),TPM_LEFTALIGN,pPos->x,pPos->y,0,hTree,0);
-		else TrackPopupMenu(GetSubMenu(hFileTreeMenuBase,1),TPM_LEFTALIGN,pPos->x,pPos->y,0,hTree,0);
+		if(this->GetRootItem()==hTreeItem)
+		{
+			TrackPopupMenu(GetSubMenu(hFileTreeMenuBase,0),TPM_LEFTALIGN,pPos->x,pPos->y,0,this->m_hWnd,0);
+		}
+		else
+		{
+			TrackPopupMenu(GetSubMenu(hFileTreeMenuBase,1),TPM_LEFTALIGN,pPos->x,pPos->y,0,this->m_hWnd,0);
+		}
 	}
 }
 
-HTREEITEM CFileTree::insert(char *str){
+HTREEITEM FileListTreeViewCtrl::insert(char *str){
 	//////////////////////
 	//ツリービューに追加
@@ -188,11 +198,7 @@
 	tv.item.iImage=2;
 	tv.item.iSelectedImage=2;
-	tv.hParent=TreeView_GetRoot(hTree);
+	tv.hParent=this->GetRootItem();
 	tv.item.pszText=str;
 
-	return TreeView_InsertItem(hTree,&tv);
-}
-
-void CFileTree::resize(int x,int y,int cx,int cy){
-	MoveWindow(hTree,x,y,cx,cy,1);
-}
+	return this->InsertItem(&tv);
+}
Index: trunk/ab5.0/abdev/abdev/FileTree.h
===================================================================
--- trunk/ab5.0/abdev/abdev/FileTree.h	(revision 640)
+++ trunk/ab5.0/abdev/abdev/FileTree.h	(revision 651)
@@ -1,17 +1,16 @@
 
 
-class CFileTree{
+class FileListTreeViewCtrl
+	: public CTreeViewCtrl
+{
 	HIMAGELIST hImageList;
 public:
-	HWND hTree;
-	CFileTree(HWND hParent);
-	~CFileTree();
+	FileListTreeViewCtrl(HWND hParent);
+	~FileListTreeViewCtrl();
 
 	void ContextMenu(POINT *pPos);
 
 	HTREEITEM insert(char *str);
-
-	void resize(int x,int y,int cx,int cy);
 };
 
-extern CFileTree *pobj_FileTree;
+extern FileListTreeViewCtrl *pobj_FileTree;
Index: trunk/ab5.0/abdev/abdev/ParameterHint.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/ParameterHint.cpp	(revision 640)
+++ trunk/ab5.0/abdev/abdev/ParameterHint.cpp	(revision 651)
@@ -35,5 +35,5 @@
 	if( projectInfo.IsOpened() ){
 		//プロジェクトが開かれているとき
-		lstrcpy(temporary,projectInfo.pobj_DBFileInfo->ppobj_FileInfo[0]->m_path);
+		lstrcpy(temporary,projectInfo.pobj_DBFileInfo->ppobj_FileInfo[0]->GetPath().c_str());
 		lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 
Index: trunk/ab5.0/abdev/abdev/ProjectControl.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/ProjectControl.cpp	(revision 640)
+++ trunk/ab5.0/abdev/abdev/ProjectControl.cpp	(revision 651)
@@ -135,5 +135,5 @@
 								// 対象ファイルを開く
 								lstrcpy(temporary,
-									projectInfo.pobj_DBFileInfo->ppobj_FileInfo[pobj_ClassTreeView->pProcInfo[i].FileNum]->m_path);
+									projectInfo.pobj_DBFileInfo->ppobj_FileInfo[pobj_ClassTreeView->pProcInfo[i].FileNum]->GetPath().c_str());
 								lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 								hChild=OpenFileWithExtension(temporary);
@@ -403,5 +403,5 @@
 void ShowFileView(){
 	TabCtrl_SetCurSel(hProjectViewTab,0);
-	ShowWindow(pobj_FileTree->hTree,SW_SHOW);
+	pobj_FileTree->ShowWindow( SW_SHOW );
 	ShowWindow(hProcedureTreeView,SW_HIDE);
 	ShowWindow(hMaterialTreeView,SW_HIDE);
@@ -409,5 +409,5 @@
 void ShowClassView(){
 	TabCtrl_SetCurSel(hProjectViewTab,1);
-	ShowWindow(pobj_FileTree->hTree,SW_HIDE);
+	pobj_FileTree->ShowWindow( SW_HIDE );
 	ShowWindow(hMaterialTreeView,SW_HIDE);
 	ShowWindow(hProcedureTreeView,SW_SHOW);
@@ -415,5 +415,5 @@
 void ShowMaterialView(){
 	TabCtrl_SetCurSel(hProjectViewTab,2);
-	ShowWindow(pobj_FileTree->hTree,SW_HIDE);
+	pobj_FileTree->ShowWindow( SW_HIDE );
 	ShowWindow(hProcedureTreeView,SW_HIDE);
 	ShowWindow(hMaterialTreeView,SW_SHOW);
@@ -455,5 +455,5 @@
 
 			//ファイルツリービューを作成
-			pobj_FileTree=new CFileTree(hProjectViewTab);
+			pobj_FileTree = new FileListTreeViewCtrl( hProjectViewTab );
 
 			//クラスツリービューを作成
@@ -494,5 +494,5 @@
 			TreeView_SetImageList(hMaterialTreeView,hMaterialTreeViewImageList,TVSIL_NORMAL);
 
-			ShowWindow(pobj_FileTree->hTree,SW_SHOW);
+			pobj_FileTree->ShowWindow( SW_SHOW );
 			GetClientRect(hwnd,&rect);
 			SendMessage(hwnd,WM_SIZE,0,MAKELONG(rect.right,rect.bottom));
@@ -605,5 +605,5 @@
 				rect.bottom++;
 
-				pobj_FileTree->resize(rect.left,rect.top,rect.right-rect.left,rect.bottom-rect.top);
+				pobj_FileTree->MoveWindow(rect.left,rect.top,rect.right-rect.left,rect.bottom-rect.top);
 				MoveWindow(hProcedureTreeView,
 					rect.left,rect.top,rect.right-rect.left,rect.bottom-rect.top,1);
@@ -623,5 +623,5 @@
 				TabCtrl_AdjustRect(hProjectViewTab,FALSE,&rect);
 
-				pobj_FileTree->resize(rect.left,rect.top,rect.right-rect.left,rect.bottom-rect.top);
+				pobj_FileTree->MoveWindow(rect.left,rect.top,rect.right-rect.left,rect.bottom-rect.top);
 				MoveWindow(hProcedureTreeView,
 					rect.left,rect.top,rect.right-rect.left,rect.bottom-rect.top,1);
@@ -687,5 +687,5 @@
 
 	//ツリービューから削除
-	TreeView_DeleteItem(pobj_FileTree->hTree,hTreeItem);
+	pobj_FileTree->DeleteItem( hTreeItem );
 
 	//projectInfo.pobj_DBFileInfoオブジェクトから削除
@@ -1407,5 +1407,8 @@
 				temporary[i2]=buffer[i];
 			}
-			if(temporary[0]=='1') TreeView_Expand(pobj_FileTree->hTree,TreeView_GetRoot(pobj_FileTree->hTree),TVE_EXPAND);
+			if(temporary[0]=='1')
+			{
+				pobj_FileTree->Expand( pobj_FileTree->GetRootItem(), TVE_EXPAND );
+			}
 
 			for(i+=2,i2=0;;i++,i2++){
@@ -1529,5 +1532,8 @@
 				temporary[i2]=buffer[i];
 			}
-			if(temporary[0]=='1') TreeView_Expand(pobj_FileTree->hTree,TreeView_GetRoot(pobj_FileTree->hTree),TVE_EXPAND);
+			if(temporary[0]=='1')
+			{
+				pobj_FileTree->Expand( pobj_FileTree->GetRootItem(), TVE_EXPAND );
+			}
 
 			for(i+=2,i2=0;;i++,i2++){
@@ -1664,5 +1670,5 @@
 
 					sprintf(buffer+i2,"text,\"%s\",%d,%d,%d,%d\r\n",
-						projectInfo.pobj_DBFileInfo->ppobj_FileInfo[i]->m_path,
+						projectInfo.pobj_DBFileInfo->ppobj_FileInfo[i]->GetPath().c_str(),
 						pos.x,
 						pos.y,
@@ -1718,6 +1724,6 @@
 	memset(&tvItem,0,sizeof(TVITEM));
 	tvItem.mask=TVIF_HANDLE|TVIF_STATE;
-	tvItem.hItem=TreeView_GetRoot(pobj_FileTree->hTree);
-	TreeView_GetItem(pobj_FileTree->hTree,&tvItem);
+	tvItem.hItem = pobj_FileTree->GetRootItem();
+	pobj_FileTree->GetItem( &tvItem );
 	if(tvItem.state&TVIS_EXPANDED) i=1;
 	else i=0;
Index: trunk/ab5.0/abdev/abdev/abdev.vcproj
===================================================================
--- trunk/ab5.0/abdev/abdev/abdev.vcproj	(revision 640)
+++ trunk/ab5.0/abdev/abdev/abdev.vcproj	(revision 651)
@@ -2814,4 +2814,8 @@
 				Name="ProjectManager"
 				>
+				<File
+					RelativePath=".\include\ProjectManager\FileManager.h"
+					>
+				</File>
 				<File
 					RelativePath=".\include\ProjectManager\ProjectManager.h"
Index: trunk/ab5.0/abdev/abdev/include/ProjectManager/FileManager.h
===================================================================
--- trunk/ab5.0/abdev/abdev/include/ProjectManager/FileManager.h	(revision 651)
+++ trunk/ab5.0/abdev/abdev/include/ProjectManager/FileManager.h	(revision 651)
@@ -0,0 +1,34 @@
+#pragma once
+
+namespace ActiveBasic{ namespace PM{ namespace FM{
+
+
+class ItemBase
+{
+};
+
+class File
+	: public ItemBase
+{
+	std::string relationalPath;
+};
+typedef std::vector<File> Files;
+
+class Folder;
+typedef std::vector<Folder> Folders;
+
+class Folder
+	: public ItemBase
+{
+	Files files;
+	Folders folders;
+};
+
+class FileSystem
+{
+	Files files;
+	Folders folders;
+};
+
+
+}}}
Index: trunk/ab5.0/abdev/abdev/src/ProjectManager/ProjectManager.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/src/ProjectManager/ProjectManager.cpp	(revision 640)
+++ trunk/ab5.0/abdev/abdev/src/ProjectManager/ProjectManager.cpp	(revision 651)
@@ -343,5 +343,5 @@
 	i2+=lstrlen(buffer+i2);
 	for(i=0;i<this->pobj_DBFileInfo->iNum;i++){
-		sprintf(buffer+i2,"%s\r\n",this->pobj_DBFileInfo->ppobj_FileInfo[i]->m_path);
+		sprintf(buffer+i2,"%s\r\n",this->pobj_DBFileInfo->ppobj_FileInfo[i]->GetPath().c_str());
 		i2+=lstrlen(buffer+i2);
 	}
@@ -476,5 +476,5 @@
 		for(i=1;i<this->pobj_DBFileInfo->iNum;i++){
 			//メインファイルは含まない
-			sprintf(buffer+i2,"#include \"%s\"\r\n",this->pobj_DBFileInfo->ppobj_FileInfo[i]->m_path);
+			sprintf(buffer+i2,"#include \"%s\"\r\n",this->pobj_DBFileInfo->ppobj_FileInfo[i]->GetPath().c_str());
 			i2+=lstrlen(buffer+i2);
 			lstrcpy(buffer+i2,"_ClearNamespaceImported\r\n");
@@ -624,5 +624,5 @@
 	extern HWND hProcedureTreeView;
 	extern HWND hMaterialTreeView;
-	TreeView_DeleteAllItems(pobj_FileTree->hTree);
+	pobj_FileTree->DeleteAllItems();
 	TreeView_DeleteAllItems(hProcedureTreeView);
 	TreeView_DeleteAllItems(hMaterialTreeView);
Index: trunk/ab5.0/abdev/abdev/stdafx.h
===================================================================
--- trunk/ab5.0/abdev/abdev/stdafx.h	(revision 640)
+++ trunk/ab5.0/abdev/abdev/stdafx.h	(revision 651)
@@ -26,4 +26,5 @@
 #include <atlcrack.h>
 #include <atlmisc.h>
+#include <atlctrls.h>
 
 //boost libraries
@@ -56,3 +57,4 @@
 #include "Common.h"
 
+#include <ProjectManager/FileManager.h>
 #include <ProjectManager/ProjectManager.h>
