Index: trunk/ab5.0/abdev/abdev/MenuProc.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/MenuProc.cpp	(revision 626)
+++ trunk/ab5.0/abdev/abdev/MenuProc.cpp	(revision 629)
@@ -121,7 +121,7 @@
 	// ウィンドウ プロパティを更新
 	for(i=0;i<MdiInfo.size();i++){
-		if(MdiInfo[i].hwnd&&MdiInfo[i].DocType==WNDTYPE_RAD){
-			if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW)
-				ChangePropertyWindow(i,GetWndInfoNum(MdiInfo[i].path));
+		if(MdiInfo[i]->hwnd&&MdiInfo[i]->DocType==WNDTYPE_RAD){
+			if(MdiInfo[i]->MdiRadInfo->SelectingItem[0]==SELECT_WINDOW)
+				ChangePropertyWindow(i,GetWndInfoNum(MdiInfo[i]->path));
 		}
 	}
@@ -135,6 +135,6 @@
 	//ウィンドウが開かれている場合は閉じる
 	for(i=0;i<MdiInfo.size();i++){
-		if(MdiInfo[i].hwnd&&lstrcmpi(projectInfo.pMenuInfo[MenuInfoNum].IdName,MdiInfo[i].path.c_str())==0){
-			SendMessage(MdiInfo[i].hwnd,WM_CLOSE,0,0);
+		if(MdiInfo[i]->hwnd&&lstrcmpi(projectInfo.pMenuInfo[MenuInfoNum].IdName,MdiInfo[i]->path.c_str())==0){
+			SendMessage(MdiInfo[i]->hwnd,WM_CLOSE,0,0);
 			break;
 		}
@@ -165,7 +165,7 @@
 	// ウィンドウ プロパティを更新
 	for(i=0;i<MdiInfo.size();i++){
-		if(MdiInfo[i].hwnd&&MdiInfo[i].DocType==WNDTYPE_RAD){
-			if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW)
-				ChangePropertyWindow(i,GetWndInfoNum(MdiInfo[i].path.c_str()));
+		if(MdiInfo[i]->hwnd&&MdiInfo[i]->DocType==WNDTYPE_RAD){
+			if(MdiInfo[i]->MdiRadInfo->SelectingItem[0]==SELECT_WINDOW)
+				ChangePropertyWindow(i,GetWndInfoNum(MdiInfo[i]->path.c_str()));
 		}
 	}
@@ -199,6 +199,6 @@
 	while(hChild){
 		i=GetWndNum(hChild);
-		if(MdiInfo[i].DocType==WNDTYPE_MENU){
-			if(lstrcmpi(MdiInfo[i].path.c_str(),pMenuInfo->IdName)==0) break;
+		if(MdiInfo[i]->DocType==WNDTYPE_MENU){
+			if(lstrcmpi(MdiInfo[i]->path.c_str(),pMenuInfo->IdName)==0) break;
 		}
 		hChild=GetNextWindow(hChild,GW_HWNDNEXT);
@@ -228,4 +228,5 @@
 
 	mdic.lParam=0;
+	mdic.style |= WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_SYSMENU | WS_CAPTION | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX;
 	hChild=(HWND)SendMessage(hClient,WM_MDICREATE,0,(long)&mdic);	//ウィンドウ作成
 
@@ -248,10 +249,10 @@
 
 	//ウィンドウのID登録
-	MdiInfo.push_back( MDIINFO() );
+	MdiInfo.push_back( new MDIINFO() );
 	i = MdiInfo.size()-1;
-	MdiInfo[i].hwnd=hChild;
-	MdiInfo[i].DocType=WNDTYPE_MENU;
-	MdiInfo[i].title = pMenuInfo->IdName;
-	MdiInfo[i].path = pMenuInfo->IdName;
+	MdiInfo[i]->hwnd=hChild;
+	MdiInfo[i]->DocType=WNDTYPE_MENU;
+	MdiInfo[i]->title = pMenuInfo->IdName;
+	MdiInfo[i]->path = pMenuInfo->IdName;
 
 
@@ -259,10 +260,10 @@
 	//MENU ウィンドウ情報
 
-	MdiInfo[i].MdiMenuInfo=(MDIMENUINFO *)GlobalAlloc(GPTR,sizeof(MDIMENUINFO));
-
-	MdiInfo[i].MdiMenuInfo->hList=hListWnd;
-
-	MdiInfo[i].MdiMenuInfo->hMenuEdit=hMenuEdit;
-	MdiInfo[i].MdiMenuInfo->hEdit_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_PROJECT_MENUEDIT),hMenuEdit,(DLGPROC)MenuEditDlg);
+	MdiInfo[i]->MdiMenuInfo=(MDIMENUINFO *)GlobalAlloc(GPTR,sizeof(MDIMENUINFO));
+
+	MdiInfo[i]->MdiMenuInfo->hList=hListWnd;
+
+	MdiInfo[i]->MdiMenuInfo->hMenuEdit=hMenuEdit;
+	MdiInfo[i]->MdiMenuInfo->hEdit_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_PROJECT_MENUEDIT),hMenuEdit,(DLGPROC)MenuEditDlg);
 
 	SCROLLINFO ScrollInfo;
