Index: /trunk/ab5.0/abdev/abdev/CFileInfo.cpp
===================================================================
--- /trunk/ab5.0/abdev/abdev/CFileInfo.cpp	(revision 619)
+++ /trunk/ab5.0/abdev/abdev/CFileInfo.cpp	(revision 620)
@@ -13,5 +13,5 @@
 void CFileInfo::GetFullPath(char *buffer){
 	lstrcpy(buffer,m_path);
-	::GetFullPath(buffer,projectInfo.dir);
+	lstrcpy( buffer, projectInfo.GetWorkDir().GetFullPath( buffer ).c_str() );
 }
 
Index: /trunk/ab5.0/abdev/abdev/Common.h
===================================================================
--- /trunk/ab5.0/abdev/abdev/Common.h	(revision 619)
+++ /trunk/ab5.0/abdev/abdev/Common.h	(revision 620)
@@ -667,10 +667,10 @@
 _int8 WriteBuffer_NonErrMsg(char *path,char *buffer,int length);
 void GetRelationalPath(char *path,char *dir);
-void GetFullPath(char *path,char *dir);
+void GetFullPath(char *path,const char *dir);
 void RemoveDirectoryStrong(const char *dirPath);
 BOOL GetFilePathDialog(HWND hwnd,char *filename,LPSTR Filter,LPSTR Title,_int8 IsOpen);
 BOOL GetFolder(HWND hWnd,char *folder,char *OpenFolderTitle);
 int GetFileExtension(char *path);
-HWND OpenFileWithExtension(char *OpenFileName);
+HWND OpenFileWithExtension( const std::string &filePath );
 BOOL SaveDocument(HWND hChild,char *SaveFileName);
 BOOL ShortPathToLongPath(char ShortPath[MAX_PATH],char *LongPath);
@@ -1092,5 +1092,5 @@
 void AddIconType(int WndNum,int IconType);
 void DeleteIconType(int WndNum);
-void NewIconEditWindow(char *filepath);
+void NewIconEditWindow(const char *filepath);
 void SaveIconFile(char *filepath,HWND hwnd);
 LRESULT CALLBACK MDIClientWindow_IconEdit(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
Index: /trunk/ab5.0/abdev/abdev/DocumentAdvice.cpp
===================================================================
--- /trunk/ab5.0/abdev/abdev/DocumentAdvice.cpp	(revision 619)
+++ /trunk/ab5.0/abdev/abdev/DocumentAdvice.cpp	(revision 620)
@@ -118,5 +118,5 @@
 }
 
