Index: trunk/ab5.0/abdev/abdev/DrawWindow.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/DrawWindow.cpp	(revision 625)
+++ trunk/ab5.0/abdev/abdev/DrawWindow.cpp	(revision 629)
@@ -4,11 +4,11 @@
 
 void DrawLineInClient(int WndNum,long StartX,long StartY,long EndX,long EndY){
-	MoveToEx(MdiInfo[WndNum].MdiRadInfo->hMemDC,
-		StartX+MdiInfo[WndNum].MdiRadInfo->ClientPos.x,
-		StartY+MdiInfo[WndNum].MdiRadInfo->ClientPos.y,
+	MoveToEx(MdiInfo[WndNum]->MdiRadInfo->hMemDC,
+		StartX+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x,
+		StartY+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y,
 		NULL);
-	LineTo(MdiInfo[WndNum].MdiRadInfo->hMemDC,
-		EndX+MdiInfo[WndNum].MdiRadInfo->ClientPos.x,
-		EndY+MdiInfo[WndNum].MdiRadInfo->ClientPos.y);
+	LineTo(MdiInfo[WndNum]->MdiRadInfo->hMemDC,
+		EndX+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x,
+		EndY+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y);
 }
 void DrawRectangleInClient(int WndNum,long left,long top,long right,long bottom,COLORREF RGB_Pen,COLORREF RGB_Brush,BOOL bBrushing){
@@ -19,15 +19,15 @@
 	if(bBrushing) hBrush=CreateSolidBrush(RGB_Brush);
 	else hBrush=(HBRUSH)GetStockObject(NULL_BRUSH);
-	hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
-	hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hBrush);
-
-	Rectangle(MdiInfo[WndNum].MdiRadInfo->hMemDC,
-		left+MdiInfo[WndNum].MdiRadInfo->ClientPos.x,
-		top+MdiInfo[WndNum].MdiRadInfo->ClientPos.y,
-		right+MdiInfo[WndNum].MdiRadInfo->ClientPos.x,
-		bottom+MdiInfo[WndNum].MdiRadInfo->ClientPos.y);
-
-	SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
-	SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldBrush);
+	hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
+	hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hBrush);
+
+	Rectangle(MdiInfo[WndNum]->MdiRadInfo->hMemDC,
+		left+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x,
+		top+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y,
+		right+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x,
+		bottom+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y);
+
+	SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
+	SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldBrush);
 	DeleteObject(hPen);
 	if(bBrushing) DeleteObject(hBrush);
@@ -38,5 +38,5 @@
 	//光源方向の縁
 	hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT));
-	hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
+	hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
 	DrawLineInClient(WndNum,
 		pPos->x, pPos->y,
@@ -45,10 +45,10 @@
 		pPos->x, pPos->y,
 		pPos->x, pPos->y+pSize->cy-1);
-	SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
+	SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
 	DeleteObject(hPen);
 
 	//影側の縁
 	hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DDKSHADOW));
-	hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
+	hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
 	DrawLineInClient(WndNum,
 		pPos->x, pPos->y+pSize->cy-1,
@@ -57,9 +57,9 @@
 		pPos->x+pSize->cx-1, pPos->y,
 		pPos->x+pSize->cx-1, pPos->y+pSize->cy-1);
-	SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
+	SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
 	DeleteObject(hPen);
 
 	hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DSHADOW));
-	hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
+	hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
 	DrawLineInClient(WndNum,
 		pPos->x+1, pPos->y+pSize->cy-2,
@@ -68,5 +68,5 @@
 		pPos->x+pSize->cx-2, pPos->y+1,
 		pPos->x+pSize->cx-2, pPos->y+pSize->cy-2);
-	SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
+	SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
 	DeleteObject(hPen);
 
@@ -90,9 +90,9 @@
 		//モーダル フレーム境界線
 
-		rect.left=pPos->x+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-		rect.top=pPos->y+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
-		rect.right=pPos->x+pSize->cx+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-		rect.bottom=pPos->y+pSize->cy+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
-		DrawEdge(MdiInfo[WndNum].MdiRadInfo->hMemDC,&rect,EDGE_RAISED,BF_RECT);
+		rect.left=pPos->x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+		rect.top=pPos->y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
+		rect.right=pPos->x+pSize->cx+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+		rect.bottom=pPos->y+pSize->cy+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
+		DrawEdge(MdiInfo[WndNum]->MdiRadInfo->hMemDC,&rect,EDGE_RAISED,BF_RECT);
 		pPos->x+=2;
 		pPos->y+=2;
