Index: trunk/ab5.0/abdev/abdev/MenuProc.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/MenuProc.cpp	(revision 613)
+++ trunk/ab5.0/abdev/abdev/MenuProc.cpp	(revision 618)
@@ -13,6 +13,6 @@
 int GetMenuInfoNum(char *name){
 	int i;
-	for(i=0;i<ProjectInfo.NumberOfMenu;i++){
-		if(lstrcmpi(name,ProjectInfo.pMenuInfo[i].IdName)==0) return i;
+	for(i=0;i<projectInfo.NumberOfMenu;i++){
+		if(lstrcmpi(name,projectInfo.pMenuInfo[i].IdName)==0) return i;
 	}
 	return -1;
@@ -77,8 +77,8 @@
 
 	//重複チェック
-	for(i=0;i<ProjectInfo.NumberOfMenu;i++){
-		if(lstrcmpi(NewIdName,ProjectInfo.pMenuInfo[i].IdName)==0){
+	for(i=0;i<projectInfo.NumberOfMenu;i++){
+		if(lstrcmpi(NewIdName,projectInfo.pMenuInfo[i].IdName)==0){
 			//"\"%s\" メニューは既にプロジェクト内に存在します。"
-			sprintf(temporary,STRING_MENUEDIT_DUPLICATIONERROR,ProjectInfo.pMenuInfo[i].IdName);
+			sprintf(temporary,STRING_MENUEDIT_DUPLICATIONERROR,projectInfo.pMenuInfo[i].IdName);
 			MessageBox(hOwner,temporary,STRING_ERROR,MB_OK|MB_ICONEXCLAMATION);
 			return;
@@ -86,6 +86,6 @@
 	}
 
-	ProjectInfo.pMenuInfo=(MENU_INFO *)HeapReAlloc(hHeap,0,ProjectInfo.pMenuInfo,(ProjectInfo.NumberOfMenu+1)*sizeof(MENU_INFO));
-	MenuInfo=&ProjectInfo.pMenuInfo[ProjectInfo.NumberOfMenu];
+	projectInfo.pMenuInfo=(MENU_INFO *)HeapReAlloc(hHeap,0,projectInfo.pMenuInfo,(projectInfo.NumberOfMenu+1)*sizeof(MENU_INFO));
+	MenuInfo=&projectInfo.pMenuInfo[projectInfo.NumberOfMenu];
 
 	MenuInfo->IdName=(char *)HeapAlloc(hHeap,0,lstrlen(NewIdName)+1);
@@ -107,5 +107,5 @@
 	tv.item.iImage=3;
 	tv.item.iSelectedImage=3;
-	tv.hParent=ProjectInfo.hMenuTreeItem;
+	tv.hParent=projectInfo.hMenuTreeItem;
 	tv.item.pszText=MenuInfo->IdName;
 
@@ -115,6 +115,6 @@
 
 
-	ProjectInfo.NumberOfMenu++;
-	ProjectInfo.ModifyOfMaterial=1;
+	projectInfo.NumberOfMenu++;
+	projectInfo.ModifyOfMaterial=1;
 
 
@@ -128,5 +128,5 @@
 	}
 
-	NewMenuWindow(&ProjectInfo.pMenuInfo[ProjectInfo.NumberOfMenu-1]);
+	NewMenuWindow(&projectInfo.pMenuInfo[projectInfo.NumberOfMenu-1]);
 }
 void Project_Menu_Delete(int MenuInfoNum){
@@ -137,5 +137,5 @@
 	//ウィンドウが開かれている場合は閉じる
 	for(i=0;i<MAX_WNDNUM;i++){
-		if(MdiInfo[i].hwnd&&lstrcmpi(ProjectInfo.pMenuInfo[MenuInfoNum].IdName,MdiInfo[i].path)==0){
+		if(MdiInfo[i].hwnd&&lstrcmpi(projectInfo.pMenuInfo[MenuInfoNum].IdName,MdiInfo[i].path)==0){
 			SendMessage(MdiInfo[i].hwnd,WM_CLOSE,0,0);
 			break;
@@ -144,22 +144,22 @@
 
 	//メニュー情報のメモリを解放
-	HeapMenuDataFree(ProjectInfo.pMenuInfo[MenuInfoNum].pMenuInfo,ProjectInfo.pMenuInfo[MenuInfoNum].NumberOfMenu,0);
-	HeapDefaultFree(ProjectInfo.pMenuInfo[MenuInfoNum].pMenuInfo);
-	HeapDefaultFree(ProjectInfo.pMenuInfo[MenuInfoNum].IdName);
+	HeapMenuDataFree(projectInfo.pMenuInfo[MenuInfoNum].pMenuInfo,projectInfo.pMenuInfo[MenuInfoNum].NumberOfMenu,0);
+	HeapDefaultFree(projectInfo.pMenuInfo[MenuInfoNum].pMenuInfo);
+	HeapDefaultFree(projectInfo.pMenuInfo[MenuInfoNum].IdName);
 
 	//ツリービューから削除
 	extern HWND hMaterialTreeView;
-	TreeView_DeleteItem(hMaterialTreeView,ProjectInfo.pMenuInfo[MenuInfoNum].hTreeItem);
-
-	//ProjectInfo.pMenuInfo構造体から削除
-	ProjectInfo.NumberOfMenu--;
-	for(i=MenuInfoNum;i<ProjectInfo.NumberOfMenu;i++) ProjectInfo.pMenuInfo[i]=ProjectInfo.pMenuInfo[i+1];
-	if(ProjectInfo.NumberOfMenu==0){
-		HeapDefaultFree(ProjectInfo.pMenuInfo);
-		ProjectInfo.pMenuInfo=(MENU_INFO *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,1);
-	}
-	else ProjectInfo.pMenuInfo=(MENU_INFO *)HeapReAlloc(hHeap,0,ProjectInfo.pMenuInfo,ProjectInfo.NumberOfMenu*sizeof(MENU_INFO));
-
-	ProjectInfo.ModifyOfMaterial=1;
+	TreeView_DeleteItem(hMaterialTreeView,projectInfo.pMenuInfo[MenuInfoNum].hTreeItem);
+
+	//projectInfo.pMenuInfo構造体から削除
+	projectInfo.NumberOfMenu--;
+	for(i=MenuInfoNum;i<projectInfo.NumberOfMenu;i++) projectInfo.pMenuInfo[i]=projectInfo.pMenuInfo[i+1];
+	if(projectInfo.NumberOfMenu==0){
+		HeapDefaultFree(projectInfo.pMenuInfo);
+		projectInfo.pMenuInfo=(MENU_INFO *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,1);
+	}
+	else projectInfo.pMenuInfo=(MENU_INFO *)HeapReAlloc(hHeap,0,projectInfo.pMenuInfo,projectInfo.NumberOfMenu*sizeof(MENU_INFO));
+
+	projectInfo.ModifyOfMaterial=1;
 
 
@@ -409,5 +409,5 @@
 					i2=0;
 					i3=0;
-					pMenuInfo=GetMenuInfoFromList(&ProjectInfo.pMenuInfo[MenuInfoNum],&i2,i4,&i3);
+					pMenuInfo=GetMenuInfoFromList(&projectInfo.pMenuInfo[MenuInfoNum],&i2,i4,&i3);
 					pMenuInfo=&pMenuInfo->pMenuInfo[i2];
 
@@ -430,5 +430,5 @@
 
 					SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_SETCURSEL,i4,0);
-					ProjectInfo.ModifyOfMaterial=1;
+					projectInfo.ModifyOfMaterial=1;
 					return 1;
 				case IDC_POPUP:
@@ -441,5 +441,5 @@
 					i2=0;
 					i3=0;
-					pMenuInfo=GetMenuInfoFromList(&ProjectInfo.pMenuInfo[MenuInfoNum],&i2,i4,&i3);
+					pMenuInfo=GetMenuInfoFromList(&projectInfo.pMenuInfo[MenuInfoNum],&i2,i4,&i3);
 					pMenuInfo=&pMenuInfo->pMenuInfo[i2];
 
@@ -476,5 +476,5 @@
 					}
 					SendMessage(MdiInfo[WndNum].hwnd,WM_COMMAND,MAKELONG(0,LBN_SELCHANGE),(long)MdiInfo[WndNum].MdiMenuInfo->hList);
-					ProjectInfo.ModifyOfMaterial=1;
+					projectInfo.ModifyOfMaterial=1;
 					return 1;
 				case IDC_SEPARATOR:
@@ -487,5 +487,5 @@
 					i2=0;
 					i3=0;
-					pMenuInfo=GetMenuInfoFromList(&ProjectInfo.pMenuInfo[MenuInfoNum],&i2,i4,&i3);
+					pMenuInfo=GetMenuInfoFromList(&projectInfo.pMenuInfo[MenuInfoNum],&i2,i4,&i3);
 					pMenuInfo=&pMenuInfo->pMenuInfo[i2];
 
@@ -528,5 +528,5 @@
 					i2=0;
 					i3=0;
-					pMenuInfo=GetMenuInfoFromList(&ProjectInfo.pMenuInfo[MenuInfoNum],&i2,i4,&i3);
+					pMenuInfo=GetMenuInfoFromList(&projectInfo.pMenuInfo[MenuInfoNum],&i2,i4,&i3);
 					pMenuInfo=&pMenuInfo->pMenuInfo[i2];
 
@@ -536,5 +536,5 @@
 						pMenuInfo->state&=~MFS_CHECKED;
 
-					ProjectInfo.ModifyOfMaterial=1;
+					projectInfo.ModifyOfMaterial=1;
 					return 1;
 				case IDC_DISABLED:
@@ -547,5 +547,5 @@
 					i2=0;
 					i3=0;
-					pMenuInfo=GetMenuInfoFromList(&ProjectInfo.pMenuInfo[MenuInfoNum],&i2,i4,&i3);
+					pMenuInfo=GetMenuInfoFromList(&projectInfo.pMenuInfo[MenuInfoNum],&i2,i4,&i3);
 					pMenuInfo=&pMenuInfo->pMenuInfo[i2];
 
@@ -555,5 +555,5 @@
 						pMenuInfo->state&=~MFS_DISABLED;
 
-					ProjectInfo.ModifyOfMaterial=1;
+					projectInfo.ModifyOfMaterial=1;
 					return 1;
 				case IDC_INSERTMENUITEM:
@@ -562,7 +562,7 @@
 					MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum].path);
 
-					if(ProjectInfo.pMenuInfo[MenuInfoNum].NumberOfMenu==0){
-						ProjectInfo.pMenuInfo[MenuInfoNum].pMenuInfo=(MENU_INFO *)HeapReAlloc(hHeap,HEAP_ZERO_MEMORY,ProjectInfo.pMenuInfo[MenuInfoNum].pMenuInfo,(ProjectInfo.pMenuInfo[MenuInfoNum].NumberOfMenu+1)*sizeof(MENU_INFO));
-						pMenuInfo=&ProjectInfo.pMenuInfo[MenuInfoNum].pMenuInfo[ProjectInfo.pMenuInfo[MenuInfoNum].NumberOfMenu];
+					if(projectInfo.pMenuInfo[MenuInfoNum].NumberOfMenu==0){
+						projectInfo.pMenuInfo[MenuInfoNum].pMenuInfo=(MENU_INFO *)HeapReAlloc(hHeap,HEAP_ZERO_MEMORY,projectInfo.pMenuInfo[MenuInfoNum].pMenuInfo,(projectInfo.pMenuInfo[MenuInfoNum].NumberOfMenu+1)*sizeof(MENU_INFO));
+						pMenuInfo=&projectInfo.pMenuInfo[MenuInfoNum].pMenuInfo[projectInfo.pMenuInfo[MenuInfoNum].NumberOfMenu];
 
 						sprintf(temporary,"caption text");
@@ -578,5 +578,5 @@
 						pMenuInfo->pMenuInfo=0;
 
-						ProjectInfo.pMenuInfo[MenuInfoNum].NumberOfMenu++;
+						projectInfo.pMenuInfo[MenuInfoNum].NumberOfMenu++;
 
 						SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_INSERTSTRING,0,(long)pMenuInfo->caption);
@@ -593,5 +593,5 @@
 						i2=0;
 						i3=0;
-						pMenuInfo=GetMenuInfoFromList(&ProjectInfo.pMenuInfo[MenuInfoNum],&i2,i4,&i3);
+						pMenuInfo=GetMenuInfoFromList(&projectInfo.pMenuInfo[MenuInfoNum],&i2,i4,&i3);
 						if(pMenuInfo->pMenuInfo[i2].pMenuInfo){
 							//"ポップアップ アイテムを作成する場合は \"はい\" を、ポップアップと同じ階層にメニュー アイテムを作成する場合は \"いいえ\" を押して下さい。"
@@ -633,5 +633,5 @@
 						SendMessage(GetParent(MdiInfo[WndNum].MdiMenuInfo->hMenuEdit),WM_COMMAND,MAKELONG(0,LBN_SELCHANGE),(long)MdiInfo[WndNum].MdiMenuInfo->hList);
 					}
-					ProjectInfo.ModifyOfMaterial=1;
+					projectInfo.ModifyOfMaterial=1;
 					return 1;
 				case IDC_DELETEMENUITEM:
@@ -648,5 +648,5 @@
 					i2=0;
 					i3=0;
-					pMenuInfo=GetMenuInfoFromList(&ProjectInfo.pMenuInfo[MenuInfoNum],&i2,i4,&i3);
+					pMenuInfo=GetMenuInfoFromList(&projectInfo.pMenuInfo[MenuInfoNum],&i2,i4,&i3);
 
 					i3=1;
@@ -679,5 +679,5 @@
 					}
 
-					ProjectInfo.ModifyOfMaterial=1;
+					projectInfo.ModifyOfMaterial=1;
 					return 1;
 				case IDC_UP:
@@ -694,5 +694,5 @@
 					i2=0;
 					i3=0;
-					pMenuInfo=GetMenuInfoFromList(&ProjectInfo.pMenuInfo[MenuInfoNum],&i2,i4,&i3);
+					pMenuInfo=GetMenuInfoFromList(&projectInfo.pMenuInfo[MenuInfoNum],&i2,i4,&i3);
 					if(i2==0) return 1;
 					i2--;
@@ -703,9 +703,9 @@
 
 					SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_RESETCONTENT,0,0);
-					SetMenuDataList(MdiInfo[WndNum].MdiMenuInfo->hList,&ProjectInfo.pMenuInfo[MenuInfoNum],0);
+					SetMenuDataList(MdiInfo[WndNum].MdiMenuInfo->hList,&projectInfo.pMenuInfo[MenuInfoNum],0);
 					if(!pMenuInfo->pMenuInfo[i2].pMenuInfo)
 						SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_SETCURSEL,i4-1,0);
 
-					ProjectInfo.ModifyOfMaterial=1;
+					projectInfo.ModifyOfMaterial=1;
 					return 1;
 				case IDC_DOWN:
@@ -722,5 +722,5 @@
 					i2=0;
 					i3=0;
-					pMenuInfo=GetMenuInfoFromList(&ProjectInfo.pMenuInfo[MenuInfoNum],&i2,i4,&i3);
+					pMenuInfo=GetMenuInfoFromList(&projectInfo.pMenuInfo[MenuInfoNum],&i2,i4,&i3);
 					if(pMenuInfo->NumberOfMenu<=i2+1) return 1;
 
@@ -730,9 +730,9 @@
 
 					SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_RESETCONTENT,0,0);
-					SetMenuDataList(MdiInfo[WndNum].MdiMenuInfo->hList,&ProjectInfo.pMenuInfo[MenuInfoNum],0);
+					SetMenuDataList(MdiInfo[WndNum].MdiMenuInfo->hList,&projectInfo.pMenuInfo[MenuInfoNum],0);
 					if(!pMenuInfo->pMenuInfo[i2].pMenuInfo)
 						SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_SETCURSEL,i4+1,0);
 
-					ProjectInfo.ModifyOfMaterial=1;
+					projectInfo.ModifyOfMaterial=1;
 					return 1;
 			}
@@ -810,5 +810,5 @@
 				i2=0;
 				i3=0;
-				pMenuInfo=GetMenuInfoFromList(&ProjectInfo.pMenuInfo[MenuInfoNum],&i2,i,&i3);
+				pMenuInfo=GetMenuInfoFromList(&projectInfo.pMenuInfo[MenuInfoNum],&i2,i,&i3);
 				pMenuInfo=&pMenuInfo->pMenuInfo[i2];
 
