Index: trunk/ab5.0/abdev/abdev/Replace.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/Replace.cpp	(revision 625)
+++ trunk/ab5.0/abdev/abdev/Replace.cpp	(revision 629)
@@ -9,5 +9,5 @@
 	CHARRANGE Range,cr2;
 
-	pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer;
+	pBuf=MdiInfo[WndNum]->pMdiTextEdit->buffer;
 
 	//行の先頭位置を取得
@@ -31,5 +31,5 @@
 	//初期化（すべて黒色に戻す）
 	for(i=Range.cpMin;i<Range.cpMax;i++){
-		MdiInfo[WndNum].pMdiTextEdit->pColorRef[i]=tci.rgbDefault;
+		MdiInfo[WndNum]->pMdiTextEdit->pColorRef[i]=tci.rgbDefault;
 	}
 
@@ -60,5 +60,5 @@
 			if(bResult){
 				for(i2=cr2.cpMin;i2<cr2.cpMax;i2++){
-					MdiInfo[WndNum].pMdiTextEdit->pColorRef[i2]=tci.rgbStatement;
+					MdiInfo[WndNum]->pMdiTextEdit->pColorRef[i2]=tci.rgbStatement;
 				}
 			}
@@ -66,5 +66,5 @@
 		if(IsStr||pBuf[i]=='\"'&&IsStr==0){
 			//文字列カラー（""で囲まれる範囲）
-			MdiInfo[WndNum].pMdiTextEdit->pColorRef[i]=tci.rgbString;
+			MdiInfo[WndNum]->pMdiTextEdit->pColorRef[i]=tci.rgbString;
 		}
 		if(pBuf[i]=='\0') break;
@@ -90,5 +90,5 @@
 	//バッファ長を取得
 	int length;
-	length=lstrlen(MdiInfo[WndNum].pMdiTextEdit->buffer);
+	length=lstrlen(MdiInfo[WndNum]->pMdiTextEdit->buffer);
 
 	int delta;
@@ -99,12 +99,12 @@
 		////////////////////
 