@@ -270,5 +271,5 @@
 	ScrollInfo.fMask=SIF_POS;
 	ScrollInfo.nPos=0;
-	SetScrollInfo(MdiInfo[i].MdiMenuInfo->hMenuEdit,SB_VERT,&ScrollInfo,1);
+	SetScrollInfo(MdiInfo[i]->MdiMenuInfo->hMenuEdit,SB_VERT,&ScrollInfo,1);
 
 	SendMessage(hListWnd,LB_RESETCONTENT,0,0);
@@ -282,6 +283,6 @@
 	//ウィンドウ位置を初期化
 	GetClientRect(hChild,&rect);
-	MoveWindow(MdiInfo[i].MdiMenuInfo->hMenuEdit,0,0,172,rect.bottom,1);
-	MoveWindow(MdiInfo[i].MdiMenuInfo->hList,172,0,rect.right-172,rect.bottom,1);
+	MoveWindow(MdiInfo[i]->MdiMenuInfo->hMenuEdit,0,0,172,rect.bottom,1);
+	MoveWindow(MdiInfo[i]->MdiMenuInfo->hList,172,0,rect.right-172,rect.bottom,1);
 
 	//Docコンボボックスに追加
@@ -334,7 +335,7 @@
 			SetPosCenter(hwnd);
 			i=GetWndNum(GetWindow(hClient,GW_CHILD));
-			GetDlgItemText(MdiInfo[i].MdiMenuInfo->hEdit_Dlg,IDC_IDNAME,temporary,MAX_PATH);
+			GetDlgItemText(MdiInfo[i]->MdiMenuInfo->hEdit_Dlg,IDC_IDNAME,temporary,MAX_PATH);
 			SetDlgItemText(hwnd,IDC_IDNAME,temporary);
-			GetDlgItemText(MdiInfo[i].MdiMenuInfo->hEdit_Dlg,IDC_CAPTION,temporary,MAX_PATH);
+			GetDlgItemText(MdiInfo[i]->MdiMenuInfo->hEdit_Dlg,IDC_CAPTION,temporary,MAX_PATH);
 			SetDlgItemText(hwnd,IDC_CAPTION,temporary);
 
@@ -396,7 +397,7 @@
 					WndNum=GetWndNum(GetParent(GetParent(hwnd)));
 					if(WndNum==-1) return 1;
-					MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum].path);
-
-					i4=SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_GETCURSEL,0,0);
+					MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum]->path);
+
+					i4=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCURSEL,0,0);
 					if(i4==LB_ERR) return 1;
 					i2=0;
@@ -410,17 +411,17 @@
 					if(!pMenuInfo->pMenuInfo){
 						//ID
-						SetDlgItemText(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_IDNAME,pMenuInfo->IdName);
+						SetDlgItemText(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_IDNAME,pMenuInfo->IdName);
 					}
 
 					//キャプション
-					SetDlgItemText(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_CAPTION,pMenuInfo->caption);
+					SetDlgItemText(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_CAPTION,pMenuInfo->caption);
 
 					//リストへキャプションを反映
-					SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_DELETESTRING,i4,0);
+					SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_DELETESTRING,i4,0);
 					memset(temporary,' ',i3*4);
 					lstrcpy(temporary+i3*4,pMenuInfo->caption);
