Index: trunk/ab5.0/abdev/abdev/ProjectControl.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/ProjectControl.cpp	(revision 623)
+++ trunk/ab5.0/abdev/abdev/ProjectControl.cpp	(revision 624)
@@ -191,8 +191,10 @@
 						}
 					}
-					for(i=0;i<projectInfo.resourceManager.iconResources.size();i++){
-						if(projectInfo.resourceManager.iconResources[i].hTreeItem==hTreeItem){
+					BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, projectInfo.resourceManager.iconResources )
+					{
+						if( resourceItem.hTreeItem == hTreeItem )
+						{
 							NewIconEditWindow(
-								projectInfo.GetWorkDir().GetFullPath( projectInfo.resourceManager.iconResources[i].filepath ).c_str()
+								projectInfo.GetWorkDir().GetFullPath( resourceItem.filepath ).c_str()
 							);
 							break;
@@ -202,5 +204,5 @@
 				case IDM_MATERIALTREE_DELETE:
 					hTreeItem=TreeView_GetSelection(hMaterialTreeView);
-					for(i=0;i<projectInfo.resourceManager.cursorResources.size();i++){
+					for(i=0;i<static_cast<int>(projectInfo.resourceManager.cursorResources.size());i++){
 						if(projectInfo.resourceManager.cursorResources[i].hTreeItem==hTreeItem){
 
@@ -213,5 +215,5 @@
 						}
 					}
-					for(i=0;i<projectInfo.resourceManager.bitmapResources.size();i++){
+					for(i=0;i<static_cast<int>(projectInfo.resourceManager.bitmapResources.size());i++){
 						if(projectInfo.resourceManager.bitmapResources[i].hTreeItem==hTreeItem){
 
@@ -224,5 +226,5 @@
 						}
 					}
-					for(i=0;i<projectInfo.resourceManager.iconResources.size();i++){
+					for(i=0;i<static_cast<int>(projectInfo.resourceManager.iconResources.size());i++){
 						if(projectInfo.resourceManager.iconResources[i].hTreeItem==hTreeItem){
 
@@ -261,5 +263,5 @@
 					extern char NewIdName[MAX_PATH];
 					hTreeItem=TreeView_GetSelection(hMaterialTreeView);
-					for(i=0;i<projectInfo.resourceManager.cursorResources.size();i++){
+					for(i=0;i<static_cast<int>(projectInfo.resourceManager.cursorResources.size());i++){
 						if(projectInfo.resourceManager.cursorResources[i].hTreeItem==hTreeItem){
 							Project_Cursor_RenameID(i);
@@ -267,5 +269,5 @@
 						}
 					}
-					for(i=0;i<projectInfo.resourceManager.bitmapResources.size();i++){
+					for(i=0;i<static_cast<int>(projectInfo.resourceManager.bitmapResources.size());i++){
 						if(projectInfo.resourceManager.bitmapResources[i].hTreeItem==hTreeItem){
 							Project_Bitmap_RenameID(i);
@@ -273,5 +275,5 @@
 						}
 					}
-					for(i=0;i<projectInfo.resourceManager.iconResources.size();i++){
+					for(i=0;i<static_cast<int>(projectInfo.resourceManager.iconResources.size());i++){
 						if(projectInfo.resourceManager.iconResources[i].hTreeItem==hTreeItem){
 							Project_Icon_RenameID(i);
@@ -314,5 +316,5 @@
 				case IDM_MATERIALTREE_ICON_SETMAIN:
 					hTreeItem=TreeView_GetSelection(hMaterialTreeView);
-					for(i=0;i<projectInfo.resourceManager.iconResources.size();i++){
+					for(i=0;i<static_cast<int>(projectInfo.resourceManager.iconResources.size());i++){
 						if(projectInfo.resourceManager.iconResources[i].hTreeItem==hTreeItem){
 							if(i==0) break;
@@ -1052,6 +1054,6 @@
 		// ウィンドウ定義ファイル（*.wnd）を作成
 		/////////////////////////////////////////
-		WindowInfos windowInfos;
-		windowInfos.push_back( new WindowInfo() );
+		ActiveBasic::PM::WindowInfos windowInfos;
+		windowInfos.push_back( new ActiveBasic::PM::WindowInfo() );
 		windowInfos.back()->SetName( "MainWnd" );
 		windowInfos.back()->SetHandleName( "hMainWnd" );
@@ -1060,16 +1062,19 @@
 		windowInfos.back()->size.cx=480;
 		windowInfos.back()->size.cy=360;
-		windowInfos.back()->caption=NewProjectInfo.name;
+		windowInfos.back()->SetCaption( NewProjectInfo.name );
 		if(NewProjectInfo.dwTypeID==IDC_EXE_WINDOWBASE)
-			windowInfos.back()->style=WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_VISIBLE;
+		{
+			windowInfos.back()->SetStyle( WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_VISIBLE );
+		}
 		else if(NewProjectInfo.dwTypeID==IDC_EXE_DIRECTX)
-			windowInfos.back()->style=WS_OVERLAPPED|WS_THICKFRAME|WS_SYSMENU;
-		windowInfos.back()->ExStyle=0;
-		windowInfos.back()->MenuID=0;
-		windowInfos.back()->id=0;
-		windowInfos.back()->bgColor=COLOR_3DFACE;
+		{
+			windowInfos.back()->SetStyle( WS_OVERLAPPED|WS_THICKFRAME|WS_SYSMENU );
+		}
+		windowInfos.back()->SetExStyle( 0 );
+		windowInfos.back()->SetMenuIdName( "" );
+		windowInfos.back()->SetBackgroundColor( COLOR_3DFACE );
 		GetDefaultWindowFont(&windowInfos.back()->LogFont);
-		windowInfos.back()->IconResName=0;
-		windowInfos.back()->ClassName="NORMAL";
+		windowInfos.back()->SetIconResourceName( "" );
+		windowInfos.back()->SetClassName( "NORMAL" );
 		windowInfos.back()->CallBackName="MainWndProc";
 		windowInfos.back()->type=WNDTYPE_DEFAULT;
@@ -1142,10 +1147,11 @@
 	tv.hParent=TreeView_InsertItem(hMaterialTreeView,&tv);
 	hCursorTreeItemForProjectView = tv.hParent;
-	for(i=0;i<projectInfo.resourceManager.cursorResources.size();i++){
+	BOOST_FOREACH( ActiveBasic::Common::ResourceItem &resourceItem, projectInfo.resourceManager.cursorResources )
+	{
 		tv.item.iImage=6;
 		tv.item.iSelectedImage=6;
-		lstrcpy( temporary, projectInfo.resourceManager.cursorResources[i].idName.c_str() );
+		lstrcpy( temporary, resourceItem.idName.c_str() );
 		tv.item.pszText=temporary;
-		projectInfo.resourceManager.cursorResources[i].hTreeItem=TreeView_InsertItem(hMaterialTreeView,&tv);
+		resourceItem.hTreeItem = TreeView_InsertItem(hMaterialTreeView,&tv);
 	}
 
@@ -1158,10 +1164,11 @@
 	tv.hParent=TreeView_InsertItem(hMaterialTreeView,&tv);
 	hBitmapTreeItemForProjectView = tv.hParent;
-	for(i=0;i<projectInfo.resourceManager.bitmapResources.size();i++){
+	BOOST_FOREACH( ActiveBasic::Common::ResourceItem &resourceItem, projectInfo.resourceManager.bitmapResources )
+	{
 		tv.item.iImage=5;
 		tv.item.iSelectedImage=5;
-		lstrcpy( temporary, projectInfo.resourceManager.bitmapResources[i].idName.c_str() );
+		lstrcpy( temporary, resourceItem.idName.c_str() );
 		tv.item.pszText=temporary;
-		projectInfo.resourceManager.bitmapResources[i].hTreeItem=TreeView_InsertItem(hMaterialTreeView,&tv);
+		resourceItem.hTreeItem = TreeView_InsertItem(hMaterialTreeView,&tv);
 	}
 
@@ -1174,5 +1181,5 @@
 	tv.hParent=TreeView_InsertItem(hMaterialTreeView,&tv);
 	hIconTreeItemForProjectView = tv.hParent;
-	for(i=0;i<projectInfo.resourceManager.iconResources.size();i++){
+	for(i=0;i<static_cast<int>(projectInfo.resourceManager.iconResources.size());i++){
 		tv.item.iImage=4;
 		tv.item.iSelectedImage=4;
@@ -1209,5 +1216,5 @@
 	tv.hParent=TreeView_InsertItem(hMaterialTreeView,&tv);
 	projectInfo.hWindowTreeItem=tv.hParent;
-	BOOST_FOREACH( WindowInfo *pWindowInfo, projectInfo.windowInfos )
+	BOOST_FOREACH( ActiveBasic::PM::WindowInfo *pWindowInfo, projectInfo.windowInfos )
 	{
 		tv.item.iImage=2;
@@ -1356,7 +1363,9 @@
 							}
 						}
-						else if(lstrcmpi(temporary,"icon")==0){
-							for(i3=0;i3<projectInfo.resourceManager.iconResources.size();i3++){
-								if(lstrcmpi(projectInfo.resourceManager.iconResources[i3].filepath.c_str(),temp2)==0){
+						else if(lstrcmpi(temporary,"icon")==0)
+						{
+							BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, projectInfo.resourceManager.iconResources )
+							{
+								if(lstrcmpi(resourceItem.filepath.c_str(),temp2)==0){
 									NewIconEditWindow( projectInfo.GetWorkDir().GetFullPath( temp2 ).c_str() );
 									break;
@@ -1478,6 +1487,7 @@
 						}
 						else if(lstrcmpi(temporary,"icon")==0){
-							for(i3=0;i3<projectInfo.resourceManager.iconResources.size();i3++){
-								if(lstrcmpi(projectInfo.resourceManager.iconResources[i3].filepath.c_str(),temp2)==0){
+							BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, projectInfo.resourceManager.iconResources )
+							{
+								if(lstrcmpi(resourceItem.filepath.c_str(),temp2)==0){
 									NewIconEditWindow( projectInfo.GetWorkDir().GetFullPath( temp2 ).c_str() );
 									break;
@@ -1597,6 +1607,7 @@
 		else if(MdiInfo[WndNum].DocType==WNDTYPE_ICONEDIT){
 			if(MdiInfo[WndNum].MdiIconEditInfo->bModify){
-				for(i=0;i<projectInfo.resourceManager.iconResources.size();i++){
-					lstrcpy(temporary,projectInfo.resourceManager.iconResources[i].filepath.c_str());
+				BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, projectInfo.resourceManager.iconResources )
+				{
+					lstrcpy(temporary,resourceItem.filepath.c_str());
 					lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 					if(lstrcmpi(MdiInfo[WndNum].path,temporary)==0) sw=1;
@@ -1671,5 +1682,5 @@
 		}
 		else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD){
-			BOOST_FOREACH( WindowInfo *pWindowInfo, projectInfo.windowInfos )
+			BOOST_FOREACH( ActiveBasic::PM::WindowInfo *pWindowInfo, projectInfo.windowInfos )
 			{
 				if(lstrcmpi(MdiInfo[WndNum].path,pWindowInfo->GetName().c_str())==0){
@@ -1690,9 +1701,10 @@
 		}
 		else if(MdiInfo[WndNum].DocType==WNDTYPE_ICONEDIT){
-			for(i=0;i<projectInfo.resourceManager.iconResources.size();i++){
-				lstrcpy(temporary,projectInfo.resourceManager.iconResources[i].filepath.c_str());
+			BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, projectInfo.resourceManager.iconResources )
+			{
+				lstrcpy(temporary,resourceItem.filepath.c_str());
 				lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
 				if(lstrcmpi(MdiInfo[WndNum].path,temporary)==0){
-					sprintf(buffer+i2,"icon,%s\r\n",projectInfo.resourceManager.iconResources[i].filepath.c_str());
+					sprintf(buffer+i2,"icon,%s\r\n",resourceItem.filepath.c_str());
 					i2+=lstrlen(buffer+i2);
 					break;