@@ -117,5 +117,5 @@
 		//影側の色
 		hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DSHADOW));
-		hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
+		hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
 		DrawLineInClient(WndNum,
 			pPos->x,
@@ -128,10 +128,10 @@
 			pPos->x+pSize->cx-1,
 			pPos->y);
-		SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
+		SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
 		DeleteObject(hPen);
 
 		//光源方向の縁
 		hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT));
-		hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
+		hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
 		DrawLineInClient(WndNum,
 			pPos->x,
@@ -144,5 +144,5 @@
 			pPos->x+pSize->cx-1,
 			pPos->y+pSize->cy);
-		SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
+		SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
 		DeleteObject(hPen);
 
@@ -156,9 +156,9 @@
 		//クライアント境界線
 
-		rect.left=pPos->x+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-		rect.top=pPos->y+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
-		rect.right=pPos->x+pSize->cx+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-		rect.bottom=pPos->y+pSize->cy+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
-		DrawEdge(MdiInfo[WndNum].MdiRadInfo->hMemDC,&rect,EDGE_SUNKEN,BF_RECT);
+		rect.left=pPos->x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+		rect.top=pPos->y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
+		rect.right=pPos->x+pSize->cx+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+		rect.bottom=pPos->y+pSize->cy+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
+		DrawEdge(MdiInfo[WndNum]->MdiRadInfo->hMemDC,&rect,EDGE_SUNKEN,BF_RECT);
 		pPos->x+=2;
 		pPos->y+=2;
@@ -198,5 +198,5 @@
 		if(style&WS_DISABLED){
 			hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT));
-			hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
+			hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
 			pos.x++;
 			pos.y++;
@@ -205,5 +205,5 @@
 				DrawLineInClient(WndNum,i+pos.x+2,i2,i+pos.x+2,i2+(i*2)+1);
 			}
-			SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
+			SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
 			DeleteObject(hPen);
 			rgb=GetSysColor(COLOR_GRAYTEXT);
@@ -213,10 +213,10 @@
 		else rgb=GetSysColor(COLOR_BTNTEXT);
 		hPen=CreatePen(PS_SOLID,0,rgb);
-		hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
+		hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
 		i2=pos.y+(size.cy/2);
 		for(i=0;i<4;i++,i2--){
 			DrawLineInClient(WndNum,i+pos.x+2,i2,i+pos.x+2,i2+(i*2)+1);
 		}
-		SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
+		SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
 		DeleteObject(hPen);
 
@@ -244,5 +244,5 @@
 		if(style&WS_DISABLED){
 			hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT));
-			hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
+			hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
 			pos.x++;
 			pos.y++;
@@ -251,5 +251,5 @@
 				DrawLineInClient(WndNum,i+pos.x+3,i2,i+pos.x+3,i2+((3-i)*2)+1);
 			}
-			SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
+			SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
 			DeleteObject(hPen);
 			rgb=GetSysColor(COLOR_GRAYTEXT);
@@ -259,10 +259,10 @@
 		else rgb=GetSysColor(COLOR_BTNTEXT);
 		hPen=CreatePen(PS_SOLID,0,rgb);
-		hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
+		hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
 		i2=pos.y+(size.cy/2);
 		for(i=3;i>=0;i--,i2--){
 			DrawLineInClient(WndNum,i+pos.x+3,i2,i+pos.x+3,i2+((3-i)*2)+1);
 		}
-		SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
+		SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
 		DeleteObject(hPen);
 
@@ -331,5 +331,5 @@
 		if(style&WS_DISABLED){
 			hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT));
-			hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
+			hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
 			pos.x++;
 			pos.y++;
@@ -338,5 +338,5 @@
 				DrawLineInClient(WndNum,i2,i+pos.y+2,i2+(i*2)+1,i+pos.y+2);
 			}
-			SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
+			SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
 			DeleteObject(hPen);
 			rgb=GetSysColor(COLOR_GRAYTEXT);
@@ -346,10 +346,10 @@
 		else rgb=GetSysColor(COLOR_BTNTEXT);
 		hPen=CreatePen(PS_SOLID,0,rgb);
-		hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
+		hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
 		i2=pos.x+(size.cx/2)-1;
 		for(i=0;i<4;i++,i2--){
 			DrawLineInClient(WndNum,i2,i+pos.y+2,i2+(i*2)+1,i+pos.y+2);
 		}
-		SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
+		SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
 		DeleteObject(hPen);
 