-					SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_INSERTSTRING,i4,(long)temporary);
-
-					SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_SETCURSEL,i4,0);
+					SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_INSERTSTRING,i4,(long)temporary);
+
+					SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_SETCURSEL,i4,0);
 					projectInfo.ModifyOfMaterial=1;
 					return 1;
@@ -428,7 +429,7 @@
 					WndNum=GetWndNum(GetParent(GetParent(hwnd)));
 					if(WndNum==-1) return 1;
-					MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum].path);
-
-					i4=SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_GETCURSEL,0,0);
+					MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum]->path);
+
+					i4=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCURSEL,0,0);
 					if(i4==LB_ERR) return 1;
 					i2=0;
@@ -446,5 +447,5 @@
 
 						for(i2=0;i2<i;i2++)
-							SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_DELETESTRING,i4+1,0);
+							SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_DELETESTRING,i4+1,0);
 
 						HeapDefaultFree(pMenuInfo->pMenuInfo);
@@ -468,5 +469,5 @@
 						pMenuInfo->type=MFT_STRING;
 					}
-					SendMessage(MdiInfo[WndNum].hwnd,WM_COMMAND,MAKELONG(0,LBN_SELCHANGE),(long)MdiInfo[WndNum].MdiMenuInfo->hList);
+					SendMessage(MdiInfo[WndNum]->hwnd,WM_COMMAND,MAKELONG(0,LBN_SELCHANGE),(long)MdiInfo[WndNum]->MdiMenuInfo->hList);
 					projectInfo.ModifyOfMaterial=1;
 					return 1;
@@ -474,7 +475,7 @@
 					WndNum=GetWndNum(GetParent(GetParent(hwnd)));
 					if(WndNum==-1) return 1;
-					MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum].path);
-
-					i4=SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_GETCURSEL,0,0);
+					MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum]->path);
+
+					i4=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCURSEL,0,0);
 					if(i4==LB_ERR) return 1;
 					i2=0;
@@ -490,8 +491,8 @@
 						pMenuInfo->type=MFT_SEPARATOR;
 
-						SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_DELETESTRING,i4,0);
+						SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_DELETESTRING,i4,0);
 						memset(temporary,' ',i3*4);
 						lstrcpy(temporary+i3*4,"-");
-						SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_INSERTSTRING,i4,(long)temporary);
+						SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_INSERTSTRING,i4,(long)temporary);
 					}
 					else{
@@ -504,18 +505,18 @@
 						pMenuInfo->type=MFT_STRING;
 
-						SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_DELETESTRING,i4,0);
+						SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_DELETESTRING,i4,0);
 						memset(temporary,' ',i3*4);
 						lstrcpy(temporary+i3*4,pMenuInfo->caption);
-						SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_INSERTSTRING,i4,(long)temporary);
-					}
-					SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_SETCURSEL,i4,0);
-					SendMessage(MdiInfo[WndNum].hwnd,WM_COMMAND,MAKELONG(0,LBN_SELCHANGE),(long)MdiInfo[WndNum].MdiMenuInfo->hList);
+						SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_INSERTSTRING,i4,(long)temporary);
+					}
+					SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_SETCURSEL,i4,0);
+					SendMessage(MdiInfo[WndNum]->hwnd,WM_COMMAND,MAKELONG(0,LBN_SELCHANGE),(long)MdiInfo[WndNum]->MdiMenuInfo->hList);
 					return 1;
 				case IDC_CHECKED:
 					WndNum=GetWndNum(GetParent(GetParent(hwnd)));
 					if(WndNum==-1) return 1;
-					MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum].path);
-
-					i4=SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_GETCURSEL,0,0);
+					MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum]->path);
+
+					i4=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCURSEL,0,0);
 					if(i4==LB_ERR) return 1;
 					i2=0;
@@ -534,7 +535,7 @@
 					WndNum=GetWndNum(GetParent(GetParent(hwnd)));
 					if(WndNum==-1) return 1;
-					MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum].path);
-
-					i4=SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_GETCURSEL,0,0);
+					MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum]->path);
+
+					i4=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCURSEL,0,0);
 					if(i4==LB_ERR) return 1;
 					i2=0;
