Index: trunk/ab5.0/abdev/abdev/src/MainFrame.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/src/MainFrame.cpp	(revision 625)
+++ trunk/ab5.0/abdev/abdev/src/MainFrame.cpp	(revision 629)
@@ -8,4 +8,157 @@
 void ResetTextEditFont(HWND hwnd);
 
+void MainFrame::Resized()
+{
+	int width_owner,height_owner;
+	int height_Rebar;
+	int height_MdiClient;
+	RECT rect,StatusRect,RebarRect;
+
+	this->GetClientRect( &rect );
+	width_owner=rect.right;
+	height_owner=rect.bottom;
+
+	//Rebar
+	SendMessage(pobj_Rebar->hRebar,WM_SIZE,0,MAKELONG(width_owner,height_owner));
+	::UpdateWindow(pobj_Rebar->hRebar);
+
+	//Status bar
+#define STATUSBAR_PARTS_NUM 5
+	int sb_size[STATUSBAR_PARTS_NUM];
+	sb_size[0]=width_owner-340;
+	sb_size[1]=width_owner-220;
+	sb_size[2]=width_owner-120;
+	sb_size[3]=width_owner-50;
+	sb_size[4]=width_owner;
+	extern HWND hStatusBar;
+	::SendMessage(hStatusBar,SB_SETPARTS,STATUSBAR_PARTS_NUM,(LPARAM)sb_size);
+	::SendMessage(hStatusBar,WM_SIZE,0,MAKELONG(width_owner,height_owner));
+	::UpdateWindow(hStatusBar);
+
+	//Status bar
+	int height_Statusbar;
+	SendMessage(hStatusBar,SB_GETRECT,0,(long)&StatusRect);
+	height_Statusbar=StatusRect.bottom;
+
+	::GetWindowRect(pobj_Rebar->hRebar,&RebarRect);
+	height_Rebar=RebarRect.bottom-RebarRect.top+2;
+
+	int height_dv;	//Width of Debugger View
+	int height_cv;	//Width of Compiler View
+	height_dv=0;
+	height_cv=0;
+#ifndef THETEXT
+	extern BOOL bClipCompileView;
+	if(bClipCompileView){
+		if(pobj_Debugger->IsDebuggerView()){
+			//デバッガビューが表示されているとき
+			height_dv=pobj_nv->height_ClipDebuggerView+LEVER_THICK;
+		}
+
+		extern HWND hCompileView;
+		if(hCompileView){
+			//コンパイラビューが表示されているとき
+			height_cv=pobj_nv->height_ClipCompileView+LEVER_THICK;
+		}
+	}
+#endif
+
+	int width_pjv=0;	//Width of Project View
+	if(pobj_nv->bClipProjectView){
+		extern HWND hProjectView;
+		if(::IsWindowVisible(hProjectView)){
+			//プロジェクトビューが表示されているとき
+			width_pjv=pobj_nv->width_ClipProjectView+LEVER_THICK;
+		}
+	}
+
+	int width_SideWeb=0;
+	if( pobj_SideWeb )
+	{
+		if(pobj_SideWeb->bShow){
+			width_SideWeb=pobj_nv->width_WebSearchView+LEVER_THICK;
+		}
+	}
+
+	//MDIクライアントの高さ
+	height_MdiClient=height_owner-(
+		height_Rebar+
+		height_dv+
+		height_cv+
+		height_Statusbar
+		);
+
+	//タブコントロール
+	int tab_height;
+	if(TabCtrl_GetItemCount(pobj_MainTab->hTab)==0) tab_height=0;
+	else{
+		RECT rc;
+		TabCtrl_GetItemRect(pobj_MainTab->hTab,0,&rc);
+		tab_height=rc.bottom-rc.top;
+	}
+	::MoveWindow(pobj_MainTab->hTab,
+		width_pjv,
+		height_Rebar,
+		width_owner-width_pjv-width_SideWeb,
+		tab_height,
+		1);
+
+	//MDIクライアント
+	::MoveWindow(
+		hClient,
+		width_pjv,
+		height_Rebar+tab_height,
+		width_owner-width_pjv-width_SideWeb,
+		height_MdiClient-tab_height,
+		1
+	);
+
+	if( pobj_SideWeb )
+	{
+		if(pobj_SideWeb->bShow){
+			//SideWeb
+			pobj_SideWeb->resize(
+				width_owner - pobj_nv->width_WebSearchView,
+				height_Rebar,
+				pobj_nv->width_WebSearchView,
+				height_MdiClient);
+		}
+		else pobj_SideWeb->resize(0,0,0,0);
+	}
+
+	if(width_pjv){
+		//プロジェクトビュー
+		extern HWND hProjectView;
+		::MoveWindow(hProjectView,
+			0,
+			height_Rebar,
+			pobj_nv->width_ClipProjectView,
+			height_MdiClient,
+			1);
+		::InvalidateRect(hProjectView,NULL,0);
+	}
+
+	if(height_dv){
+#ifndef THETEXT
+		//デバッガビュー
+		pobj_Debugger->resize(
+			0,
+			height_Rebar+height_MdiClient+LEVER_THICK,
+			width_owner,
+			pobj_nv->height_ClipDebuggerView);
+#endif
+	}
+	if(height_cv){
+		//コンパイラビュー
+		extern HWND hCompileView;
+		::MoveWindow(hCompileView,
+			0,
+			height_Rebar+height_MdiClient+height_dv+LEVER_THICK,
+			width_owner,
+			pobj_nv->height_ClipCompileView,
+			1);
+	}
+}
+
 void MainFrame::OpenWebBrowser( const std::string &url )
 {
@@ -27,12 +180,22 @@
 
 	// MDIベースを作成
-	mdiWindow = new MdiWindow();
-	mdiWindow->Create(
-		m_hWnd,
-		rect,
-		NULL,
-		WS_CHILD
-	);
-	wam.AddMdiWindow( mdiWindow );
+    // フレームウィンドウのビューウィンドウを作成
+	int indexOfWindowSubMenu = pobj_MainMenu->FindSubMenuIndex( "ウィンドウ(&W)" );
+	HMENU hWindowSubMenu = NULL;
+	if( indexOfWindowSubMenu != -1 )
+	{
+		hWindowSubMenu = GetSubMenu( pobj_MainMenu->hMenu, indexOfWindowSubMenu );
+	}
+	CreateMDIClient( hWindowSubMenu );
+	wam.AddMdiClientWindow( m_hWndClient );
+
+	// TODO: hClientを廃止し、m_hWndClientに統一すること
+	extern HWND hClient;
+	hClient = m_hWndClient;
+
+    // メッセージループにメッセージフィルタとアイドルハンドラを追加
+	CMessageLoop* pLoop = Program::_Module.GetMessageLoop();
+    pLoop->AddMessageFilter(this);
+    pLoop->AddIdleHandler(this);
 
 
@@ -58,5 +221,5 @@
 void MainFrame::OnSize(UINT nType, CSize size)
 {
-	//mdiWindow->MoveWindow( 0, 0, size.cx, size.cy );
+	this->Resized();
 }
 
@@ -147,7 +310,4 @@
 void MainFrame::OnDestroy()
 {
-	mdiWindow->DestroyWindow();
-	delete mdiWindow;
-
 	::PostQuitMessage( 0 );
 }
@@ -257,5 +417,5 @@
 		//レバーオブジェクトが存在するとき
 		if(pnmh->hwndFrom==pobj_Rebar->hRebar&&pnmh->code==RBN_HEIGHTCHANGE){
-			ResizeOwnerWnd();
+			this->Resized();
 			return 0;
 		}
@@ -316,6 +476,6 @@
 				mii.dwTypeData=temporary;
 				mii.fType=MFT_STRING;
-				if(!MdiInfo[WndNum].path.empty()){
-					_splitpath(MdiInfo[WndNum].path.c_str(),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 +489,5 @@
 				/*「絶対パスをコピー」「フォルダを開く」「ファイルを削除」
 												コマンドを場合によって無効化にする */
-				if(!MdiInfo[WndNum].path.empty()){
+				if(!MdiInfo[WndNum]->path.empty()){
 					EnableMenuItem(hTabMenu,IDM_PATH_COPY,MF_BYCOMMAND|MF_ENABLED);
 					EnableMenuItem(hTabMenu,IDM_FOLDER_OPEN,MF_BYCOMMAND|MF_ENABLED);
@@ -364,4 +524,21 @@
 	}
 	DragFinish(hDropInfo);
+}
+
+void MainFrame::OnPaint( HDC dummy )
+{
+	PAINTSTRUCT ps;
+	HDC hdc = this->BeginPaint( &ps );
+
+	HBRUSH hBrush = CreateSolidBrush( GetSysColor( COLOR_3DFACE ) );
+
+	RECT rect;
+	this->GetClientRect( &rect );
+
+	FillRect( hdc, &rect, hBrush );
+
+	DeleteObject( hBrush );
+
+	this->EndPaint( &ps );
 }
 
@@ -382,6 +559,6 @@
 	while(hChild){
 		WndNum=GetWndNum(hChild);
-		if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){
-			if(lstrcmpi(MdiInfo[WndNum].path.c_str(),temporary)==0) break;
+		if(IS_DOCUMENT_TEXT(MdiInfo[WndNum]->DocType)){
+			if(lstrcmpi(MdiInfo[WndNum]->path.c_str(),temporary)==0) break;
 		}
 		hChild=::GetNextWindow(hChild,GW_HWNDNEXT);
@@ -398,5 +575,5 @@
 	::UpdateWindow(hChild);
 
-	char *pTemp=MdiInfo[WndNum].pMdiTextEdit->buffer;
+	char *pTemp=MdiInfo[WndNum]->pMdiTextEdit->buffer;
 
 	//行の先頭インデックスを取得（取得する行の番号はwParamで渡される）
@@ -549,5 +726,5 @@
 {
 	for( int i=0;i<MdiInfo.size();i++){
-		if(MdiInfo[i].hwnd) SaveDocument(MdiInfo[i].hwnd,NULL);
+		if(MdiInfo[i]->hwnd) SaveDocument(MdiInfo[i]->hwnd,NULL);
 	}
 	if( projectInfo.IsOpened() )
@@ -585,13 +762,13 @@
 	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);
@@ -604,9 +781,9 @@
 	if(!hChild) return;
 	int WndNum=GetWndNum(hChild);
-	if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType))
+	if(IS_DOCUMENT_TEXT(MdiInfo[WndNum]->DocType))
 		TextEdit_RedoCommand(WndNum);
-	else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD)
+	else if(MdiInfo[WndNum]->DocType==WNDTYPE_RAD)
 		Rad_RedoCommand(WndNum);
-	else if(MdiInfo[WndNum].DocType==WNDTYPE_ICONEDIT)
+	else if(MdiInfo[WndNum]->DocType==WNDTYPE_ICONEDIT)
 		IconEdit_RedoCommand(WndNum);
 }