@@ -378,5 +378,5 @@
 		if(style&WS_DISABLED){
 			hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT));
-			hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
+			hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
 			pos.x++;
 			pos.y++;
@@ -385,5 +385,5 @@
 				DrawLineInClient(WndNum,i2,i+pos.y+3,i2+((3-i)*2)+1,i+pos.y+3);
 			}
-			SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
+			SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
 			DeleteObject(hPen);
 			rgb=GetSysColor(COLOR_GRAYTEXT);
@@ -393,10 +393,10 @@
 		else rgb=GetSysColor(COLOR_BTNTEXT);
 		hPen=CreatePen(PS_SOLID,0,rgb);
-		hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
+		hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
 		i2=pos.x+(size.cx/2);
 		for(i=3;i>=0;i--,i2--){
 			DrawLineInClient(WndNum,i2,i+pos.y+3,i2+((3-i)*2)+1,i+pos.y+3);
 		}
-		SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
+		SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
 		DeleteObject(hPen);
 
@@ -454,5 +454,5 @@
 		BitmapInfo.bmiHeader.biBitCount=24;
 
-		hBitmap=CreateDIBSection(MdiInfo[WndNum].MdiRadInfo->hMemDC,&BitmapInfo,DIB_RGB_COLORS,(void **)&pByte,0,0);
+		hBitmap=CreateDIBSection(MdiInfo[WndNum]->MdiRadInfo->hMemDC,&BitmapInfo,DIB_RGB_COLORS,(void **)&pByte,0,0);
 		i=BitmapInfo.bmiHeader.biWidth*3;
 		if(i%sizeof(LONG)!=0) i+=sizeof(LONG)-(i%sizeof(LONG));
@@ -469,7 +469,7 @@
 			}
 		}
-		SetDIBitsToDevice(MdiInfo[WndNum].MdiRadInfo->hMemDC,
-			pos.x+MdiInfo[WndNum].MdiRadInfo->ClientPos.x,
-			pos.y+MdiInfo[WndNum].MdiRadInfo->ClientPos.y,
+		SetDIBitsToDevice(MdiInfo[WndNum]->MdiRadInfo->hMemDC,
+			pos.x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x,
+			pos.y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y,
 			BitmapInfo.bmiHeader.biWidth, BitmapInfo.bmiHeader.biHeight,
 			0,0,
@@ -505,5 +505,5 @@
 		if(style&WS_DISABLED){
 			hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT));
-			hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
+			hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
 			pos.x++;
 			pos.y++;
@@ -512,5 +512,5 @@
 				DrawLineInClient(WndNum,i+pos.x+2,i2,i+pos.x+2,i2+(i*2)+1);
 			}
-			SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
+			SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
 			DeleteObject(hPen);
 			rgb=GetSysColor(COLOR_GRAYTEXT);
@@ -520,10 +520,10 @@
 		else rgb=GetSysColor(COLOR_BTNTEXT);
 		hPen=CreatePen(PS_SOLID,0,rgb);
-		hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
+		hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
 		i2=pos.y+(size.cy/2);
 		for(i=0;i<4;i++,i2--){
 			DrawLineInClient(WndNum,i+pos.x+2,i2,i+pos.x+2,i2+(i*2)+1);
 		}
-		SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
+		SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
 		DeleteObject(hPen);
 
@@ -543,5 +543,5 @@
 		if(style&WS_DISABLED){
 			hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT));
-			hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
+			hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
 			pos.x++;
 			pos.y++;
@@ -550,5 +550,5 @@
 				DrawLineInClient(WndNum,i+pos.x+3,i2,i+pos.x+3,i2+((3-i)*2)+1);
 			}
-			SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
+			SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
 			DeleteObject(hPen);
 			rgb=GetSysColor(COLOR_GRAYTEXT);
@@ -558,10 +558,10 @@
 		else rgb=GetSysColor(COLOR_BTNTEXT);
 		hPen=CreatePen(PS_SOLID,0,rgb);
-		hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
+		hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
 		i2=pos.y+(size.cy/2);
 		for(i=3;i>=0;i--,i2--){
 			DrawLineInClient(WndNum,i+pos.x+3,i2,i+pos.x+3,i2+((3-i)*2)+1);
 		}
-		SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
+		SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
 		DeleteObject(hPen);
 	}
@@ -584,5 +584,5 @@
 		if(style&WS_DISABLED){
 			hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT));
-			hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
+			hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
 			pos.x++;
 			pos.y++;