@@ -553,5 +554,5 @@
 					WndNum=GetWndNum(GetParent(GetParent(hwnd)));
 					if(WndNum==-1) return 1;
-					MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum].path);
+					MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum]->path);
 
 					if(projectInfo.pMenuInfo[MenuInfoNum].NumberOfMenu==0){
@@ -573,10 +574,10 @@
 						projectInfo.pMenuInfo[MenuInfoNum].NumberOfMenu++;
 
-						SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_INSERTSTRING,0,(long)pMenuInfo->caption);
-						SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_SETCURSEL,0,0);
-						SendMessage(GetParent(MdiInfo[WndNum].MdiMenuInfo->hMenuEdit),WM_COMMAND,MAKELONG(0,LBN_SELCHANGE),(long)MdiInfo[WndNum].MdiMenuInfo->hList);
+						SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_INSERTSTRING,0,(long)pMenuInfo->caption);
+						SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_SETCURSEL,0,0);
+						SendMessage(GetParent(MdiInfo[WndNum]->MdiMenuInfo->hMenuEdit),WM_COMMAND,MAKELONG(0,LBN_SELCHANGE),(long)MdiInfo[WndNum]->MdiMenuInfo->hList);
 					}
 					else{
-						i4=SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_GETCURSEL,0,0);
+						i4=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCURSEL,0,0);
 						if(i4==LB_ERR){
 							//"新しいメニュー アイテムの挿入位置を選択して下さい"
@@ -622,7 +623,7 @@
 						pMenuInfo->NumberOfMenu++;
 
-						SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_INSERTSTRING,i4,(long)temporary);
-						SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_SETCURSEL,i4,0);
-						SendMessage(GetParent(MdiInfo[WndNum].MdiMenuInfo->hMenuEdit),WM_COMMAND,MAKELONG(0,LBN_SELCHANGE),(long)MdiInfo[WndNum].MdiMenuInfo->hList);
+						SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_INSERTSTRING,i4,(long)temporary);
+						SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_SETCURSEL,i4,0);
+						SendMessage(GetParent(MdiInfo[WndNum]->MdiMenuInfo->hMenuEdit),WM_COMMAND,MAKELONG(0,LBN_SELCHANGE),(long)MdiInfo[WndNum]->MdiMenuInfo->hList);
 					}
 					projectInfo.ModifyOfMaterial=1;
@@ -631,7 +632,7 @@
 					WndNum=GetWndNum(GetParent(GetParent(hwnd)));
 					if(WndNum==-1) return 1;
-					MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum].path);
-
-					i4=SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_GETCURSEL,0,0);
+					MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum]->path);
+
+					i4=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCURSEL,0,0);
 					if(i4==LB_ERR){
 						//"削除するメニュー アイテムを選択して下さい"
@@ -664,10 +665,10 @@
 
 					for(i=0;i<i3;i++)
-						SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_DELETESTRING,i4,0);
-
-					i=SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_GETCOUNT,0,0)-1;
+						SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_DELETESTRING,i4,0);
+
+					i=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCOUNT,0,0)-1;
 					if(i){
 						if(i<i4) i4=i;
-						SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_SETCURSEL,i4,0);
+						SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_SETCURSEL,i4,0);
 					}
 
@@ -677,7 +678,7 @@
 					WndNum=GetWndNum(GetParent(GetParent(hwnd)));
 					if(WndNum==-1) return 1;
-					MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum].path);
-
-					i4=SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_GETCURSEL,0,0);
+					MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum]->path);
+
+					i4=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCURSEL,0,0);
 					if(i4==LB_ERR){
 						//"移動するメニュー アイテムを選択して下さい"
@@ -695,8 +696,8 @@
 					memcpy(&pMenuInfo->pMenuInfo[i2+1],&tempMenuInfo,sizeof(MENU_INFO));
 
-					SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_RESETCONTENT,0,0);
-					SetMenuDataList(MdiInfo[WndNum].MdiMenuInfo->hList,&projectInfo.pMenuInfo[MenuInfoNum],0);
+					SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_RESETCONTENT,0,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);
+						SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_SETCURSEL,i4-1,0);
 
 					projectInfo.ModifyOfMaterial=1;