@@ -616,5 +793,5 @@
 	HWND hChild=::GetWindow(hClient,GW_CHILD);
 	int WndNum=GetWndNum(hChild);
-	if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){
+	if(IS_DOCUMENT_TEXT(MdiInfo[WndNum]->DocType)){
 		HWND hEdit=::GetWindow(hChild,GW_CHILD);
 
@@ -624,5 +801,5 @@
 		HGLOBAL hGlobal=(char *)GlobalAlloc(GMEM_MOVEABLE,CharRange.cpMax-CharRange.cpMin+1);
 		char *pTemp=(char *)GlobalLock(hGlobal);
-		memcpy(pTemp,MdiInfo[WndNum].pMdiTextEdit->buffer+CharRange.cpMin,CharRange.cpMax-CharRange.cpMin);
+		memcpy(pTemp,MdiInfo[WndNum]->pMdiTextEdit->buffer+CharRange.cpMin,CharRange.cpMax-CharRange.cpMin);
 		pTemp[CharRange.cpMax-CharRange.cpMin]=0;
 		GlobalUnlock(hGlobal);
@@ -637,14 +814,14 @@
 		SendMessage(hEdit,WM_KEYDOWN,VK_DELETE,0);
 	}
-	else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD){
-		ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path);
-		int indexOfWndInfo = GetWndInfoNum(MdiInfo[WndNum].path);
+	else if(MdiInfo[WndNum]->DocType==WNDTYPE_RAD){
+		ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[WndNum]->path);
+		int indexOfWndInfo = GetWndInfoNum(MdiInfo[WndNum]->path);
 
 		//クリップボードに格納するためのデータを用意する
