Index: trunk/ab5.0/abdev/abdev/TextEditor_MouseEvent.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/TextEditor_MouseEvent.cpp	(revision 625)
+++ trunk/ab5.0/abdev/abdev/TextEditor_MouseEvent.cpp	(revision 629)
@@ -12,15 +12,15 @@
 	if((GetKeyState(VK_CONTROL)&0x8000)&&pobj_nv->bCtrlKeyHyperLink){
 		//Ctrlキーが押されているとき
-		if(MdiInfo[WndNum].pMdiTextEdit->iUnderStart!=-1){
+		if(MdiInfo[WndNum]->pMdiTextEdit->iUnderStart!=-1){
 			//単語が選択可能なとき
 
 			//半角文字列を選択時の全角とのズレを修正
 			int start,end;
-			start=MdiInfo[WndNum].pMdiTextEdit->iUnderStart;
-			end=MdiInfo[WndNum].pMdiTextEdit->iUnderEnd;
-			GetCaretPosFromBufferIndex(MdiInfo[WndNum].pMdiTextEdit->buffer,start,&pos);
-			start=GetBufferIndexFromCaretPos(MdiInfo[WndNum].pMdiTextEdit->buffer,pos.x,pos.y);
-			GetCaretPosFromBufferIndex(MdiInfo[WndNum].pMdiTextEdit->buffer,end,&pos);
-			end=GetBufferIndexFromCaretPos(MdiInfo[WndNum].pMdiTextEdit->buffer,pos.x,pos.y);
+			start=MdiInfo[WndNum]->pMdiTextEdit->iUnderStart;
+			end=MdiInfo[WndNum]->pMdiTextEdit->iUnderEnd;
+			GetCaretPosFromBufferIndex(MdiInfo[WndNum]->pMdiTextEdit->buffer,start,&pos);
+			start=GetBufferIndexFromCaretPos(MdiInfo[WndNum]->pMdiTextEdit->buffer,pos.x,pos.y);
+			GetCaretPosFromBufferIndex(MdiInfo[WndNum]->pMdiTextEdit->buffer,end,&pos);
+			end=GetBufferIndexFromCaretPos(MdiInfo[WndNum]->pMdiTextEdit->buffer,pos.x,pos.y);
 
 			int length;
@@ -32,5 +32,5 @@
 			memcpy(
 				pTemp,
-				MdiInfo[WndNum].pMdiTextEdit->buffer+start,
+				MdiInfo[WndNum]->pMdiTextEdit->buffer+start,
 				length);
 			pTemp[length]=0;
@@ -53,15 +53,15 @@
 
 	int iControlTabSpace;
-	iControlTabSpace=MdiInfo[WndNum].pMdiTextEdit->iWidth_ControlTabSpace;
-
-	if(MdiInfo[WndNum].IndentStr){
+	iControlTabSpace=MdiInfo[WndNum]->pMdiTextEdit->iWidth_ControlTabSpace;
+
+	if(MdiInfo[WndNum]->IndentStr){
 		//自動インデント中のインデントを無効にする
 		CancelBeforeAutoIndent(WndNum);
 	}
 
-	MdiInfo[WndNum].pMdiTextEdit->bAutoScroll=0;
+	MdiInfo[WndNum]->pMdiTextEdit->bAutoScroll=0;
 
 	//上下キャレット移動時の左右位置保持機能を解除
-	MdiInfo[WndNum].pMdiTextEdit->Temp_UpDown_CaretXPos=-1;
+	MdiInfo[WndNum]->pMdiTextEdit->Temp_UpDown_CaretXPos=-1;
 
 	if(0<=(pMousePos->x) && (pMousePos->x)<iControlTabSpace){
@@ -74,6 +74,6 @@
 			0,
 			pMousePos->y,
-			&MdiInfo[WndNum].pMdiTextEdit->StartCaretPos);
-		MdiInfo[WndNum].pMdiTextEdit->EndCaretPos=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos;
+			&MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos);
+		MdiInfo[WndNum]->pMdiTextEdit->EndCaretPos=MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos;
 
 		////////////
@@ -82,5 +82,5 @@
 
 		char *pBuf;
-		pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer;
+		pBuf=MdiInfo[WndNum]->pMdiTextEdit->buffer;
 		CHARRANGE CharRange;
 		TextEdit_GetSel(WndNum,&CharRange);
@@ -101,9 +101,9 @@
 			pMousePos->x-iControlTabSpace,
 			pMousePos->y,
-			&MdiInfo[WndNum].pMdiTextEdit->StartCaretPos);
+			&MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos);
 
 		if(!(GetKeyState(VK_SHIFT)&0x8000)){
 			//シフトキーが押されていない、通常時
-			MdiInfo[WndNum].pMdiTextEdit->EndCaretPos=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos;
+			MdiInfo[WndNum]->pMdiTextEdit->EndCaretPos=MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos;
 		}
 
@@ -123,5 +123,5 @@
 
 	int iControlTabSpace;
-	iControlTabSpace=MdiInfo[WndNum].pMdiTextEdit->iWidth_ControlTabSpace;
+	iControlTabSpace=MdiInfo[WndNum]->pMdiTextEdit->iWidth_ControlTabSpace;
 
 	if(0<=(pMousePos->x) && (pMousePos->x)<iControlTabSpace){
@@ -140,5 +140,5 @@
 
 		//オートスクロールスレッドを停止
-		MdiInfo[WndNum].pMdiTextEdit->bAutoScroll=0;
+		MdiInfo[WndNum]->pMdiTextEdit->bAutoScroll=0;
 
 		//編集メニューをリセット
@@ -160,8 +160,8 @@
 	//エディタ画面左端のコントロールタブ
 	int iControlTabSpace;
-	iControlTabSpace=MdiInfo[WndNum].pMdiTextEdit->iWidth_ControlTabSpace;
-
-
-	while(MdiInfo[WndNum].pMdiTextEdit->bAutoScroll){
+	iControlTabSpace=MdiInfo[WndNum]->pMdiTextEdit->iWidth_ControlTabSpace;
+
+
+	while(MdiInfo[WndNum]->pMdiTextEdit->bAutoScroll){
 		GetCursorPos(&pos);
 		ScreenToClient(hwnd,&pos);
@@ -176,5 +176,5 @@
 			pos.x,
 			pos.y,
-			&MdiInfo[WndNum].pMdiTextEdit->StartCaretPos);
+			&MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos);
 
 		if(!TextEdit_ScrollCaret(WndNum,1))
@@ -195,5 +195,5 @@
 
 	int iControlTabSpace;
-	iControlTabSpace=MdiInfo[WndNum].pMdiTextEdit->iWidth_ControlTabSpace;
+	iControlTabSpace=MdiInfo[WndNum]->pMdiTextEdit->iWidth_ControlTabSpace;
 
 	if(GetCapture()==hwnd){
@@ -215,5 +215,5 @@
 			////////////////////////////
 
-			if(MdiInfo[WndNum].pMdiTextEdit->bAutoScroll){
+			if(MdiInfo[WndNum]->pMdiTextEdit->bAutoScroll){
 				//すでにオートスクロールスレッドが作動中のときは抜け出す
 				return;
@@ -221,5 +221,5 @@
 
 			//オートスクロールスレッドを起動
-			MdiInfo[WndNum].pMdiTextEdit->bAutoScroll=1;
+			MdiInfo[WndNum]->pMdiTextEdit->bAutoScroll=1;
 
 			_beginthread((void (__cdecl *)(void *))AutoScrollThread,0,(void *)hwnd);
@@ -227,7 +227,7 @@
 			return;
 		}
-		else if(MdiInfo[WndNum].pMdiTextEdit->bAutoScroll){
+		else if(MdiInfo[WndNum]->pMdiTextEdit->bAutoScroll){
 			//オートスクロールを解除
-			MdiInfo[WndNum].pMdiTextEdit->bAutoScroll=0;
+			MdiInfo[WndNum]->pMdiTextEdit->bAutoScroll=0;
 		}
 
@@ -243,6 +243,6 @@
 			&pos);
 
-		if(pos.x!=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x||pos.y!=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y){
-			MdiInfo[WndNum].pMdiTextEdit->StartCaretPos=pos;
+		if(pos.x!=MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.x||pos.y!=MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y){
+			MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos=pos;
 
 			InvalidateRect(hwnd,NULL,0);
@@ -271,8 +271,8 @@
 
 				TextEdit_GetWordCaret(
-					MdiInfo[WndNum].pMdiTextEdit->hEdit,
+					MdiInfo[WndNum]->pMdiTextEdit->hEdit,
 					WndNum,
 					&pos,
-					&MdiInfo[WndNum].pMdiTextEdit->iUnderStart,&MdiInfo[WndNum].pMdiTextEdit->iUnderEnd,
+					&MdiInfo[WndNum]->pMdiTextEdit->iUnderStart,&MdiInfo[WndNum]->pMdiTextEdit->iUnderEnd,
 					WORDCARET_AFTER);
 
@@ -283,7 +283,7 @@
 			}
 			else{
-				if(MdiInfo[WndNum].pMdiTextEdit->iUnderStart!=-1){
-					MdiInfo[WndNum].pMdiTextEdit->iUnderStart=-1;
-					MdiInfo[WndNum].pMdiTextEdit->iUnderEnd=-1;
+				if(MdiInfo[WndNum]->pMdiTextEdit->iUnderStart!=-1){
+					MdiInfo[WndNum]->pMdiTextEdit->iUnderStart=-1;
+					MdiInfo[WndNum]->pMdiTextEdit->iUnderEnd=-1;
 
 					InvalidateRect(hwnd,NULL,0);
@@ -301,5 +301,5 @@
 
 	int start,end;
-	TextEdit_GetWordCaret(hwnd,WndNum,&MdiInfo[WndNum].pMdiTextEdit->StartCaretPos,&start,&end,WORDCARET_AFTER);
+	TextEdit_GetWordCaret(hwnd,WndNum,&MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos,&start,&end,WORDCARET_AFTER);
 
 	//セレクト
@@ -315,5 +315,5 @@
 
 	int iControlTabSpace;
-	iControlTabSpace=MdiInfo[WndNum].pMdiTextEdit->iWidth_ControlTabSpace;
+	iControlTabSpace=MdiInfo[WndNum]->pMdiTextEdit->iWidth_ControlTabSpace;
 
 	if(0<=(pMousePos->x) && (pMousePos->x)<iControlTabSpace){