-char *reflexive_Include(char *buffer,char ***pppFilePath,int *pFileNum,char *pDefaultDir){
+char *reflexive_Include(char *buffer,char ***pppFilePath,int *pFileNum,const char *pDefaultDir){
 	extern HANDLE hHeap;
 	int i,i2,i3,i4,sw1,sw2,FileSize;
@@ -255,7 +255,7 @@
 
 	//参照ディレクトリ
-	char *pDefaultDir;
+	const char *pDefaultDir;
 	if( projectInfo.IsOpened() )
-		pDefaultDir=projectInfo.dir;
+		pDefaultDir=projectInfo.GetWorkDir().GetPath().c_str();
 	else pDefaultDir=pj_editor_Dir;
 
Index: /trunk/ab5.0/abdev/abdev/DrawWindow.cpp
===================================================================
--- /trunk/ab5.0/abdev/abdev/DrawWindow.cpp	(revision 619)
+++ /trunk/ab5.0/abdev/abdev/DrawWindow.cpp	(revision 620)
@@ -997,5 +997,5 @@
 		if(i2!=projectInfo.res.NumberOfBitmapRes){
 			lstrcpy(temporary,projectInfo.res.pBitmapResInfo[i2].path);
-			GetFullPath(temporary,projectInfo.dir);
+			lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 			hImage=LoadImage(NULL,temporary,IMAGE_BITMAP,0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE);
 
@@ -1366,5 +1366,5 @@
 					lstrcpy(temporary,projectInfo.res.pIconResInfo[i2].path);
 				}
-				GetFullPath(temporary,projectInfo.dir);
+				lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 				hImage=LoadImage(NULL,temporary,IMAGE_ICON,0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE);
 				if(hImage){
@@ -1410,5 +1410,5 @@
 					lstrcpy(temporary,projectInfo.res.pBitmapResInfo[i2].path);
 				}
-				GetFullPath(temporary,projectInfo.dir);
+				lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 				hImage=LoadImage(NULL,temporary,IMAGE_BITMAP,0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE);
 				if(hImage){
Index: /trunk/ab5.0/abdev/abdev/FileOperation.cpp
===================================================================
--- /trunk/ab5.0/abdev/abdev/FileOperation.cpp	(revision 619)
+++ /trunk/ab5.0/abdev/abdev/FileOperation.cpp	(revision 620)
@@ -136,5 +136,5 @@
 	lstrcpy(path,temp3);
 }
-void GetFullPath(char *path,char *dir){
+void GetFullPath(char *path,const char *dir){
 	int i,i2,i3,i4;
 	char temporary[MAX_PATH];
@@ -290,7 +290,11 @@
 	return FT_OTHER;
 }
-HWND OpenFileWithExtension(char *OpenFileName){
+HWND OpenFileWithExtension( const std::string &filePath )
+{
 	int i;
 	_int8 DocumentType;
+
+	// TODO:
+	char *OpenFileName = const_cast<char *>(filePath.c_str());
 
 	i=GetFileExtension(OpenFileName);
@@ -348,5 +352,5 @@
 
 		if(projectInfo.ModifyOfMaterial){
-			sprintf(temporary,"%s%s.wnd",projectInfo.dir,projectInfo.GetName().c_str());
+			sprintf(temporary,"%s%s.wnd",projectInfo.GetWorkDir().GetPath().c_str(),projectInfo.GetName().c_str());
 			SaveWindowFile( temporary, projectInfo.windowInfos );
 
Index: /trunk/ab5.0/abdev/abdev/FileTree.cpp
===================================================================
--- /trunk/ab5.0/abdev/abdev/FileTree.cpp	(revision 619)
+++ /trunk/ab5.0/abdev/abdev/FileTree.cpp	(revision 620)
@@ -26,5 +26,5 @@
 			//絶対パス、相対パスを表示
 			lstrcpy(temporary,path);
-			GetFullPath(temporary,projectInfo.dir);
+			lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 			SetDlgItemText(hwnd,IDC_USING_FILE,temporary);
 			SetDlgItemText(hwnd,IDC_DEFINED_FILE,path);
@@ -110,5 +110,5 @@
 
 					lstrcpy(temporary,path);
-					GetFullPath(temporary,projectInfo.dir);
+					lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 					OpenFileWithExtension(temporary);
 					break;
Index: /trunk/ab5.0/abdev/abdev/IconEditor.cpp
===================================================================
--- /trunk/ab5.0/abdev/abdev/IconEditor.cpp	(revision 619)
+++ /trunk/ab5.0/abdev/abdev/IconEditor.cpp	(revision 620)
@@ -237,5 +237,5 @@
 	InvalidateRect(MdiInfo[WndNum].MdiIconEditInfo->hColorDlg,NULL,0);
 }
-void NewIconEditWindow(char *filepath){
+void NewIconEditWindow(const char *filepath){
 	extern HINSTANCE hInst,hResInst;
 	extern HANDLE hHeap;
Index: /trunk/ab5.0/abdev/abdev/MessageCallOperation.cpp
===================================================================
--- /trunk/ab5.0/abdev/abdev/MessageCallOperation.cpp	(revision 619)
+++ /trunk/ab5.0/abdev/abdev/MessageCallOperation.cpp	(revision 620)
@@ -41,6 +41,5 @@
 	CallBackNameLen=lstrlen(pWindowInfo->CallBackName);
 
-	sprintf(temporary,"%s%s",projectInfo.dir,pWindowInfo->filepath);
-	buffer=ReadBuffer(temporary);
+	buffer = ReadBuffer( projectInfo.GetWorkDir().GetPath() + pWindowInfo->filepath );
 
 	*num=0;
@@ -138,6 +137,5 @@
 	WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum];
 
-	sprintf(temporary,"%s%s",projectInfo.dir,pWindowInfo->filepath);
-	hChild=OpenFileWithExtension(temporary);
+	hChild=OpenFileWithExtension( projectInfo.GetWorkDir().GetPath() + pWindowInfo->filepath );
 	if(!hChild) return;
 	WndNum=GetWndNum(hChild);
Index: /trunk/ab5.0/abdev/abdev/ParameterHint.cpp
===================================================================
--- /trunk/ab5.0/abdev/abdev/ParameterHint.cpp	(revision 619)
+++ /trunk/ab5.0/abdev/abdev/ParameterHint.cpp	(revision 620)
@@ -36,5 +36,5 @@
 		//プロジェクトが開かれているとき
 		lstrcpy(temporary,projectInfo.pobj_DBFileInfo->ppobj_FileInfo[0]->m_path);
-		GetFullPath(temporary,projectInfo.dir);
+		lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 
 		extern MDIINFO MdiInfo[MAX_WNDNUM];
Index: /trunk/ab5.0/abdev/abdev/ProjectControl.cpp
===================================================================
--- /trunk/ab5.0/abdev/abdev/ProjectControl.cpp	(revision 619)
+++ /trunk/ab5.0/abdev/abdev/ProjectControl.cpp	(revision 620)
@@ -137,5 +137,5 @@
 								lstrcpy(temporary,
 									projectInfo.pobj_DBFileInfo->ppobj_FileInfo[pobj_ClassTreeView->pProcInfo[i].FileNum]->m_path);
-								GetFullPath(temporary,projectInfo.dir);
+								lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 								hChild=OpenFileWithExtension(temporary);
 							}
@@ -194,5 +194,5 @@
 						if(projectInfo.res.pIconResInfo[i].hTreeItem==hTreeItem){
 							lstrcpy(temporary,projectInfo.res.pIconResInfo[i].path);
-							GetFullPath(temporary,projectInfo.dir);
+							lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 							NewIconEditWindow(temporary);
 							break;
@@ -649,5 +649,5 @@
 	char temporary[MAX_PATH],temp2[MAX_PATH];
 
-	GetRelationalPath(path,projectInfo.dir);
+	lstrcpy( path, projectInfo.GetWorkDir().GetRelationalPath( path ).c_str() );
 
 	//重複チェック
@@ -1273,5 +1273,5 @@
 								temporary[i3]=temp2[i2];
 							}
-							GetFullPath(temporary,projectInfo.dir);
+							lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 							hChild=OpenFileWithExtension(temporary);
 							WndNum=GetWndNum(hChild);
@@ -1355,6 +1355,5 @@
 							for(i3=0;i3<projectInfo.res.NumberOfIconRes;i3++){
 								if(lstrcmpi(projectInfo.res.pIconResInfo[i3].path,temp2)==0){
-									GetFullPath(temp2,projectInfo.dir);
-									NewIconEditWindow(temp2);
+									NewIconEditWindow( projectInfo.GetWorkDir().GetFullPath( temp2 ).c_str() );
 									break;
 								}
@@ -1448,5 +1447,5 @@
 							lstrcpy(temporary,temp2+i3+1);
 							temp2[i3]=0;
-							GetFullPath(temporary,projectInfo.dir);
+							lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 							sscanf(temp2,"%d",&i3);
 
@@ -1477,6 +1476,5 @@
 							for(i3=0;i3<projectInfo.res.NumberOfIconRes;i3++){
 								if(lstrcmpi(projectInfo.res.pIconResInfo[i3].path,temp2)==0){
-									GetFullPath(temp2,projectInfo.dir);
-									NewIconEditWindow(temp2);
+									NewIconEditWindow( projectInfo.GetWorkDir().GetFullPath( temp2 ).c_str() );
 									break;
 								}
@@ -1591,5 +1589,5 @@
 				for(i=0;i<projectInfo.res.NumberOfIconRes;i++){
 					lstrcpy(temporary,projectInfo.res.pIconResInfo[i].path);
-					GetFullPath(temporary,projectInfo.dir);
+					lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 					if(lstrcmpi(MdiInfo[WndNum].path,temporary)==0) sw=1;
 				}
@@ -1678,5 +1676,5 @@
 			for(i=0;i<projectInfo.res.NumberOfIconRes;i++){
 				lstrcpy(temporary,projectInfo.res.pIconResInfo[i].path);
-				GetFullPath(temporary,projectInfo.dir);
+				lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 				if(lstrcmpi(MdiInfo[WndNum].path,temporary)==0){
 					sprintf(buffer+i2,"icon,%s\r\n",projectInfo.res.pIconResInfo[i].path);
@@ -1730,5 +1728,5 @@
 
 	//保存
-	sprintf(temporary,"%s%s.wrk",projectInfo.dir,projectInfo.GetName().c_str());
+	sprintf(temporary,"%s%s.wrk",projectInfo.GetWorkDir().GetPath().c_str(),projectInfo.GetName().c_str());
 	WriteBuffer(temporary,buffer,i2);
 }
@@ -1763,5 +1761,5 @@
 				for(i=0;i<projectInfo.res.NumberOfIconRes;i++){
 					lstrcpy(temporary,projectInfo.res.pIconResInfo[i].path);
-					GetFullPath(temporary,projectInfo.dir);
+					lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 					if(lstrcmpi(MdiInfo[WndNum].path,temporary)==0){
 						SaveDocument(hChild,NULL);
@@ -1824,5 +1822,5 @@
 
 	//保存
-	sprintf(temporary,"%s%s.pj",projectInfo.dir,projectInfo.GetName().c_str());
+	sprintf(temporary,"%s%s.pj",projectInfo.GetWorkDir().GetPath().c_str(),projectInfo.GetName().c_str());
 	WriteBuffer(temporary,buffer,i2);
 
@@ -1854,5 +1852,5 @@
 		//保存（resource.ab）
 		lstrcpy(temporary,"resource.ab");
-		GetFullPath(temporary,projectInfo.dir);
+		lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 		WriteBuffer(temporary,buffer,i2);
 
@@ -1886,5 +1884,5 @@
 		//保存
 		lstrcpy(temporary,projectInfo.ResourceFileName);
-		GetFullPath(temporary,projectInfo.dir);
+		lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 		WriteBuffer(temporary,buffer,i2);
 	}
@@ -1972,5 +1970,5 @@
 
 	//保存
-	sprintf(temporary,"%s%s.idx",projectInfo.dir,projectInfo.GetName().c_str());
+	sprintf(temporary,"%s%s.idx",projectInfo.GetWorkDir().GetPath().c_str(),projectInfo.GetName().c_str());
 	WriteBuffer(temporary,buffer,i2);
 
@@ -1981,5 +1979,5 @@
 		//ウィンドウ関連ファイル（*.wnd）を作成、保存
 		if(projectInfo.ModifyOfMaterial){
-			sprintf(temporary,"%s%s.wnd",projectInfo.dir,projectInfo.GetName().c_str());
+			sprintf(temporary,"%s%s.wnd",projectInfo.GetWorkDir().GetPath().c_str(),projectInfo.GetName().c_str());
 			SaveWindowFile( temporary, projectInfo.windowInfos );
 		}
@@ -2035,5 +2033,5 @@
 	if(bDebug) lstrcpy(temporary,projectInfo.lpszOutput_Debug);
 	else lstrcpy(temporary,projectInfo.lpszOutput_Release);
-	GetFullPath(temporary,projectInfo.dir);
+	lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 
 	hFind=FindFirstFile(temporary,&wfd);
@@ -2059,5 +2057,5 @@
 		//CallBack.wbp
 		lstrcpy(temporary,"CallBack.wbp");
-		GetFullPath(temporary,projectInfo.dir);
+		lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 		hFile=CreateFile(temporary,GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
 		GetFileTime(hFile,NULL,NULL,&SourceTime);
@@ -2069,5 +2067,5 @@
 		//MakeWindow.wbp
 		lstrcpy(temporary,"MakeWindow.wbp");
-		GetFullPath(temporary,projectInfo.dir);
+		lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 		hFile=CreateFile(temporary,GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
 		GetFileTime(hFile,NULL,NULL,&SourceTime);
Index: /trunk/ab5.0/abdev/abdev/RadSupport.cpp
===================================================================
--- /trunk/ab5.0/abdev/abdev/RadSupport.cpp	(revision 619)
+++ /trunk/ab5.0/abdev/abdev/RadSupport.cpp	(revision 620)
@@ -114,5 +114,5 @@
 					}
 					if(temporary[0]){
-						GetFullPath(temporary,projectInfo.dir);
+						lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 						lphImage[i2]=LoadImage(hInst,temporary,IMAGE_ICON,0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE);
 
@@ -132,5 +132,5 @@
 					}
 					if(temporary[0]){
-						GetFullPath(temporary,projectInfo.dir);
+						lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 						lphImage[i2]=LoadImage(hInst,temporary,IMAGE_BITMAP,0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE);
 
Index: /trunk/ab5.0/abdev/abdev/RadToolsAndPropertyProc.cpp
===================================================================
--- /trunk/ab5.0/abdev/abdev/RadToolsAndPropertyProc.cpp	(revision 619)
+++ /trunk/ab5.0/abdev/abdev/RadToolsAndPropertyProc.cpp	(revision 620)
@@ -2953,5 +2953,5 @@
 								Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo);
 
-								GetRelationalPath(temporary,projectInfo.dir);
+								lstrcpy( temporary, projectInfo.GetWorkDir().GetRelationalPath( temporary ).c_str() );
 								HeapDefaultFree(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path);
 								pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->ImageCtrlInfo.path=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1);
Index: /trunk/ab5.0/abdev/abdev/Resource.cpp
===================================================================
--- /trunk/ab5.0/abdev/abdev/Resource.cpp	(revision 619)
+++ /trunk/ab5.0/abdev/abdev/Resource.cpp	(revision 620)
@@ -18,5 +18,5 @@
 
 	lstrcpy(temporary,projectInfo.ResourceFileName);
-	GetFullPath(temporary,projectInfo.dir);
+	lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 
 	hFile=CreateFile(temporary,GENERIC_READ,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
@@ -144,5 +144,5 @@
 	if(!GetFilePathDialog(hOwner,temporary,CursorFileFilter,STRING_FILEOPENTITLE_CURSOR,TRUE)) return;
 
-	GetRelationalPath(temporary,projectInfo.dir);
+	lstrcpy( temporary, projectInfo.GetWorkDir().GetRelationalPath( temporary ).c_str() );
 
 	projectInfo.res.pCursorResInfo=(RESITEMINFO *)HeapReAlloc(hHeap,0,projectInfo.res.pCursorResInfo,(projectInfo.res.NumberOfCursorRes+1)*sizeof(RESITEMINFO));
@@ -248,5 +248,5 @@
 	if(!GetFilePathDialog(hOwner,temporary,BitmapFileFilter,STRING_FILEOPENTITLE_BITMAP,TRUE)) return;
 
-	GetRelationalPath(temporary,projectInfo.dir);
+	lstrcpy( temporary, projectInfo.GetWorkDir().GetRelationalPath( temporary ).c_str() );
 
 	projectInfo.res.pBitmapResInfo=(RESITEMINFO *)HeapReAlloc(hHeap,0,projectInfo.res.pBitmapResInfo,(projectInfo.res.NumberOfBitmapRes+1)*sizeof(RESITEMINFO));
@@ -362,5 +362,5 @@
 	if(!GetFilePathDialog(hOwner,temporary,IconFileFilter,STRING_FILEOPENTITLE_ICON,TRUE)) return;
 
-	GetRelationalPath(temporary,projectInfo.dir);
+	lstrcpy( temporary, projectInfo.GetWorkDir().GetRelationalPath( temporary ).c_str() );
 
 	projectInfo.res.pIconResInfo=(RESITEMINFO *)HeapReAlloc(hHeap,0,projectInfo.res.pIconResInfo,(projectInfo.res.NumberOfIconRes+1)*sizeof(RESITEMINFO));
Index: /trunk/ab5.0/abdev/abdev/WindowControl.cpp
===================================================================
--- /trunk/ab5.0/abdev/abdev/WindowControl.cpp	(revision 619)
+++ /trunk/ab5.0/abdev/abdev/WindowControl.cpp	(revision 620)
@@ -1513,5 +1513,5 @@
 	///////////////////////
 	// 保存（Callback.wbp）
-	sprintf(temporary,"%sCallback.wbp",projectInfo.dir);
+	sprintf(temporary,"%sCallback.wbp",projectInfo.GetWorkDir().GetPath().c_str() );
 	WriteBuffer(temporary,buffer,i2);
 
@@ -1600,5 +1600,5 @@
 	/////////////////////////
 	// 保存（MakeWindow.wbp）
-	sprintf(temporary,"%sMakeWindow.wbp",projectInfo.dir);
+	sprintf(temporary,"%sMakeWindow.wbp",projectInfo.GetWorkDir().GetPath().c_str());
 	WriteBuffer(temporary,buffer,i2);
 	HeapDefaultFree(buffer);
@@ -2287,5 +2287,5 @@
 		NewWindow.CallBackName);
 
-	sprintf(temporary,"%s%s.ab",projectInfo.dir,projectInfo.windowInfos.back()->GetName().c_str());
+	sprintf(temporary,"%s%s.ab",projectInfo.GetWorkDir().GetPath().c_str(),projectInfo.windowInfos.back()->GetName().c_str());
 
 	//書き込み
Index: /trunk/ab5.0/abdev/abdev/abdev.vcproj
===================================================================
--- /trunk/ab5.0/abdev/abdev/abdev.vcproj	(revision 619)
+++ /trunk/ab5.0/abdev/abdev/abdev.vcproj	(revision 620)
@@ -78,5 +78,5 @@
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib imm32.lib htmlhelp.lib rpcrt4.lib"
+				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib imm32.lib htmlhelp.lib rpcrt4.lib imagehlp.lib"
 				OutputFile="../TheText/TheText.exe"
 				LinkIncremental="1"
@@ -176,5 +176,5 @@
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib imm32.lib htmlhelp.lib rpcrt4.lib"
+				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib imm32.lib htmlhelp.lib rpcrt4.lib imagehlp.lib"
 				OutputFile="$(OutDir)\abdev.exe"
 				LinkIncremental="2"
@@ -275,5 +275,5 @@
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib imm32.lib htmlhelp.lib rpcrt4.lib"
+				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib imm32.lib htmlhelp.lib rpcrt4.lib imagehlp.lib"
 				OutputFile="$(OutDir)\abdev.exe"
 				LinkIncremental="1"
@@ -373,5 +373,5 @@
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib imm32.lib htmlhelp.lib rpcrt4.lib"
+				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib imm32.lib htmlhelp.lib rpcrt4.lib imagehlp.lib"
 				OutputFile="../TheText/TheText.exe"
 				LinkIncremental="2"
Index: /trunk/ab5.0/abdev/abdev/include/ProjectManager/ProjectManager.h
===================================================================
--- /trunk/ab5.0/abdev/abdev/include/ProjectManager/ProjectManager.h	(revision 619)
+++ /trunk/ab5.0/abdev/abdev/include/ProjectManager/ProjectManager.h	(revision 620)
@@ -8,4 +8,9 @@
 public:
 
+	Project()
+		: workDir( "" )
+	{
+	}
+
 	void Open( char *path );
 	bool Close();
@@ -14,4 +19,9 @@
 	{
 		return name;
+	}
+
+	const Jenga::Common::Directory &GetWorkDir() const
+	{
+		return workDir;
 	}
 
@@ -25,6 +35,4 @@
 		return moduleType;
 	}
-
-	char dir[MAX_PATH];
 
 	DWORD dwVersion;
@@ -63,4 +71,5 @@
 private:
 	std::string name;
+	Jenga::Common::Directory workDir;
 	ActiveBasic::Common::TargetModuleType::EnumType moduleType;
 };
Index: /trunk/ab5.0/abdev/abdev/src/MainFrame.cpp
===================================================================
--- /trunk/ab5.0/abdev/abdev/src/MainFrame.cpp	(revision 619)
+++ /trunk/ab5.0/abdev/abdev/src/MainFrame.cpp	(revision 620)
@@ -446,5 +446,6 @@
 		lstrcpy(temporary,NewFileName);
 		if(!strstr(temporary,".")) lstrcat(temporary,".ab");
-		GetFullPath(temporary,projectInfo.dir);
+
+		lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 	}
 	else bAddToProject=0;
@@ -521,5 +522,5 @@
 void MainFrame::OnCmdProjectFolderOpen( UINT uNotifyCode, int nID, CWindow wndCtl )
 {
-	ShellExecute(m_hWnd,"explore",projectInfo.dir,NULL,NULL,SW_SHOWNORMAL);
+	ShellExecute(m_hWnd,"explore",projectInfo.GetWorkDir().GetPath().c_str(),NULL,NULL,SW_SHOWNORMAL);
 }
 
@@ -952,5 +953,5 @@
 		//出力ファイル名をtemp3へ
 		lstrcpy(temp3,projectInfo.lpszOutput_Debug);
-		GetFullPath(temp3,projectInfo.dir);
+		lstrcpy( temp3, projectInfo.GetWorkDir().GetFullPath( temp3 ).c_str() );
 
 		if(IsNeedCompileForProject(1))
@@ -1030,5 +1031,5 @@
 		//出力ファイル名をtemp3へ
 		lstrcpy(temp3,projectInfo.lpszOutput_Debug);
-		GetFullPath(temp3,projectInfo.dir);
+		lstrcpy( temp3, projectInfo.GetWorkDir().GetFullPath( temp3 ).c_str() );
 
 		sprintf(temporary,"\"%s\" \"%s\" /debug /wnd:%08x",temp2,temp3,m_hWnd);
@@ -1144,5 +1145,5 @@
 		//出力ファイル名をtemp3へ
 		lstrcpy(temp3,projectInfo.lpszOutput_Release);
-		GetFullPath(temp3,projectInfo.dir);
+		lstrcpy( temp3, projectInfo.GetWorkDir().GetFullPath( temp3 ).c_str() );
 
 		sprintf(temporary,"\"%s\" \"%s\" /wnd:%08x",temp2,temp3,m_hWnd);
@@ -1208,5 +1209,5 @@
 		else{
 			lstrcpy(temporary,projectInfo.lpszOutput_Debug);
-			GetFullPath(temporary,projectInfo.dir);
+			lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 		}
 	}
Index: /trunk/ab5.0/abdev/abdev/src/ProjectManager/ProjectManager.cpp
===================================================================
--- /trunk/ab5.0/abdev/abdev/src/ProjectManager/ProjectManager.cpp	(revision 619)
+++ /trunk/ab5.0/abdev/abdev/src/ProjectManager/ProjectManager.cpp	(revision 620)
@@ -18,9 +18,10 @@
 
 	//プロジェクトの作業ディレクトリを取得
-	_splitpath(path,this->dir,temporary,0,0);
-	lstrcat(this->dir,temporary);
+	_splitpath(path,temporary,temp2,0,0);
+	lstrcat( temporary, temp2 );
+	this->workDir = Jenga::Common::Directory( temporary );
 
 	//ファイルを開く、保存の初期ディレクトリをセット
-	lstrcpy(pobj_nv->DefSaveDir,this->dir);
+	lstrcpy(pobj_nv->DefSaveDir,this->GetWorkDir().GetPath().c_str());
 
 
@@ -253,5 +254,5 @@
 		/////////////////////////////////////////////
 		//ウィンドウ定義ファイル（*.wnd）をオープン
-		sprintf(temp2,"%s%s.wnd",this->dir,this->GetName().c_str());
+		sprintf(temp2,"%s%s.wnd",this->GetWorkDir().GetPath().c_str(),this->GetName().c_str());
 		if(!OpenWindowFile(temp2)) return;
 	}
@@ -263,5 +264,5 @@
 	}
 
-	OpenWorkfile( this->dir + this->GetName() + ".wrk" );
+	OpenWorkfile( this->GetWorkDir().GetPath() + this->GetName() + ".wrk" );
 
 	this->modify=0;
@@ -324,5 +325,5 @@
 			for(i=0;this->res.NumberOfIconRes;i++){
 				lstrcpy(temporary,this->res.pIconResInfo[i].path);
-				GetFullPath(temporary,this->dir);
+				lstrcpy( temporary, this->GetWorkDir().GetFullPath( temporary ).c_str() );
 				if(lstrcmpi(MdiInfo[WndNum].path,temporary)==0){
 					SendMessage(hCloseChild,WM_CLOSE,0,0);
Index: /trunk/ab5.0/jenga/include/common/Directory.h
===================================================================
--- /trunk/ab5.0/jenga/include/common/Directory.h	(revision 619)
+++ /trunk/ab5.0/jenga/include/common/Directory.h	(revision 620)
@@ -9,6 +9,13 @@
 public:
 	Directory( const std::string &path, bool isMake = false );
+	Directory( const Directory &dir );
 
-	std::string GetFullPath( const std::string &relationPath );
+	const std::string &GetPath() const
+	{
+		return path;
+	}
+
+	std::string GetFullPath( const std::string &relationPath ) const;
+	std::string GetRelationalPath( const std::string &fullPath ) const;
 };
 
Index: /trunk/ab5.0/jenga/src/common/Directory.cpp
===================================================================
--- /trunk/ab5.0/jenga/src/common/Directory.cpp	(revision 619)
+++ /trunk/ab5.0/jenga/src/common/Directory.cpp	(revision 620)
@@ -14,6 +14,10 @@
 	}
 }
+Directory::Directory( const Directory &dir )
+	: path( dir.path )
+{
+}
 
-std::string Directory::GetFullPath( const std::string &relationPath )
+std::string Directory::GetFullPath( const std::string &relationPath ) const
 {
 	std::string resultPath = relationPath;
@@ -61,2 +65,75 @@
 	return temporary;
 }
+
+void _GetRelationalPath(char *path,const char *dir){
+	//相対パスを取得
+	int i,i2,i3,i4,i5;
+	char temporary[MAX_PATH],temp2[MAX_PATH],temp3[MAX_PATH],temp4[MAX_PATH];
+
+	//ドライブ名をチェック
+	_splitpath(path,temporary,0,0,0);
+	_splitpath(dir,temp2,0,0,0);
+	if(lstrcmpi(temporary,temp2)!=0) return;
+
+	_splitpath(path,0,temporary,0,0);
+	_splitpath(dir,0,temp2,0,0);
+	i=1;i2=1;
+	while(1){
+		i4=i;
+		if(temporary[i-1]=='\\'&&temporary[i]){	//path側
+			for(i3=0;;i++,i3++){
+				if(temporary[i]=='\\'){
+					temp3[i3]=0;
+					i++;
+					break;
+				}
+				temp3[i3]=temporary[i];
+			}
+		}
+		else temp3[0]=0;
+
+		i5=i2;
+		if(temp2[i2-1]=='\\'&&temp2[i2]){		//dir側
+			for(i3=0;;i2++,i3++){
+				if(temp2[i2]=='\\'){
+					temp4[i3]=0;
+					i2++;
+					break;
+				}
+				temp4[i3]=temp2[i2];
+			}
+		}
+		else temp4[0]=0;
+
+		if(temp3[0]=='\0'&&temp4[0]=='\0'){
+			lstrcpy(temp3,".\\");
+			break;
+		}
+
+		if(lstrcmpi(temp3,temp4)!=0){
+			for(i3=0;;i5++){
+				if(temp2[i5]=='\0') break;
+				if(temp2[i5]=='\\') i3++;
+			}
+			if(i3==0) lstrcpy(temp3,".\\");
+			else{
+				temp3[0]=0;
+				for(i2=0;i2<i3;i2++) lstrcat(temp3,"..\\");
+			}
+			lstrcat(temp3,temporary+i4);
+			break;
+		}
+	}
+	_splitpath(path,0,0,temporary,temp2);
+	lstrcat(temp3,temporary);
+	lstrcat(temp3,temp2);
+	lstrcpy(path,temp3);
+}
+
+std::string Directory::GetRelationalPath( const std::string &fullPath ) const
+{
+	char temp[1024];
+	lstrcpy( temp, fullPath.c_str() );
+	_GetRelationalPath( temp, path.c_str() );
+	return temp;
+}