-		pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->pos.x-=17;
-		pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->pos.y-=10;
+		pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->pos.x-=17;
+		pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->pos.y-=10;
 		HGLOBAL hGlobal=Rad_GetChildInfoClipboardData(WndNum,indexOfWndInfo);
-		pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->pos.x+=17;
-		pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->pos.y+=10;
+		pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->pos.x+=17;
+		pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->pos.y+=10;
 
 		OpenClipboard();
@@ -654,7 +831,7 @@
 		CloseClipboard();
 
-		SendMessage(MdiInfo[WndNum].MdiRadInfo->hRad,WM_COMMAND,IDM_RAD_ITEM_DELETE,0);
-	}
-	else if(MdiInfo[WndNum].DocType==WNDTYPE_ICONEDIT){
+		SendMessage(MdiInfo[WndNum]->MdiRadInfo->hRad,WM_COMMAND,IDM_RAD_ITEM_DELETE,0);
+	}
+	else if(MdiInfo[WndNum]->DocType==WNDTYPE_ICONEDIT){
 		//クリップボードに格納するためのデータを用意する
 		HGLOBAL hGlobal=IconEdit_GetChildInfoClipboardData(WndNum);
@@ -666,8 +843,8 @@
 		CloseClipboard();
 
-		DeleteObject(MdiInfo[WndNum].MdiIconEditInfo->hSelectingBmp);
-		MdiInfo[WndNum].MdiIconEditInfo->SelectLevel=0;
-
-		IconEdit_EraseRect(WndNum,&MdiInfo[WndNum].MdiIconEditInfo->DraggingRect);
+		DeleteObject(MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp);
+		MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel=0;
+
+		IconEdit_EraseRect(WndNum,&MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect);
 	}
 }