@@ -591,5 +591,5 @@
 				DrawLineInClient(WndNum,i2,i+pos.y+2,i2+(i*2)+1,i+pos.y+2);
 			}
-			SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
+			SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
 			DeleteObject(hPen);
 			rgb=GetSysColor(COLOR_GRAYTEXT);
@@ -599,10 +599,10 @@
 		else rgb=GetSysColor(COLOR_BTNTEXT);
 		hPen=CreatePen(PS_SOLID,0,rgb);
-		hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
+		hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
 		i2=pos.x+(size.cx/2)-1;
 		for(i=0;i<4;i++,i2--){
 			DrawLineInClient(WndNum,i2,i+pos.y+2,i2+(i*2)+1,i+pos.y+2);
 		}
-		SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
+		SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
 		DeleteObject(hPen);
 
@@ -623,5 +623,5 @@
 		if(style&WS_DISABLED){
 			hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT));
-			hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
+			hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
 			pos.x++;
 			pos.y++;
@@ -630,5 +630,5 @@
 				DrawLineInClient(WndNum,i2,i+pos.y+3,i2+((3-i)*2)+1,i+pos.y+3);
 			}
-			SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
+			SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
 			DeleteObject(hPen);
 			rgb=GetSysColor(COLOR_GRAYTEXT);
@@ -638,10 +638,10 @@
 		else rgb=GetSysColor(COLOR_BTNTEXT);
 		hPen=CreatePen(PS_SOLID,0,rgb);
-		hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hPen);
+		hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen);
 		i2=pos.x+(size.cx/2);
 		for(i=3;i>=0;i--,i2--){
 			DrawLineInClient(WndNum,i2,i+pos.y+3,i2+((3-i)*2)+1,i+pos.y+3);
 		}
-		SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldPen);
+		SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen);
 		DeleteObject(hPen);
 	}
@@ -748,6 +748,6 @@
 
 	//Draw...InClient関数のため
