Index: trunk/ab5.0/abdev/abdev/src/MainFrame.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/src/MainFrame.cpp	(revision 624)
+++ trunk/ab5.0/abdev/abdev/src/MainFrame.cpp	(revision 625)
@@ -316,6 +316,6 @@
 				mii.dwTypeData=temporary;
 				mii.fType=MFT_STRING;
-				if(MdiInfo[WndNum].path[0]){
-					_splitpath(MdiInfo[WndNum].path,NULL,NULL,temporary,temp2);
+				if(!MdiInfo[WndNum].path.empty()){
+					_splitpath(MdiInfo[WndNum].path.c_str(),NULL,NULL,temporary,temp2);
 					lstrcat(temporary,temp2);
 					lstrcat(temporary," を保存(&S)");
@@ -329,5 +329,5 @@
 				/*「絶対パスをコピー」「フォルダを開く」「ファイルを削除」
 												コマンドを場合によって無効化にする */
-				if(MdiInfo[WndNum].path[0]){
+				if(!MdiInfo[WndNum].path.empty()){
 					EnableMenuItem(hTabMenu,IDM_PATH_COPY,MF_BYCOMMAND|MF_ENABLED);
 					EnableMenuItem(hTabMenu,IDM_FOLDER_OPEN,MF_BYCOMMAND|MF_ENABLED);
@@ -383,5 +383,5 @@
 		WndNum=GetWndNum(hChild);
 		if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){
-			if(lstrcmpi(MdiInfo[WndNum].path,temporary)==0) break;
+			if(lstrcmpi(MdiInfo[WndNum].path.c_str(),temporary)==0) break;
 		}
 		hChild=::GetNextWindow(hChild,GW_HWNDNEXT);
@@ -548,5 +548,5 @@
 void MainFrame::OnCmdAllSave( UINT uNotifyCode, int nID, CWindow wndCtl )
 {
-	for( int i=0;i<MAX_WNDNUM;i++){
+	for( int i=0;i<MdiInfo.size();i++){
 		if(MdiInfo[i].hwnd) SaveDocument(MdiInfo[i].hwnd,NULL);
 	}
@@ -585,10 +585,16 @@
 	if(!hChild) return;
 	int WndNum=GetWndNum(hChild);
-	if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType))
+	if( IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType) )
+	{
 		TextEdit_UndoCommand(WndNum);
-	else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD)
+	}
+	else if( MdiInfo[WndNum].DocType == WNDTYPE_RAD )
+	{
 		Rad_UndoCommand(WndNum);
-	else if(MdiInfo[WndNum].DocType==WNDTYPE_ICONEDIT)
+	}
+	else if( MdiInfo[WndNum].DocType == WNDTYPE_ICONEDIT )
+	{
 		IconEdit_UndoCommand(WndNum);
+	}
 }
 
@@ -986,7 +992,7 @@
 		if(!SetRunning(hChild)) return;
 		if(IsNeedCompile(MdiInfo[GetWndNum(hChild)].path,1))
-			sprintf(temporary,"\"%s\" /debug /run /wnd:%08x",MdiInfo[GetWndNum(hChild)].path,m_hWnd);
+			sprintf(temporary,"\"%s\" /debug /run /wnd:%08x",MdiInfo[GetWndNum(hChild)].path.c_str(),m_hWnd);
 		else
-			sprintf(temporary,"\"%s\" /run /wnd:%08x",MdiInfo[GetWndNum(hChild)].path,m_hWnd);
+			sprintf(temporary,"\"%s\" /run /wnd:%08x",MdiInfo[GetWndNum(hChild)].path.c_str(),m_hWnd);
 
 		//ブレークポイントをセーブ
@@ -1051,5 +1057,5 @@
 		//単独ソースコード
 		if(!SetRunning(hChild)) return;
-		sprintf(temporary,"\"%s\" /debug /wnd:%08x",MdiInfo[GetWndNum(hChild)].path,m_hWnd);
+		sprintf(temporary,"\"%s\" /debug /wnd:%08x",MdiInfo[GetWndNum(hChild)].path.c_str(),m_hWnd);
 	}
 
@@ -1165,5 +1171,5 @@
 		//単独ソースコード
 		if(!SetRunning(hChild)) return;
-		sprintf(temporary,"\"%s\" /wnd:%08x",MdiInfo[GetWndNum(hChild)].path,m_hWnd);
+		sprintf(temporary,"\"%s\" /wnd:%08x",MdiInfo[GetWndNum(hChild)].path.c_str(),m_hWnd);
 	}
 
@@ -1224,5 +1230,5 @@
 
 		//単独ソースコード
-		_splitpath(MdiInfo[GetWndNum(hChild)].path,temporary,temp2,temp3,NULL);
+		_splitpath(MdiInfo[GetWndNum(hChild)].path.c_str(),temporary,temp2,temp3,NULL);
 		lstrcat(temporary,temp2);
 		lstrcat(temporary,temp3);
@@ -1403,5 +1409,5 @@
 	HWND hChild=::GetWindow(hClient,GW_CHILD);
 	int WndNum=GetWndNum(hChild);
-	for(int i=0;i<MAX_WNDNUM;i++){
+	for(int i=0;i<MdiInfo.size();i++){
 		if(i==WndNum) continue;
 		if(MdiInfo[i].hwnd) SendMessage(MdiInfo[i].hwnd,WM_CLOSE,0,0);
@@ -1415,7 +1421,7 @@
 
 	//絶対パスをコピー
-	HGLOBAL hGlobal=(char *)GlobalAlloc(GMEM_MOVEABLE,lstrlen(MdiInfo[WndNum].path)+1);
+	HGLOBAL hGlobal=(char *)GlobalAlloc(GMEM_MOVEABLE,MdiInfo[WndNum].path.size()+1);
 	char *pTemp=(char *)GlobalLock(hGlobal);
-	lstrcpy(pTemp,MdiInfo[WndNum].path);
+	lstrcpy(pTemp,MdiInfo[WndNum].path.c_str());
 	GlobalUnlock(hGlobal);
 
@@ -1433,5 +1439,5 @@
 
 	char temporary[1024], temp2[1024];
-	_splitpath(MdiInfo[WndNum].path,temporary,temp2,NULL,NULL);
+	_splitpath(MdiInfo[WndNum].path.c_str(),temporary,temp2,NULL,NULL);
 	lstrcat(temporary,temp2);
 
@@ -1445,5 +1451,5 @@
 
 	char temporary[1024], temp2[1024];
-	_splitpath(MdiInfo[WndNum].path,NULL,NULL,temporary,temp2);
+	_splitpath(MdiInfo[WndNum].path.c_str(),NULL,NULL,temporary,temp2);
 	lstrcat(temporary,temp2);
 
@@ -1455,5 +1461,5 @@
 	fo.hwnd=m_hWnd;
 	fo.wFunc=FO_DELETE;
-	fo.pFrom =MdiInfo[WndNum].path;
+	fo.pFrom =MdiInfo[WndNum].path.c_str();
 	fo.pTo="\0";
 	fo.fFlags =FOF_ALLOWUNDO|FOF_NOCONFIRMATION;
