Index: trunk/ab5.0/abdev/abdev/src/MainFrame.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/src/MainFrame.cpp	(revision 623)
+++ trunk/ab5.0/abdev/abdev/src/MainFrame.cpp	(revision 624)
@@ -632,5 +632,5 @@
 	}
 	else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD){
-		WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path);
+		ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path);
 		int indexOfWndInfo = GetWndInfoNum(MdiInfo[WndNum].path);
 
@@ -811,7 +811,8 @@
 	}
 	else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD){
-		WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path);
-		for(int i3=0;i3<pWindowInfo->childWindowInfos.size();i3++){
-			MdiInfo[WndNum].MdiRadInfo->SelectingItem[i3]=i3;
+		ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path);
+		for( int i3=0; i3<static_cast<int>(pWindowInfo->childWindowInfos.size()); i3++ )
+		{
+			MdiInfo[WndNum].MdiRadInfo->SelectingItem[i3] = i3;
 		}
 		DrawRadWindow(WndNum,pWindowInfo);
Index: trunk/ab5.0/abdev/abdev/src/ProjectManager/ProjectManager.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/src/ProjectManager/ProjectManager.cpp	(revision 623)
+++ trunk/ab5.0/abdev/abdev/src/ProjectManager/ProjectManager.cpp	(revision 624)
@@ -1,5 +1,5 @@
 #include "stdafx.h"
 
-using namespace ActiveBasic::IDE;
+using namespace ActiveBasic::PM;
 
 void OpenWorkfile( const std::string &path );
@@ -293,6 +293,7 @@
 		if(MdiInfo[WndNum].DocType==WNDTYPE_ICONEDIT){
 			if(MdiInfo[WndNum].MdiIconEditInfo->bModify){
-				for(i=0;i<this->resourceManager.iconResources.size();i++){
-					lstrcpy(temporary,this->resourceManager.iconResources[i].filepath.c_str());
+				BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, resourceManager.iconResources )
+				{
+					lstrcpy(temporary,resourceItem.filepath.c_str());
 					lstrcpy( temporary, this->GetWorkDir().GetFullPath( temporary ).c_str() );
 					if(lstrcmpi(MdiInfo[WndNum].path,temporary)==0){
@@ -357,21 +358,30 @@
 		i2=0;
 		i3=101;
-		for(i=0;i<this->resourceManager.cursorResources.size();i++,i3++){
+		BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, resourceManager.cursorResources )
+		{
 			sprintf(buffer+i2,"Const %s=%d\r\n",
-				this->resourceManager.cursorResources[i].idName.c_str(),
+				resourceItem.idName.c_str(),
 				i3);
 			i2+=lstrlen(buffer+i2);
-		}
-		for(i=0;i<this->resourceManager.bitmapResources.size();i++,i3++){
+
+			i3++;
+		}
+		BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, resourceManager.bitmapResources )
+		{
 			sprintf(buffer+i2,"Const %s=%d\r\n",
-				this->resourceManager.bitmapResources[i].idName.c_str(),
+				resourceItem.idName.c_str(),
 				i3);
 			i2+=lstrlen(buffer+i2);
-		}
-		for(i=0;i<this->resourceManager.iconResources.size();i++,i3++){
+
+			i3++;
+		}
+		BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, resourceManager.iconResources )
+		{
 			sprintf(buffer+i2,"Const %s=%d\r\n",
-				this->resourceManager.iconResources[i].idName.c_str(),
+				resourceItem.idName.c_str(),
 				i3);
 			i2+=lstrlen(buffer+i2);
+
+			i3++;
 		}
 
@@ -380,20 +390,23 @@
 
 		i2=0;
-		for(i=0;i<this->resourceManager.cursorResources.size();i++){
+		BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, resourceManager.cursorResources )
+		{
 			sprintf(buffer+i2,"%s CURSOR \"%s\"\r\n",
-				this->resourceManager.cursorResources[i].idName.c_str(),
-				this->resourceManager.cursorResources[i].filepath.c_str());
-			i2+=lstrlen(buffer+i2);
-		}
-		for(i=0;i<this->resourceManager.bitmapResources.size();i++){
+				resourceItem.idName.c_str(),
+				resourceItem.filepath.c_str());
+			i2+=lstrlen(buffer+i2);
+		}
+		BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, resourceManager.bitmapResources )
+		{
 			sprintf(buffer+i2,"%s BITMAP \"%s\"\r\n",
-				this->resourceManager.bitmapResources[i].idName.c_str(),
-				this->resourceManager.bitmapResources[i].filepath.c_str());
-			i2+=lstrlen(buffer+i2);
-		}
-		for(i=0;i<this->resourceManager.iconResources.size();i++){
+				resourceItem.idName.c_str(),
+				resourceItem.filepath.c_str());
+			i2+=lstrlen(buffer+i2);
+		}
+		BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, resourceManager.iconResources )
+		{
 			sprintf(buffer+i2,"%s ICON \"%s\"\r\n",
-				this->resourceManager.iconResources[i].idName.c_str(),
-				this->resourceManager.iconResources[i].filepath.c_str());
+				resourceItem.idName.c_str(),
+				resourceItem.filepath.c_str());
 			i2+=lstrlen(buffer+i2);
 		}
@@ -521,5 +534,5 @@
 	extern HANDLE hHeap;
 	extern MDIINFO MdiInfo[MAX_WNDNUM];
-	int i,i2,WndNum;
+	int i,WndNum;
 	HWND hChild,hCloseChild;
 	char temporary[MAX_PATH];
@@ -587,25 +600,13 @@
 
 	//ウィンドウ情報のメモリを解放
-	BOOST_FOREACH( WindowInfo *pWindowInfo, windowInfos )
+	BOOST_FOREACH( ActiveBasic::PM::WindowInfo *pWindowInfo, windowInfos )
 	{
-		HeapDefaultFree(pWindowInfo->caption);
-		HeapDefaultFree(pWindowInfo->ClassName);
 		HeapDefaultFree(pWindowInfo->CallBackName);
 		HeapDefaultFree(pWindowInfo->filepath);
-		if(pWindowInfo->MenuID)
-			HeapDefaultFree(pWindowInfo->MenuID);
-		if(pWindowInfo->IconResName)
-			HeapDefaultFree(pWindowInfo->IconResName);
 
 		//子ウィンドウのメモリを解放
-		for(i2=0;i2<pWindowInfo->childWindowInfos.size();i2++){
-			HeapDefaultFree(pWindowInfo->childWindowInfos[i2]->IdName);
-			HeapDefaultFree(pWindowInfo->childWindowInfos[i2]->caption);
-			if(pWindowInfo->childWindowInfos[i2]->Control==CT_IMAGEBOX){
-				//イメージ ボックスの場合
-				HeapDefaultFree(pWindowInfo->childWindowInfos[i2]->ImageCtrlInfo.path);
-			}
-
-			delete pWindowInfo->childWindowInfos[i2];
+		BOOST_FOREACH( ActiveBasic::PM::ChildWindowInfo *pChildWindowInfo, pWindowInfo->childWindowInfos )
+		{
+			delete pChildWindowInfo;
 		}
 		pWindowInfo->childWindowInfos.clear();