-	MdiInfo[WndNum].MdiRadInfo->ClientPos.x=0;
-	MdiInfo[WndNum].MdiRadInfo->ClientPos.y=0;
+	MdiInfo[WndNum]->MdiRadInfo->ClientPos.x=0;
+	MdiInfo[WndNum]->MdiRadInfo->ClientPos.y=0;
 
 	if(pWindowInfo->GetStyle()&(WS_CAPTION&(~WS_BORDER))){
@@ -940,6 +940,6 @@
 
 	//クライアント左上ポジションを設定
-	MdiInfo[WndNum].MdiRadInfo->ClientPos.x=InsideRect.left;
-	MdiInfo[WndNum].MdiRadInfo->ClientPos.y=InsideRect.top;
+	MdiInfo[WndNum]->MdiRadInfo->ClientPos.x=InsideRect.left;
+	MdiInfo[WndNum]->MdiRadInfo->ClientPos.y=InsideRect.top;
 
 	//ExStyleによる縁を描画
@@ -954,5 +954,5 @@
 
 	//クライアント領域のサイズを設定
-	MdiInfo[WndNum].MdiRadInfo->ClientSize=size;
+	MdiInfo[WndNum]->MdiRadInfo->ClientSize=size;
 
 
@@ -1043,8 +1043,8 @@
 				//キャプション テキスト
 
-				rect.left=pos.x+1+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-				rect.top=pos.y+1+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
-				rect.right=pos.x+size.cx-2+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-				rect.bottom=pos.y+size.cy-2+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
+				rect.left=pos.x+1+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+				rect.top=pos.y+1+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
+				rect.right=pos.x+size.cx-2+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+				rect.bottom=pos.y+size.cy-2+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
 
 				if(pChildInfo->GetStyle()&BS_MULTILINE) i4=0;
@@ -1116,8 +1116,8 @@
 			if(!(pChildInfo->GetStyle()&(BS_ICON|BS_BITMAP))){
 				//キャプション テキスト
-				rect.left=pos.x+1+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-				rect.top=pos.y+1+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
-				rect.right=pos.x+size.cx-2+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-				rect.bottom=pos.y+size.cy-2+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
+				rect.left=pos.x+1+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+				rect.top=pos.y+1+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
+				rect.right=pos.x+size.cx-2+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+				rect.bottom=pos.y+size.cy-2+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
 
 				if(pChildInfo->GetStyle()&BS_MULTILINE) i4=0;
@@ -1236,8 +1236,8 @@
 
 			//キャプション テキスト
-			rect.left=pos.x+1+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-			rect.top=pos.y+1+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
-			rect.right=pos.x+size.cx-1+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-			rect.bottom=pos.y+size.cy-1+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
+			rect.left=pos.x+1+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+			rect.top=pos.y+1+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
+			rect.right=pos.x+size.cx-1+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+			rect.bottom=pos.y+size.cy-1+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
 
 			if(pChildInfo->GetStyle()&ES_MULTILINE) i4=0;
@@ -1268,8 +1268,8 @@
 
 			//枠を描画
-			rect.left=pos.x+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-			rect.top=pos.y+MdiInfo[WndNum].MdiRadInfo->ClientPos.y+(size2.cy/2);
-			rect.right=pos.x+size.cx+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-			rect.bottom=pos.y+size.cy+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
+			rect.left=pos.x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+			rect.top=pos.y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y+(size2.cy/2);
+			rect.right=pos.x+size.cx+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+			rect.bottom=pos.y+size.cy+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
 			DrawEdge(hdc,&rect,EDGE_ETCHED,BF_RECT);
 
@@ -1295,8 +1295,8 @@
 
 			if(!((pChildInfo->GetStyle()&BS_ICON)||(pChildInfo->GetStyle()&BS_BITMAP))){
-				rect.left+=MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-				rect.top+=MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
-				rect.right+=MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-				rect.bottom+=MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
+				rect.left+=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+				rect.top+=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
+				rect.right+=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+				rect.bottom+=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
 				rect.left+=2;
 				rect.right-=2;
@@ -1338,8 +1338,8 @@
 				DrawRectangleInClient(WndNum,pos.x,pos.y,pos.x+size.cx,pos.y+size.cy,RGB(255,255,255),0,0);
 			else if((pChildInfo->GetStyle()&0x0000001F)==SS_ETCHEDFRAME){
-				rect.left=pos.x+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-				rect.top=pos.y+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
-				rect.right=pos.x+size.cx+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-				rect.bottom=pos.y+size.cy+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
+				rect.left=pos.x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+				rect.top=pos.y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
+				rect.right=pos.x+size.cx+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+				rect.bottom=pos.y+size.cy+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
 				DrawEdge(hdc,&rect,EDGE_ETCHED,BF_RECT);
 			}
@@ -1385,6 +1385,6 @@
 
 					DrawIcon(hdc,
-						pos.x+MdiInfo[WndNum].MdiRadInfo->ClientPos.x,
-						pos.y+MdiInfo[WndNum].MdiRadInfo->ClientPos.y,
+						pos.x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x,
+						pos.y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y,
 						(HICON)hImage);
 					DestroyIcon((HICON)hImage);
@@ -1394,8 +1394,8 @@
 					DrawRectangleInClient(WndNum,pos.x,pos.y,pos.x+size.cx,pos.y+size.cy,RGB(0,0,0),0,0);
 					hOldFont=(HFONT)SelectObject(hdc,hFont);
-					rect.left=pos.x+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-					rect.top=pos.y+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
-					rect.right=pos.x+size.cx+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-					rect.bottom=pos.y+size.cy+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
+					rect.left=pos.x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+					rect.top=pos.y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
+					rect.right=pos.x+size.cx+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+					rect.bottom=pos.y+size.cy+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
 					SetTextColor(hdc,GetSysColor(COLOR_WINDOWTEXT));
 					DrawText(hdc,"icon...",-1,&rect,DT_SINGLELINE|DT_CENTER|DT_VCENTER);
@@ -1442,6 +1442,6 @@
 					SelectObject(memdc,hImage);
 					BitBlt(hdc,
-						pos.x+MdiInfo[WndNum].MdiRadInfo->ClientPos.x,
-						pos.y+MdiInfo[WndNum].MdiRadInfo->ClientPos.y,
+						pos.x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x,
+						pos.y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y,
 						size.cx, size.cy,
 						memdc, 0,0,
@@ -1454,8 +1454,8 @@
 					DrawRectangleInClient(WndNum,pos.x,pos.y,pos.x+size.cx,pos.y+size.cy,RGB(0,0,0),0,0);
 					hOldFont=(HFONT)SelectObject(hdc,hFont);
-					rect.left=pos.x+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-					rect.top=pos.y+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
-					rect.right=pos.x+size.cx+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-					rect.bottom=pos.y+size.cy+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
+					rect.left=pos.x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+					rect.top=pos.y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
+					rect.right=pos.x+size.cx+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+					rect.bottom=pos.y+size.cy+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
 					SetTextColor(hdc,GetSysColor(COLOR_WINDOWTEXT));
 					DrawText(hdc,"bmp...",-1,&rect,DT_SINGLELINE|DT_CENTER|DT_VCENTER);
@@ -1606,6 +1606,6 @@
 				}
 				SetDIBitsToDevice(hdc,
-					pos2.x+MdiInfo[WndNum].MdiRadInfo->ClientPos.x,
-					pos2.y+MdiInfo[WndNum].MdiRadInfo->ClientPos.y,
+					pos2.x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x,
+					pos2.y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y,
 					pBitmapInfo->bmiHeader.biWidth, pBitmapInfo->bmiHeader.biHeight,
 					0,0,
@@ -1623,8 +1623,8 @@
 			if(!(pChildInfo->GetStyle()&(BS_ICON|BS_BITMAP))){
 				//キャプション テキスト
-				rect.left=pos.x+1+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-				rect.top=pos.y+1+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
-				rect.right=pos.x+size.cx-2+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-				rect.bottom=pos.y+size.cy-2+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
+				rect.left=pos.x+1+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+				rect.top=pos.y+1+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
+				rect.right=pos.x+size.cx-2+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+				rect.bottom=pos.y+size.cy-2+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
 
 				if(pChildInfo->GetStyle()&BS_MULTILINE) i4=0;
@@ -1665,8 +1665,8 @@
 
 			//キャプション テキスト
-			rect.left=pos.x+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-			rect.top=pos.y+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
-			rect.right=pos.x+size.cx+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
-			rect.bottom=pos.y+size.cy+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
+			rect.left=pos.x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+			rect.top=pos.y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
+			rect.right=pos.x+size.cx+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x;
+			rect.bottom=pos.y+size.cy+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y;
 
 			//ビットを考慮してSS_LEFTを最後に検討する
@@ -1708,8 +1708,8 @@
 				size.cy-=16;
 
-				rect.left=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pos.x+(size.cx/2)-2;
-				rect.right=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pos.x+(size.cx/2)+2;
-				rect.top=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pos.y;
-				rect.bottom=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pos.y+size.cy;
+				rect.left=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x+pos.x+(size.cx/2)-2;
+				rect.right=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x+pos.x+(size.cx/2)+2;
+				rect.top=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y+pos.y;
+				rect.bottom=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y+pos.y+size.cy;
 				DrawEdge(hdc,&rect,EDGE_SUNKEN,BF_RECT);
 
@@ -1724,8 +1724,8 @@
 				if(size.cy>21) size.cy=21;
 
-				rect.left=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pos.x;
-				rect.right=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pos.x+size.cx;
-				rect.top=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pos.y+(size.cy/2)-2;
-				rect.bottom=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pos.y+(size.cy/2)+2;
+				rect.left=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x+pos.x;
+				rect.right=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x+pos.x+size.cx;
+				rect.top=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y+pos.y+(size.cy/2)-2;
+				rect.bottom=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y+pos.y+(size.cy/2)+2;
 				DrawEdge(hdc,&rect,EDGE_SUNKEN,BF_RECT);
 
@@ -1769,14 +1769,14 @@
 	POINT pos;
 
-	SetBkMode(MdiInfo[WndNum].MdiRadInfo->hMemDC,TRANSPARENT);
-
-	hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,GetStockObject(WHITE_BRUSH));
-	PatBlt(MdiInfo[WndNum].MdiRadInfo->hMemDC,0,0,ScreenX*2,ScreenY*2,PATCOPY);
-	SelectObject(MdiInfo[WndNum].MdiRadInfo->hMemDC,hOldBrush);
+	SetBkMode(MdiInfo[WndNum]->MdiRadInfo->hMemDC,TRANSPARENT);
+
+	hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,GetStockObject(WHITE_BRUSH));
+	PatBlt(MdiInfo[WndNum]->MdiRadInfo->hMemDC,0,0,ScreenX*2,ScreenY*2,PATCOPY);
+	SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldBrush);
 
 	pos.x=LEVER_THICK;
 	pos.y=LEVER_THICK;
-	DesigningWindow(WndNum,MdiInfo[WndNum].MdiRadInfo->hMemDC,&pos,pWindowInfo);
-
-	InvalidateRect(MdiInfo[WndNum].MdiRadInfo->hRad,NULL,0);
+	DesigningWindow(WndNum,MdiInfo[WndNum]->MdiRadInfo->hMemDC,&pos,pWindowInfo);
+
+	InvalidateRect(MdiInfo[WndNum]->MdiRadInfo->hRad,NULL,0);
 }