@@ -705,7 +706,7 @@
 					WndNum=GetWndNum(GetParent(GetParent(hwnd)));
 					if(WndNum==-1) return 1;
-					MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum].path);
-
-					i4=SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_GETCURSEL,0,0);
+					MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum]->path);
+
+					i4=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCURSEL,0,0);
 					if(i4==LB_ERR){
 						//"移動するメニュー アイテムを選択して下さい"
@@ -722,8 +723,8 @@
 					memcpy(&pMenuInfo->pMenuInfo[i2+1],&tempMenuInfo,sizeof(MENU_INFO));
 
-					SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_RESETCONTENT,0,0);
-					SetMenuDataList(MdiInfo[WndNum].MdiMenuInfo->hList,&projectInfo.pMenuInfo[MenuInfoNum],0);
+					SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_RESETCONTENT,0,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);
+						SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_SETCURSEL,i4+1,0);
 
 					projectInfo.ModifyOfMaterial=1;
@@ -770,5 +771,5 @@
 			ScrollInfo.fMask=SIF_PAGE|SIF_RANGE|SIF_POS;
 			GetScrollInfo(hwnd,SB_VERT,&ScrollInfo);
-			GetClientRect(MdiInfo[i].MdiMenuInfo->hEdit_Dlg,&rect);
+			GetClientRect(MdiInfo[i]->MdiMenuInfo->hEdit_Dlg,&rect);
 			ScrollInfo.nMin=0;
 			ScrollInfo.nMax=rect.bottom;
@@ -796,7 +797,7 @@
 			WndNum=GetWndNum(hwnd);
 			if(WndNum==-1) return 0;
-			MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum].path);
-			if((HWND)lParam==MdiInfo[WndNum].MdiMenuInfo->hList&&HIWORD(wParam)==LBN_SELCHANGE){
-				i=SendMessage(MdiInfo[WndNum].MdiMenuInfo->hList,LB_GETCURSEL,0,0);
+			MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum]->path);
+			if((HWND)lParam==MdiInfo[WndNum]->MdiMenuInfo->hList&&HIWORD(wParam)==LBN_SELCHANGE){
+				i=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCURSEL,0,0);
 				i2=0;
 				i3=0;