-		MdiInfo[WndNum].pMdiTextEdit->buffer=(char *)HeapReAlloc(hHeap,
+		MdiInfo[WndNum]->pMdiTextEdit->buffer=(char *)HeapReAlloc(hHeap,
 			0,
-			MdiInfo[WndNum].pMdiTextEdit->buffer,
+			MdiInfo[WndNum]->pMdiTextEdit->buffer,
 			length+1+delta);
 
-		MdiInfo[WndNum].pMdiTextEdit->pColorRef=(COLORREF *)HeapReAlloc(hHeap,
+		MdiInfo[WndNum]->pMdiTextEdit->pColorRef=(COLORREF *)HeapReAlloc(hHeap,
 			0,
-			MdiInfo[WndNum].pMdiTextEdit->pColorRef,
+			MdiInfo[WndNum]->pMdiTextEdit->pColorRef,
 			(length+1+delta)*sizeof(COLORREF));
 	}
@@ -114,6 +114,6 @@
 	if( projectInfo.IsOpened() ){
 		projectInfo.pobj_DBBreakPoint->replace(
-			MdiInfo[WndNum].path.c_str(),
-			MdiInfo[WndNum].pMdiTextEdit->buffer,
+			MdiInfo[WndNum]->path.c_str(),
+			MdiInfo[WndNum]->pMdiTextEdit->buffer,
 			&DelRange,
 			&Range,
@@ -123,6 +123,6 @@
 		extern CDBBreakPoint *pobj_DBBreakPoint;
 		pobj_DBBreakPoint->replace(
-			MdiInfo[WndNum].path.c_str(),
-			MdiInfo[WndNum].pMdiTextEdit->buffer,
+			MdiInfo[WndNum]->path.c_str(),
+			MdiInfo[WndNum]->pMdiTextEdit->buffer,
 			&DelRange,
 			&Range,
@@ -132,24 +132,24 @@
 
 	//文字列バッファをスライドして、挿入
-	SlideString(MdiInfo[WndNum].pMdiTextEdit->buffer+DelRange.cpMax,
+	SlideString(MdiInfo[WndNum]->pMdiTextEdit->buffer+DelRange.cpMax,
 		delta);
-	memcpy(MdiInfo[WndNum].pMdiTextEdit->buffer+Range.cpMin,str,lstrlen(str));
+	memcpy(MdiInfo[WndNum]->pMdiTextEdit->buffer+Range.cpMin,str,lstrlen(str));
 
 	//文字カラーバッファをスライド
-	SlideBuffer(((char *)MdiInfo[WndNum].pMdiTextEdit->pColorRef)+DelRange.cpMax*sizeof(COLORREF),
+	SlideBuffer(((char *)MdiInfo[WndNum]->pMdiTextEdit->pColorRef)+DelRange.cpMax*sizeof(COLORREF),
 		(length-DelRange.cpMax) * sizeof(COLORREF),
 		delta*sizeof(COLORREF));
 	//色づけ
-	TextEdit_ResetWordColor(WndNum,&Range,MdiInfo[WndNum].DocType);
+	TextEdit_ResetWordColor(WndNum,&Range,MdiInfo[WndNum]->DocType);
 
 	//新しいキャレット位置に変更
-	GetCaretPosFromBufferIndex(MdiInfo[WndNum].pMdiTextEdit->buffer,
+	GetCaretPosFromBufferIndex(MdiInfo[WndNum]->pMdiTextEdit->buffer,
 		Range.cpMax,
-		&MdiInfo[WndNum].pMdiTextEdit->StartCaretPos);
-	MdiInfo[WndNum].pMdiTextEdit->EndCaretPos=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos;
+		&MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos);
+	MdiInfo[WndNum]->pMdiTextEdit->EndCaretPos=MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos;
 
 	//コントロールタブスペースの幅と行番号の文字数を更新
-	MdiInfo[WndNum].pMdiTextEdit->iWidth_ControlTabSpace=
-		GetControlTabSpace(WndNum,&MdiInfo[WndNum].pMdiTextEdit->iLineNumberTextCount);
+	MdiInfo[WndNum]->pMdiTextEdit->iWidth_ControlTabSpace=
+		GetControlTabSpace(WndNum,&MdiInfo[WndNum]->pMdiTextEdit->iLineNumberTextCount);
 
 	if(bRedraw){
@@ -159,6 +159,6 @@
 
 		if(!TextEdit_ScrollCaret(WndNum,0)){
-			UpdateWindow(MdiInfo[WndNum].pMdiTextEdit->hEdit);	//ちらつき防止
-			InvalidateRect(MdiInfo[WndNum].pMdiTextEdit->hEdit,NULL,0);
+			UpdateWindow(MdiInfo[WndNum]->pMdiTextEdit->hEdit);	//ちらつき防止
+			InvalidateRect(MdiInfo[WndNum]->pMdiTextEdit->hEdit,NULL,0);
 		}
 
@@ -167,12 +167,12 @@
 
 	//上下キャレット移動時の左右位置保持機能を解除
-	MdiInfo[WndNum].pMdiTextEdit->Temp_UpDown_CaretXPos=-1;
+	MdiInfo[WndNum]->pMdiTextEdit->Temp_UpDown_CaretXPos=-1;
 
 	//編集メニューをリセット
 	ResetState_EditMenu();
 
-	if( ! MdiInfo[WndNum].pMdiTextEdit->IsModified() ){
+	if( ! MdiInfo[WndNum]->pMdiTextEdit->IsModified() ){
 		//変更フラグをセット
-		MdiInfo[WndNum].pMdiTextEdit->Modify();
+		MdiInfo[WndNum]->pMdiTextEdit->Modify();
 	}
 
@@ -180,5 +180,5 @@
 	//if( projectInfo.IsOpened() ){
 		//プロジェクトが開かれているとき
-		if(MdiInfo[WndNum].DocType==WNDTYPE_BASIC){
+		if(MdiInfo[WndNum]->DocType==WNDTYPE_BASIC){
 			//クラスツリーを再表示
 			ResetClassTree(GetFileNum(WndNum));
@@ -193,7 +193,7 @@
 	CHARRANGE Range,DelRange;
 
-	if(MdiInfo[WndNum].IndentStr){
+	if(MdiInfo[WndNum]->IndentStr){
 		//自動インデントを有効にする
-		lstrcpy(temporary,MdiInfo[WndNum].IndentStr);
+		lstrcpy(temporary,MdiInfo[WndNum]->IndentStr);
 
 		CancelBeforeAutoIndent(WndNum);
@@ -246,5 +246,5 @@
 #endif
 		char *pBuf;
-		pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer;
+		pBuf=MdiInfo[WndNum]->pMdiTextEdit->buffer;
 
 		//行全体を選択(min)
@@ -271,5 +271,5 @@
 	buffer=(char *)HeapAlloc(hHeap,0,length*3+1024);
 	temporary=(char *)HeapAlloc(hHeap,0,length*3+1024);
-	memcpy(buffer,MdiInfo[WndNum].pMdiTextEdit->buffer+CharRange.cpMin,length);
+	memcpy(buffer,MdiInfo[WndNum]->pMdiTextEdit->buffer+CharRange.cpMin,length);
 	buffer[length]=0;
 