@@ -677,5 +854,5 @@
 	HWND hChild=::GetWindow(hClient,GW_CHILD);
 	int WndNum=GetWndNum(hChild);
-	if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){
+	if(IS_DOCUMENT_TEXT(MdiInfo[WndNum]->DocType)){
 		HWND hEdit = ::GetWindow(hChild,GW_CHILD);
 
@@ -685,5 +862,5 @@
 		HGLOBAL hGlobal=(char *)GlobalAlloc(GMEM_MOVEABLE,CharRange.cpMax-CharRange.cpMin+1);
 		char *pTemp=(char *)GlobalLock(hGlobal);
-		memcpy(pTemp,MdiInfo[WndNum].pMdiTextEdit->buffer+CharRange.cpMin,CharRange.cpMax-CharRange.cpMin);
+		memcpy(pTemp,MdiInfo[WndNum]->pMdiTextEdit->buffer+CharRange.cpMin,CharRange.cpMax-CharRange.cpMin);
 		pTemp[CharRange.cpMax-CharRange.cpMin]=0;
 		GlobalUnlock(hGlobal);
@@ -695,6 +872,6 @@
 		CloseClipboard();
 	}
-	else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD){
-		int indexOfWndInfo = GetWndInfoNum(MdiInfo[WndNum].path);
+	else if(MdiInfo[WndNum]->DocType==WNDTYPE_RAD){
+		int indexOfWndInfo = GetWndInfoNum(MdiInfo[WndNum]->path);
 
 		//クリップボードに格納するためのデータを用意する
@@ -707,5 +884,5 @@
 		CloseClipboard();
 	}
-	else if(MdiInfo[WndNum].DocType==WNDTYPE_ICONEDIT){
+	else if(MdiInfo[WndNum]->DocType==WNDTYPE_ICONEDIT){
 		//クリップボードに格納するためのデータを用意する
 		HGLOBAL hGlobal=IconEdit_GetChildInfoClipboardData(WndNum);
@@ -722,5 +899,5 @@
 	HWND hChild=::GetWindow(hClient,GW_CHILD);
 	int WndNum=GetWndNum(hChild);
-	if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){
+	if(IS_DOCUMENT_TEXT(MdiInfo[WndNum]->DocType)){
 		HWND hEdit=::GetWindow(hChild,GW_CHILD);
 
@@ -762,5 +939,5 @@
 		ResetCaretPos(WndNum);
 	}
-	else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD){
+	else if(MdiInfo[WndNum]->DocType==WNDTYPE_RAD){
 		OpenClipboard();
 		extern DWORD dwRadClipboardID;
@@ -773,5 +950,5 @@
 		CloseClipboard();
 	}
-	else if(MdiInfo[WndNum].DocType==WNDTYPE_ICONEDIT){
+	else if(MdiInfo[WndNum]->DocType==WNDTYPE_ICONEDIT){
 		OpenClipboard();
 		HGLOBAL hGlobal=GetClipboardData(CF_BITMAP);
@@ -789,10 +966,10 @@
 	HWND hChild=::GetWindow(hClient,GW_CHILD);
 	int WndNum=GetWndNum(hChild);
-	if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){
+	if(IS_DOCUMENT_TEXT(MdiInfo[WndNum]->DocType)){
 		HWND hEdit=::GetWindow(hChild,GW_CHILD);
 		TextEdit_ReplaceUpdateUndoData(WndNum,"",0,1);
 	}
-	else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD)
-		SendMessage(MdiInfo[WndNum].MdiRadInfo->hRad,WM_COMMAND,IDM_RAD_ITEM_DELETE,0);
+	else if(MdiInfo[WndNum]->DocType==WNDTYPE_RAD)
+		SendMessage(MdiInfo[WndNum]->MdiRadInfo->hRad,WM_COMMAND,IDM_RAD_ITEM_DELETE,0);
 }
 
@@ -801,14 +978,14 @@
 	HWND hChild=::GetWindow(hClient,GW_CHILD);
 	int WndNum=GetWndNum(hChild);
-	if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){
+	if(IS_DOCUMENT_TEXT(MdiInfo[WndNum]->DocType)){
 		HWND hEdit=::GetWindow(hChild,GW_CHILD);
 
-		MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x=0;
-		MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y=0;
+		MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.x=0;
+		MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y=0;
 
 		GetCaretPosFromBufferIndex(
-			MdiInfo[WndNum].pMdiTextEdit->buffer,
-			lstrlen(MdiInfo[WndNum].pMdiTextEdit->buffer),
-			&MdiInfo[WndNum].pMdiTextEdit->EndCaretPos);
+			MdiInfo[WndNum]->pMdiTextEdit->buffer,
+			lstrlen(MdiInfo[WndNum]->pMdiTextEdit->buffer),
+			&MdiInfo[WndNum]->pMdiTextEdit->EndCaretPos);
 
 		::InvalidateRect(hEdit,NULL,0);
@@ -816,9 +993,9 @@
 		ResetState_EditMenu();
 	}
-	else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD){
-		ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path);
+	else if(MdiInfo[WndNum]->DocType==WNDTYPE_RAD){
+		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;
+			MdiInfo[WndNum]->MdiRadInfo->SelectingItem[i3] = i3;
 		}
 		DrawRadWindow(WndNum,pWindowInfo);
@@ -880,5 +1057,5 @@
 
 	//再配置
-	ResizeOwnerWnd();
+	this->Resized();
 
 	::ShowWindow(hClient,SW_SHOW);
@@ -991,8 +1168,8 @@
 		//単独ソースコード
 		if(!SetRunning(hChild)) return;
-		if(IsNeedCompile(MdiInfo[GetWndNum(hChild)].path,1))
-			sprintf(temporary,"\"%s\" /debug /run /wnd:%08x",MdiInfo[GetWndNum(hChild)].path.c_str(),m_hWnd);
+		if(IsNeedCompile(MdiInfo[GetWndNum(hChild)]->path,1))
+			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.c_str(),m_hWnd);
+			sprintf(temporary,"\"%s\" /run /wnd:%08x",MdiInfo[GetWndNum(hChild)]->path.c_str(),m_hWnd);
 
 		//ブレークポイントをセーブ
@@ -1057,5 +1234,5 @@
 		//単独ソースコード
 		if(!SetRunning(hChild)) return;
-		sprintf(temporary,"\"%s\" /debug /wnd:%08x",MdiInfo[GetWndNum(hChild)].path.c_str(),m_hWnd);
+		sprintf(temporary,"\"%s\" /debug /wnd:%08x",MdiInfo[GetWndNum(hChild)]->path.c_str(),m_hWnd);
 	}
 
@@ -1171,5 +1348,5 @@
 		//単独ソースコード
 		if(!SetRunning(hChild)) return;
-		sprintf(temporary,"\"%s\" /wnd:%08x",MdiInfo[GetWndNum(hChild)].path.c_str(),m_hWnd);
+		sprintf(temporary,"\"%s\" /wnd:%08x",MdiInfo[GetWndNum(hChild)]->path.c_str(),m_hWnd);
 	}
 
@@ -1226,9 +1403,9 @@
 		if(!SetRunning(hChild)) return;
 
-		if(IsNeedCompile(MdiInfo[GetWndNum(hChild)].path,0))
+		if(IsNeedCompile(MdiInfo[GetWndNum(hChild)]->path,0))
 			SendMessage(WM_COMMAND,IDM_RELEASECOMPILE,0);*/
 
 		//単独ソースコード
-		_splitpath(MdiInfo[GetWndNum(hChild)].path.c_str(),temporary,temp2,temp3,NULL);
+		_splitpath(MdiInfo[GetWndNum(hChild)]->path.c_str(),temporary,temp2,temp3,NULL);
 		lstrcat(temporary,temp2);
 		lstrcat(temporary,temp3);
@@ -1411,5 +1588,5 @@
 	for(int i=0;i<MdiInfo.size();i++){
 		if(i==WndNum) continue;
-		if(MdiInfo[i].hwnd) SendMessage(MdiInfo[i].hwnd,WM_CLOSE,0,0);
+		if(MdiInfo[i]->hwnd) SendMessage(MdiInfo[i]->hwnd,WM_CLOSE,0,0);
 	}
 }
@@ -1421,7 +1598,7 @@
 
 	//絶対パスをコピー
-	HGLOBAL hGlobal=(char *)GlobalAlloc(GMEM_MOVEABLE,MdiInfo[WndNum].path.size()+1);
+	HGLOBAL hGlobal=(char *)GlobalAlloc(GMEM_MOVEABLE,MdiInfo[WndNum]->path.size()+1);
 	char *pTemp=(char *)GlobalLock(hGlobal);
-	lstrcpy(pTemp,MdiInfo[WndNum].path.c_str());
+	lstrcpy(pTemp,MdiInfo[WndNum]->path.c_str());
 	GlobalUnlock(hGlobal);
 
@@ -1439,5 +1616,5 @@
 
 	char temporary[1024], temp2[1024];
-	_splitpath(MdiInfo[WndNum].path.c_str(),temporary,temp2,NULL,NULL);
+	_splitpath(MdiInfo[WndNum]->path.c_str(),temporary,temp2,NULL,NULL);
 	lstrcat(temporary,temp2);
 
@@ -1451,5 +1628,5 @@
 
 	char temporary[1024], temp2[1024];
-	_splitpath(MdiInfo[WndNum].path.c_str(),NULL,NULL,temporary,temp2);
+	_splitpath(MdiInfo[WndNum]->path.c_str(),NULL,NULL,temporary,temp2);
 	lstrcat(temporary,temp2);
 
@@ -1461,5 +1638,5 @@
 	fo.hwnd=m_hWnd;
 	fo.wFunc=FO_DELETE;
-	fo.pFrom =MdiInfo[WndNum].path.c_str();
+	fo.pFrom =MdiInfo[WndNum]->path.c_str();
 	fo.pTo="\0";
 	fo.fFlags =FOF_ALLOWUNDO|FOF_NOCONFIRMATION;
@@ -1467,6 +1644,6 @@
 
 	//閉じる
-	MdiInfo[WndNum].pMdiTextEdit->UnModify();
-	SendMessage(MdiInfo[WndNum].hwnd,WM_CLOSE,0,0);
+	MdiInfo[WndNum]->pMdiTextEdit->UnModify();
+	SendMessage(MdiInfo[WndNum]->hwnd,WM_CLOSE,0,0);
 }
 