@@ -805,48 +806,48 @@
 
 				if(pMenuInfo->pMenuInfo){
-					SetDlgItemText(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_CAPTION,pMenuInfo->caption);
-					SetDlgItemText(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_IDNAME,"");
-					EnableWindow(GetDlgItem(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_IDSTATIC),0);
-					EnableWindow(GetDlgItem(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_RENAME),1);
-					EnableWindow(GetDlgItem(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_POPUP),1);
-					EnableWindow(GetDlgItem(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR),0);
-					EnableWindow(GetDlgItem(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_CHECKED),1);
-					EnableWindow(GetDlgItem(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_DISABLED),1);
-					SendDlgItemMessage(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_POPUP,BM_SETCHECK,BST_CHECKED,0);
-					SendDlgItemMessage(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR,BM_SETCHECK,BST_UNCHECKED,0);
+					SetDlgItemText(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_CAPTION,pMenuInfo->caption);
+					SetDlgItemText(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_IDNAME,"");
+					EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_IDSTATIC),0);
+					EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_RENAME),1);
+					EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_POPUP),1);
+					EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR),0);
+					EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_CHECKED),1);
+					EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_DISABLED),1);
+					SendDlgItemMessage(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_POPUP,BM_SETCHECK,BST_CHECKED,0);
+					SendDlgItemMessage(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR,BM_SETCHECK,BST_UNCHECKED,0);
 				}
 				else if(pMenuInfo->type==MFT_STRING){
-					SetDlgItemText(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_CAPTION,pMenuInfo->caption);
-					SetDlgItemText(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_IDNAME,pMenuInfo->IdName);
-					EnableWindow(GetDlgItem(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_IDSTATIC),1);
-					EnableWindow(GetDlgItem(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_CAPTIONSTATIC),1);
-					EnableWindow(GetDlgItem(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_RENAME),1);
-					EnableWindow(GetDlgItem(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_POPUP),1);
-					EnableWindow(GetDlgItem(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR),1);
-					EnableWindow(GetDlgItem(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_CHECKED),1);
-					EnableWindow(GetDlgItem(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_DISABLED),1);
-					SendDlgItemMessage(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_POPUP,BM_SETCHECK,BST_UNCHECKED,0);
-					SendDlgItemMessage(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR,BM_SETCHECK,BST_UNCHECKED,0);
+					SetDlgItemText(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_CAPTION,pMenuInfo->caption);
+					SetDlgItemText(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_IDNAME,pMenuInfo->IdName);
+					EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_IDSTATIC),1);
+					EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_CAPTIONSTATIC),1);
+					EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_RENAME),1);
+					EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_POPUP),1);
+					EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR),1);
+					EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_CHECKED),1);
+					EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_DISABLED),1);
+					SendDlgItemMessage(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_POPUP,BM_SETCHECK,BST_UNCHECKED,0);
+					SendDlgItemMessage(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR,BM_SETCHECK,BST_UNCHECKED,0);
 				}
 				else if(pMenuInfo->type==MFT_SEPARATOR){
-					SetDlgItemText(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_CAPTION,"");
-					SetDlgItemText(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_IDNAME,"");
-					EnableWindow(GetDlgItem(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_IDSTATIC),0);
-					EnableWindow(GetDlgItem(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_CAPTIONSTATIC),0);
-					EnableWindow(GetDlgItem(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_RENAME),0);
-					EnableWindow(GetDlgItem(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_POPUP),0);
-					EnableWindow(GetDlgItem(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR),1);
-					EnableWindow(GetDlgItem(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_CHECKED),0);
-					EnableWindow(GetDlgItem(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_DISABLED),0);
-					SendDlgItemMessage(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_POPUP,BM_SETCHECK,BST_UNCHECKED,0);
-					SendDlgItemMessage(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR,BM_SETCHECK,BST_CHECKED,0);
+					SetDlgItemText(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_CAPTION,"");
+					SetDlgItemText(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_IDNAME,"");
+					EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_IDSTATIC),0);
+					EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_CAPTIONSTATIC),0);
+					EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_RENAME),0);
+					EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_POPUP),0);
+					EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR),1);
+					EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_CHECKED),0);
+					EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_DISABLED),0);
+					SendDlgItemMessage(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_POPUP,BM_SETCHECK,BST_UNCHECKED,0);
+					SendDlgItemMessage(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR,BM_SETCHECK,BST_CHECKED,0);
 				}
 
 				if(pMenuInfo->state&MFS_CHECKED) i2=BST_CHECKED;
 				else i2=BST_UNCHECKED;
-				SendDlgItemMessage(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_CHECKED,BM_SETCHECK,i2,0);
+				SendDlgItemMessage(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_CHECKED,BM_SETCHECK,i2,0);
 				if(pMenuInfo->state&MFS_DISABLED) i2=BST_CHECKED;
 				else i2=BST_UNCHECKED;
-				SendDlgItemMessage(MdiInfo[WndNum].MdiMenuInfo->hEdit_Dlg,IDC_DISABLED,BM_SETCHECK,i2,0);
+				SendDlgItemMessage(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_DISABLED,BM_SETCHECK,i2,0);
 			}
 			return 0;
@@ -856,5 +857,5 @@
 			if(i==-1) return 0;	//ウィンドウが初期状態の場合
 
-			i=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[i].title.c_str());
+			i=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[i]->title.c_str());
 			SendMessage(hDocCombo,CB_SETCURSEL,i,0);
 			SetStatusText(NULL);
@@ -864,6 +865,6 @@
 			WndNum=GetWndNum(hwnd);
 			if(WndNum==-1) break;
-			MoveWindow(MdiInfo[WndNum].MdiMenuInfo->hMenuEdit,0,0,172,HIWORD(lParam),1);
-			MoveWindow(MdiInfo[WndNum].MdiMenuInfo->hList,172,0,LOWORD(lParam)-172,HIWORD(lParam),1);
+			MoveWindow(MdiInfo[WndNum]->MdiMenuInfo->hMenuEdit,0,0,172,HIWORD(lParam),1);
+			MoveWindow(MdiInfo[WndNum]->MdiMenuInfo->hList,172,0,LOWORD(lParam)-172,HIWORD(lParam),1);
 			break;
 		case WM_CLOSE:
