Index: trunk/ab5.0/abdev/abdev/IconEditor_Main.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/IconEditor_Main.cpp	(revision 625)
+++ trunk/ab5.0/abdev/abdev/IconEditor_Main.cpp	(revision 629)
@@ -15,15 +15,15 @@
 	if(pRect->left<0) pRect->left=0;
 	if(pRect->top<0) pRect->top=0;
-	if(pRect->left>=MdiInfo[WndNum].MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biWidth)
-		pRect->left=MdiInfo[WndNum].MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biWidth-1;
-	if(pRect->top>=MdiInfo[WndNum].MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biHeight/2)
-		pRect->top=MdiInfo[WndNum].MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biHeight/2-1;
+	if(pRect->left>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biWidth)
+		pRect->left=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biWidth-1;
+	if(pRect->top>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biHeight/2)
+		pRect->top=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biHeight/2-1;
 
 	if(pRect->right<0) pRect->right=0;
 	if(pRect->bottom<0) pRect->bottom=0;
-	if(pRect->right>=MdiInfo[WndNum].MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biWidth)
-		pRect->right=MdiInfo[WndNum].MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biWidth-1;
-	if(pRect->bottom>=MdiInfo[WndNum].MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biHeight/2)
-		pRect->bottom=MdiInfo[WndNum].MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biHeight/2-1;
+	if(pRect->right>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biWidth)
+		pRect->right=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biWidth-1;
+	if(pRect->bottom>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biHeight/2)
+		pRect->bottom=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biHeight/2-1;
 }
 void GetZoomedPos(POINT *pPos){
@@ -35,6 +35,6 @@
 
 	if(x<0||y<0||
-		x>=MdiInfo[WndNum].MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biWidth||
-		y>=MdiInfo[WndNum].MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biHeight/2)
+		x>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biWidth||
+		y>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biHeight/2)
 		return;
 
@@ -52,7 +52,7 @@
 
 	//カラーテーブルを取得
-	pRgbq=(RGBQUAD *)(MdiInfo[WndNum].MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]+sizeof(BITMAPINFOHEADER));
-
-	i2=(int)pow((double)2,(double)MdiInfo[WndNum].MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biBitCount);
+	pRgbq=(RGBQUAD *)(MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]+sizeof(BITMAPINFOHEADER));
+
+	i2=(int)pow((double)2,(double)MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biBitCount);
 	for(i=0;i<i2;i++){
 		if(ColorRef==RGB(pRgbq[i].rgbRed,pRgbq[i].rgbGreen,pRgbq[i].rgbBlue)) break;
@@ -74,16 +74,16 @@
 	//何も選択されていない場合は0を返す
 	sw=0;
-	if(MdiInfo[WndNum].MdiIconEditInfo->SelectLevel==0) return 0;
-	if(MdiInfo[WndNum].MdiIconEditInfo->SelectLevel==1){
+	if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==0) return 0;
+	if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==1){
 		IconEdit_SelectImage(WndNum);
 		sw=1;
 	}
 
-	size.cx=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.right-MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.left+1;
-	size.cy=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.bottom-MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.top+1;
-
-	hDC=CreateCompatibleDC(MdiInfo[WndNum].MdiIconEditInfo->memdc);
+	size.cx=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.right-MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left+1;
+	size.cy=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.bottom-MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top+1;
+
+	hDC=CreateCompatibleDC(MdiInfo[WndNum]->MdiIconEditInfo->memdc);
 	hBmp=CreateCompatibleBitmap(
-		MdiInfo[WndNum].MdiIconEditInfo->memdc,
+		MdiInfo[WndNum]->MdiIconEditInfo->memdc,
 		size.cx,
 		size.cy);
@@ -91,7 +91,7 @@
 
 	BitBlt(hDC,0,0,size.cx,size.cy,
-		MdiInfo[WndNum].MdiIconEditInfo->memdc,
-		MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.left,
-		MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.top,
+		MdiInfo[WndNum]->MdiIconEditInfo->memdc,
+		MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left,
+		MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top,
 		SRCCOPY);
 
@@ -99,6 +99,6 @@
 
 	if(sw){
-		DeleteObject(MdiInfo[WndNum].MdiIconEditInfo->hSelectingBmp);
-		MdiInfo[WndNum].MdiIconEditInfo->SelectLevel=1;
+		DeleteObject(MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp);
+		MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel=1;
 	}
 
@@ -113,14 +113,14 @@
 	BITMAP Bitmap;
 
-	if(MdiInfo[WndNum].MdiIconEditInfo->SelectLevel==2)
+	if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==2)
 		IconEdit_PasteImage(WndNum);
 
 	GetObject(hBmp,sizeof(Bitmap),&Bitmap);
 
-	hDC=CreateCompatibleDC(MdiInfo[WndNum].MdiIconEditInfo->memdc);
-	MdiInfo[WndNum].MdiIconEditInfo->hSelectingBmp=
-		CreateCompatibleBitmap(MdiInfo[WndNum].MdiIconEditInfo->memdc,Bitmap.bmWidth,Bitmap.bmHeight);
-	SelectObject(hDC,MdiInfo[WndNum].MdiIconEditInfo->hSelectingBmp);
-	hDC2=CreateCompatibleDC(MdiInfo[WndNum].MdiIconEditInfo->memdc);
+	hDC=CreateCompatibleDC(MdiInfo[WndNum]->MdiIconEditInfo->memdc);
+	MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp=
+		CreateCompatibleBitmap(MdiInfo[WndNum]->MdiIconEditInfo->memdc,Bitmap.bmWidth,Bitmap.bmHeight);
+	SelectObject(hDC,MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp);
+	hDC2=CreateCompatibleDC(MdiInfo[WndNum]->MdiIconEditInfo->memdc);
 	SelectObject(hDC2,hBmp);
 
@@ -131,12 +131,12 @@
 	DeleteDC(hDC2);
 
-	MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.left=0;
-	MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.top=0;
-	MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.right=Bitmap.bmWidth-1;
-	MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.bottom=Bitmap.bmHeight-1;
-
-	InvalidateRect(MdiInfo[WndNum].MdiIconEditInfo->hMain,NULL,0);
-
-	MdiInfo[WndNum].MdiIconEditInfo->SelectLevel=2;
+	MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left=0;
+	MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top=0;
+	MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.right=Bitmap.bmWidth-1;
+	MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.bottom=Bitmap.bmHeight-1;
+
+	InvalidateRect(MdiInfo[WndNum]->MdiIconEditInfo->hMain,NULL,0);
+
+	MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel=2;
 }
 
@@ -145,19 +145,19 @@
 	HDC hDC;
 
-	size.cx=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.right-MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.left+1;
-	size.cy=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.bottom-MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.top+1;
-
-	hDC=CreateCompatibleDC(MdiInfo[WndNum].MdiIconEditInfo->memdc);
-	MdiInfo[WndNum].MdiIconEditInfo->hSelectingBmp=
-		CreateCompatibleBitmap(MdiInfo[WndNum].MdiIconEditInfo->memdc,size.cx,size.cy);
-	SelectObject(hDC,MdiInfo[WndNum].MdiIconEditInfo->hSelectingBmp);
+	size.cx=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.right-MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left+1;
+	size.cy=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.bottom-MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top+1;
+
+	hDC=CreateCompatibleDC(MdiInfo[WndNum]->MdiIconEditInfo->memdc);
+	MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp=
+		CreateCompatibleBitmap(MdiInfo[WndNum]->MdiIconEditInfo->memdc,size.cx,size.cy);
+	SelectObject(hDC,MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp);
 	BitBlt(hDC,0,0,size.cx,size.cy,
-		MdiInfo[WndNum].MdiIconEditInfo->memdc,
-		MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.left,
-		MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.top,
+		MdiInfo[WndNum]->MdiIconEditInfo->memdc,
+		MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left,
+		MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top,
 		SRCCOPY);
 	DeleteDC(hDC);
 
-	MdiInfo[WndNum].MdiIconEditInfo->SelectLevel=2;
+	MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel=2;
 }
 void IconEdit_PasteImage(int WndNum){
@@ -179,5 +179,5 @@
 	IconEdit_NoticeChanging(WndNum);
 
-	GetObject(MdiInfo[WndNum].MdiIconEditInfo->hSelectingBmp,sizeof(BITMAP),&Bitmap);
+	GetObject(MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp,sizeof(BITMAP),&Bitmap);
 	pSelectingBuffer=(COLORREF *)HeapAlloc(hHeap,0,Bitmap.bmWidth*Bitmap.bmHeight*sizeof(COLORREF));
 	SelectingBitmapInfo.bmiHeader.biSize=sizeof(BITMAPINFOHEADER);
@@ -187,16 +187,16 @@
 	SelectingBitmapInfo.bmiHeader.biBitCount=32;
 	SelectingBitmapInfo.bmiHeader.biCompression=BI_RGB;
-	GetDIBits(MdiInfo[WndNum].MdiIconEditInfo->memdc,
-		MdiInfo[WndNum].MdiIconEditInfo->hSelectingBmp,
+	GetDIBits(MdiInfo[WndNum]->MdiIconEditInfo->memdc,
+		MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp,
 		0,Bitmap.bmHeight,
 		pSelectingBuffer,&SelectingBitmapInfo,DIB_RGB_COLORS);
 
-	pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum].MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum];
+	pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum];
 
 	//カラーテーブルを取得
-	pRgbq=(RGBQUAD *)(MdiInfo[WndNum].MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]+sizeof(BITMAPINFOHEADER));
+	pRgbq=(RGBQUAD *)(MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]+sizeof(BITMAPINFOHEADER));
 
 	//ビットバッファを取得
-	pBuffer=MdiInfo[WndNum].MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]+
+	pBuffer=MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]+
 		sizeof(BITMAPINFOHEADER);
 	if(pBmpInfoHdr->biBitCount<=8)
@@ -206,15 +206,15 @@
 	pMaskBuf=pBuffer+pBmpInfoHdr->biBitCount*pBmpInfoHdr->biWidth*(pBmpInfoHdr->biHeight/2)/8;
 
-	for(y=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.bottom;y>=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.top;y--){
-		for(x=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.left;x<=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.right;x++){
+	for(y=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.bottom;y>=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top;y--){
+		for(x=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left;x<=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.right;x++){
 			if(x<0||y<0||
-				x>=MdiInfo[WndNum].MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biWidth||
-				y>=MdiInfo[WndNum].MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biHeight/2){
+				x>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biWidth||
+				y>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biHeight/2){
 				//範囲外の場合
 				continue;
 			}
 
-			selecting_x=x-MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.left;
-			selecting_y=y-MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.top;
+			selecting_x=x-MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left;
+			selecting_y=y-MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top;
 			dwRgbq=pSelectingBuffer[(Bitmap.bmHeight-1-selecting_y)*Bitmap.bmWidth+selecting_x];
 
@@ -284,9 +284,9 @@
 	HeapDefaultFree(pSelectingBuffer);
 
-	DeleteObject(MdiInfo[WndNum].MdiIconEditInfo->hSelectingBmp);
-	MdiInfo[WndNum].MdiIconEditInfo->SelectLevel=0;
+	DeleteObject(MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp);
+	MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel=0;
 
 	DrawIconToMemBmp(WndNum,0);
-	InvalidateRect(MdiInfo[WndNum].MdiIconEditInfo->hMain,NULL,0);
+	InvalidateRect(MdiInfo[WndNum]->MdiIconEditInfo->hMain,NULL,0);
 }
 
@@ -301,5 +301,5 @@
 	BITMAPINFOHEADER *pBmpInfoHdr;
 
-	pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum].MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum];
+	pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum];
 
 	if( !(pBmpInfoHdr->biBitCount == 4 || pBmpInfoHdr->biBitCount == 8 ) ){
@@ -310,11 +310,11 @@
 
 	hPen=CreatePen(PS_SOLID,0,RGB(200,200,200));
-	hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiIconEditInfo->memdc,hPen);
+	hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiIconEditInfo->memdc,hPen);
 
 	//カラーテーブルを取得
-	pRgbq=(RGBQUAD *)(MdiInfo[WndNum].MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]+sizeof(BITMAPINFOHEADER));
+	pRgbq=(RGBQUAD *)(MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]+sizeof(BITMAPINFOHEADER));
 
 	//ビットバッファを取得
-	pBuffer=MdiInfo[WndNum].MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]+
+	pBuffer=MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]+
 		sizeof(BITMAPINFOHEADER);
 	if(pBmpInfoHdr->biBitCount<=8)
@@ -344,17 +344,17 @@
 			if(i2){
 				hBrush=CreateSolidBrush(TransparentClrRef);
-				hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum].MdiIconEditInfo->memdc,hBrush);
+				hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum]->MdiIconEditInfo->memdc,hBrush);
 				pos.x=x;
 				pos.y=y;
 				GetZoomedPos(&pos);
-				Rectangle(MdiInfo[WndNum].MdiIconEditInfo->memdc,
+				Rectangle(MdiInfo[WndNum]->MdiIconEditInfo->memdc,
 					pos.x,
 					pos.y,
 					pos.x+11,
 					pos.y+11);
-				SelectObject(MdiInfo[WndNum].MdiIconEditInfo->memdc,hOldBrush);
+				SelectObject(MdiInfo[WndNum]->MdiIconEditInfo->memdc,hOldBrush);
 				DeleteObject(hBrush);
 
-				SetPixel(MdiInfo[WndNum].MdiIconEditInfo->memdc,x,y,TransparentClrRef);
+				SetPixel(MdiInfo[WndNum]->MdiIconEditInfo->memdc,x,y,TransparentClrRef);
 				continue;
 			}
@@ -377,21 +377,21 @@
 
 			hBrush=CreateSolidBrush(ColorRef);
-			hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum].MdiIconEditInfo->memdc,hBrush);
+			hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum]->MdiIconEditInfo->memdc,hBrush);
 			pos.x=x;
 			pos.y=y;
 			GetZoomedPos(&pos);
-			Rectangle(MdiInfo[WndNum].MdiIconEditInfo->memdc,
+			Rectangle(MdiInfo[WndNum]->MdiIconEditInfo->memdc,
 				pos.x,
 				pos.y,
 				pos.x+11,
 				pos.y+11);
-			SelectObject(MdiInfo[WndNum].MdiIconEditInfo->memdc,hOldBrush);
+			SelectObject(MdiInfo[WndNum]->MdiIconEditInfo->memdc,hOldBrush);
 			DeleteObject(hBrush);
 
-			SetPixel(MdiInfo[WndNum].MdiIconEditInfo->memdc,x,y,ColorRef);
-		}
-	}
-
-	SelectObject(MdiInfo[WndNum].MdiIconEditInfo->memdc,hOldPen);
+			SetPixel(MdiInfo[WndNum]->MdiIconEditInfo->memdc,x,y,ColorRef);
+		}
+	}
+
+	SelectObject(MdiInfo[WndNum]->MdiIconEditInfo->memdc,hOldPen);
 	DeleteObject(hPen);
 }
@@ -404,11 +404,11 @@
 
 	if(x<0||y<0) return;
-	if(x>=MdiInfo[WndNum].MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biWidth||
-		y>=MdiInfo[WndNum].MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biHeight/2)
+	if(x>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biWidth||
+		y>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biHeight/2)
 		return;
 
-	pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum].MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum];
-
-	pBuffer=MdiInfo[WndNum].MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]+
+	pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum];
+
+	pBuffer=MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]+
 		sizeof(BITMAPINFOHEADER);
 	pBuffer+=sizeof(DWORD)*(int)pow((double)2,(double)pBmpInfoHdr->biBitCount);
@@ -466,15 +466,15 @@
 
 	if(x<0||y<0) return 0;
-	if(x>=MdiInfo[WndNum].MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biWidth||
-		y>=MdiInfo[WndNum].MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biHeight/2)
+	if(x>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biWidth||
+		y>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biHeight/2)
 		return 0;
 
-	pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum].MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum];
+	pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum];
 
 	//カラーテーブルを取得
-	pRgbq=(RGBQUAD *)(MdiInfo[WndNum].MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]+sizeof(BITMAPINFOHEADER));
+	pRgbq=(RGBQUAD *)(MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]+sizeof(BITMAPINFOHEADER));
 
 	//通常バッファを取得
-	pBuffer=MdiInfo[WndNum].MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]+
+	pBuffer=MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]+
 		sizeof(BITMAPINFOHEADER)+
 		sizeof(DWORD)*(int)pow((double)2,(double)pBmpInfoHdr->biBitCount);
@@ -567,6 +567,6 @@
 
 	if(x<0||y<0) return;
-	if(x>=MdiInfo[WndNum].MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biWidth||
-		y>=MdiInfo[WndNum].MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biHeight/2)
+	if(x>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biWidth||
+		y>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biHeight/2)
 		return;
 
@@ -676,9 +676,9 @@
 		pRect->right,
 		pRect->bottom,
-		GetColorCode(WndNum,MdiInfo[WndNum].MdiIconEditInfo->SubColor),
-		GetColorCode(WndNum,MdiInfo[WndNum].MdiIconEditInfo->SubColor),1);
+		GetColorCode(WndNum,MdiInfo[WndNum]->MdiIconEditInfo->SubColor),
+		GetColorCode(WndNum,MdiInfo[WndNum]->MdiIconEditInfo->SubColor),1);
 
 	DrawIconToMemBmp(WndNum,0);
-	InvalidateRect(MdiInfo[WndNum].MdiIconEditInfo->hMain,NULL,0);
+	InvalidateRect(MdiInfo[WndNum]->MdiIconEditInfo->hMain,NULL,0);
 }
 
@@ -697,9 +697,9 @@
 	//以前の選択フレームを消去
 	BITMAPINFOHEADER *pBmpInfoHdr;
-	pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum].MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum];
+	pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum];
 	pos.x=pBmpInfoHdr->biWidth;
 	pos.y=pBmpInfoHdr->biHeight/2;
 	GetZoomedPos(&pos);
-	BitBlt(hdc,0,0,pos.x,pos.y,MdiInfo[WndNum].MdiIconEditInfo->memdc,0,0,SRCCOPY);
+	BitBlt(hdc,0,0,pos.x,pos.y,MdiInfo[WndNum]->MdiIconEditInfo->memdc,0,0,SRCCOPY);
 
 
@@ -735,8 +735,8 @@
 	RECT rect;
 
-	rect.left=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.left*PIXEL_WIDTH+ZOOMED_XPOS;
-	rect.top=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.top*PIXEL_WIDTH;
-	rect.right=(MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.right+1)*PIXEL_WIDTH+ZOOMED_XPOS+1;
-	rect.bottom=(MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.bottom+1)*PIXEL_WIDTH+1;
+	rect.left=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left*PIXEL_WIDTH+ZOOMED_XPOS;
+	rect.top=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top*PIXEL_WIDTH;
+	rect.right=(MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.right+1)*PIXEL_WIDTH+ZOOMED_XPOS+1;
+	rect.bottom=(MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.bottom+1)*PIXEL_WIDTH+1;
 
 	SetBkMode(hdc,TRANSPARENT);
@@ -810,5 +810,5 @@
 	COLORREF *pSelectingBuffer;
 
-	GetObject(MdiInfo[WndNum].MdiIconEditInfo->hSelectingBmp,sizeof(BITMAP),&Bitmap);
+	GetObject(MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp,sizeof(BITMAP),&Bitmap);
 	pSelectingBuffer=(COLORREF *)HeapAlloc(hHeap,0,Bitmap.bmWidth*Bitmap.bmHeight*sizeof(COLORREF));
 	SelectingBitmapInfo.bmiHeader.biSize=sizeof(BITMAPINFOHEADER);
@@ -818,6 +818,6 @@
 	SelectingBitmapInfo.bmiHeader.biBitCount=32;
 	SelectingBitmapInfo.bmiHeader.biCompression=BI_RGB;
-	GetDIBits(MdiInfo[WndNum].MdiIconEditInfo->memdc,
-		MdiInfo[WndNum].MdiIconEditInfo->hSelectingBmp,
+	GetDIBits(MdiInfo[WndNum]->MdiIconEditInfo->memdc,
+		MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp,
 		0,Bitmap.bmHeight,
 		pSelectingBuffer,&SelectingBitmapInfo,DIB_RGB_COLORS);
@@ -855,11 +855,11 @@
 	RECT rect;
 
-	pos.x=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.left;
-	pos.y=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.top;
+	pos.x=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left;
+	pos.y=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top;
 	GetZoomedPos(&pos);
 	rect.left=pos.x;
 	rect.top=pos.y;
-	pos.x=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.right+1;
-	pos.y=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.bottom+1;
+	pos.x=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.right+1;
+	pos.y=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.bottom+1;
 	GetZoomedPos(&pos);
 	rect.right=pos.x;
@@ -878,11 +878,11 @@
 	POINT pos;
 
-	size.cx=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.right-MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.left;
-	size.cy=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.bottom-MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.top;
-	hDC2=CreateCompatibleDC(MdiInfo[WndNum].MdiIconEditInfo->memdc);
-	SelectObject(hDC2,MdiInfo[WndNum].MdiIconEditInfo->hSelectingBmp);
+	size.cx=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.right-MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left;
+	size.cy=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.bottom-MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top;
+	hDC2=CreateCompatibleDC(MdiInfo[WndNum]->MdiIconEditInfo->memdc);
+	SelectObject(hDC2,MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp);
 	BitBlt(hdc,
-		MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.left,
-		MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.top,
+		MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left,
+		MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top,
 		size.cx,size.cy,
 		hDC2,0,0,SRCCOPY);
@@ -890,6 +890,6 @@
 
 	//拡大選択イメージを表示
-	pos.x=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.left;
-	pos.y=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.top;
+	pos.x=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left;
+	pos.y=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top;
 	DrawZoomedBitmap(hdc,WndNum,&pos);
 }
@@ -1140,14 +1140,14 @@
 			if(message==WM_LBUTTONDOWN){
 				dwDrag=1;
-				MainClrRef=MdiInfo[WndNum].MdiIconEditInfo->MainColor;
-				SubClrRef=MdiInfo[WndNum].MdiIconEditInfo->SubColor;
+				MainClrRef=MdiInfo[WndNum]->MdiIconEditInfo->MainColor;
+				SubClrRef=MdiInfo[WndNum]->MdiIconEditInfo->SubColor;
 			}
 			else{
 				dwDrag=2;
-				MainClrRef=MdiInfo[WndNum].MdiIconEditInfo->SubColor;
-				SubClrRef=MdiInfo[WndNum].MdiIconEditInfo->MainColor;
-			}
-
-			if(MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_SELECT){
+				MainClrRef=MdiInfo[WndNum]->MdiIconEditInfo->SubColor;
+				SubClrRef=MdiInfo[WndNum]->MdiIconEditInfo->MainColor;
+			}
+
+			if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_SELECT){
 				if(dwDrag==2){
 					dwDrag=0;
@@ -1156,12 +1156,12 @@
 				}
 
-				if(MdiInfo[WndNum].MdiIconEditInfo->SelectLevel){
+				if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel){
 					NowDragging=IconEdit_GetStateOfDraggingFrame(WndNum,LOWORD(lParam),HIWORD(lParam));
 					if(NowDragging==0){
-						if(MdiInfo[WndNum].MdiIconEditInfo->SelectLevel==1){
-							MdiInfo[WndNum].MdiIconEditInfo->SelectLevel=0;
+						if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==1){
+							MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel=0;
 							InvalidateRect(hwnd,NULL,0);
 						}
-						else if(MdiInfo[WndNum].MdiIconEditInfo->SelectLevel==2)
+						else if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==2)
 							IconEdit_PasteImage(WndNum);
 
@@ -1169,10 +1169,10 @@
 					}
 					else if(NowDragging==FRAME_INSIDE){
-						if(MdiInfo[WndNum].MdiIconEditInfo->SelectLevel==1){
+						if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==1){
 							IconEdit_SelectImage(WndNum);
-							IconEdit_EraseRect(WndNum,&MdiInfo[WndNum].MdiIconEditInfo->DraggingRect);
+							IconEdit_EraseRect(WndNum,&MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect);
 						}
 
-						OldRect=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect;
+						OldRect=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect;
 					}
 				}
@@ -1185,5 +1185,5 @@
 				InvalidateRect(hwnd,NULL,0);
 			}
-			else if(MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_PEN){
+			else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_PEN){
 				//変更情報
 				IconEdit_NoticeChanging(WndNum);
@@ -1201,5 +1201,5 @@
 				SetCursor(LoadCursor(hResInst,MAKEINTRESOURCE(IDC_CURSOR_PEN)));
 			}
-			else if(MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_FILL){
+			else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_FILL){
 				//変更情報
 				IconEdit_NoticeChanging(WndNum);
@@ -1216,9 +1216,9 @@
 				SetCursor(LoadCursor(hResInst,MAKEINTRESOURCE(IDC_CURSOR_FILL)));
 			}
-			else if(MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_LINE||
-				MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_RECTANGLE||
-				MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT||
-				MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT2||
-				MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_ELLIPSE){
+			else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_LINE||
+				MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_RECTANGLE||
+				MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT||
+				MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT2||
+				MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_ELLIPSE){
 				hdc=GetDC(hwnd);
 				TempLine(hdc,WndNum,pos.x,pos.y,pos.x,pos.y,MainClrRef);
@@ -1242,10 +1242,10 @@
 
 			if(dwDrag==1){
-				MainClrRef=MdiInfo[WndNum].MdiIconEditInfo->MainColor;
-				SubClrRef=MdiInfo[WndNum].MdiIconEditInfo->SubColor;
+				MainClrRef=MdiInfo[WndNum]->MdiIconEditInfo->MainColor;
+				SubClrRef=MdiInfo[WndNum]->MdiIconEditInfo->SubColor;
 			}
 			else{
-				MainClrRef=MdiInfo[WndNum].MdiIconEditInfo->SubColor;
-				SubClrRef=MdiInfo[WndNum].MdiIconEditInfo->MainColor;
+				MainClrRef=MdiInfo[WndNum]->MdiIconEditInfo->SubColor;
+				SubClrRef=MdiInfo[WndNum]->MdiIconEditInfo->MainColor;
 			}
 
@@ -1254,5 +1254,5 @@
 
 			bRedrawMemBmp=0;
-			if(MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_SELECT){
+			if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_SELECT){
 				if(NowDragging==SELECTING_FRAME){
 					if(LastPos.x==pos.x&&LastPos.y==pos.y){
@@ -1265,7 +1265,7 @@
 					rect.bottom=pos.y;
 
-					RectNaturalFormat(&rect,&MdiInfo[WndNum].MdiIconEditInfo->DraggingRect);
-					LimitRectFormat(WndNum,&MdiInfo[WndNum].MdiIconEditInfo->DraggingRect);
-					MdiInfo[WndNum].MdiIconEditInfo->SelectLevel=1;
+					RectNaturalFormat(&rect,&MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect);
+					LimitRectFormat(WndNum,&MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect);
+					MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel=1;
 					InvalidateRect(hwnd,NULL,0);
 				}
@@ -1273,5 +1273,5 @@
 					InvalidateRect(hwnd,NULL,0);
 			}
-			else if(MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_LINE){
+			else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_LINE){
 				//変更情報
 				IconEdit_NoticeChanging(WndNum);
@@ -1281,5 +1281,5 @@
 				bRedrawMemBmp=1;
 			}
-			else if(MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_RECTANGLE){
+			else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_RECTANGLE){
 				//変更情報
 				IconEdit_NoticeChanging(WndNum);
@@ -1289,5 +1289,5 @@
 				bRedrawMemBmp=1;
 			}
-			else if(MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT){
+			else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT){
 				//変更情報
 				IconEdit_NoticeChanging(WndNum);
@@ -1299,5 +1299,5 @@
 				bRedrawMemBmp=1;
 			}
-			else if(MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT2){
+			else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT2){
 				//変更情報
 				IconEdit_NoticeChanging(WndNum);
@@ -1309,5 +1309,5 @@
 				bRedrawMemBmp=1;
 			}
-			else if(MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_ELLIPSE){
+			else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_ELLIPSE){
 				//変更情報
 				IconEdit_NoticeChanging(WndNum);
@@ -1337,14 +1337,14 @@
 
 			if(dwDrag==1){
-				MainClrRef=MdiInfo[WndNum].MdiIconEditInfo->MainColor;
-				SubClrRef=MdiInfo[WndNum].MdiIconEditInfo->SubColor;
+				MainClrRef=MdiInfo[WndNum]->MdiIconEditInfo->MainColor;
+				SubClrRef=MdiInfo[WndNum]->MdiIconEditInfo->SubColor;
 			}
 			else{
-				MainClrRef=MdiInfo[WndNum].MdiIconEditInfo->SubColor;
-				SubClrRef=MdiInfo[WndNum].MdiIconEditInfo->MainColor;
+				MainClrRef=MdiInfo[WndNum]->MdiIconEditInfo->SubColor;
+				SubClrRef=MdiInfo[WndNum]->MdiIconEditInfo->MainColor;
 			}
 
 			if(dwDrag){
-				if(MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_SELECT){
+				if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_SELECT){
 					if(NowDragging==SELECTING_FRAME){
 						//範囲選択中
@@ -1361,8 +1361,8 @@
 						dx=pos.x-LastPos.x;
 						dy=pos.y-LastPos.y;
-						MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.left+=dx;
-						MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.right+=dx;
-						MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.top+=dy;
-						MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.bottom+=dy;
+						MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left+=dx;
+						MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.right+=dx;
+						MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top+=dy;
+						MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.bottom+=dy;
 						LastPos=pos;
 
@@ -1376,5 +1376,5 @@
 
 						hRgn=CreateRectRgnIndirect(&OldRect);
-						hRgn2=CreateRectRgnIndirect(&MdiInfo[WndNum].MdiIconEditInfo->DraggingRect);
+						hRgn2=CreateRectRgnIndirect(&MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect);
 						CombineRgn(hRgn,hRgn,hRgn2,RGN_XOR);
 						DeleteObject(hRgn2);
@@ -1394,11 +1394,11 @@
 						DeleteObject(hRgn2);
 
-						p2.x=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.left;
-						p2.y=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.top;
+						p2.x=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left;
+						p2.y=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top;
 						GetZoomedPos(&p2);
 						rect.left=p2.x;
 						rect.top=p2.y;
-						p2.x=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.right;
-						p2.y=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.bottom;
+						p2.x=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.right;
+						p2.y=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.bottom;
 						GetZoomedPos(&p2);
 						rect.right=p2.x+1;
@@ -1415,8 +1415,8 @@
 						ReleaseDC(hwnd,hdc);
 
-						OldRect=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect;
+						OldRect=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect;
 					}
 				}
-				else if(MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_PEN){
+				else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_PEN){
 					if(abs(pos.x-LastPos.x)>1||abs(pos.y-LastPos.y)>1){
 						IconEdit_DrawLine(WndNum,LastPos.x,LastPos.y,pos.x,pos.y,GetColorCode(WndNum,MainClrRef));
@@ -1442,5 +1442,5 @@
 					LastPos=pos;
 				}
-				else if(MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_LINE){
+				else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_LINE){
 					InvalidateRect(hwnd,NULL,0);
 					UpdateWindow(hwnd);
@@ -1450,5 +1450,5 @@
 					ReleaseDC(hwnd,hdc);
 				}
-				else if(MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_RECTANGLE){
+				else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_RECTANGLE){
 					InvalidateRect(hwnd,NULL,0);
 					UpdateWindow(hwnd);
@@ -1458,5 +1458,5 @@
 					ReleaseDC(hwnd,hdc);
 				}
-				else if(MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT){
+				else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT){
 					InvalidateRect(hwnd,NULL,0);
 					UpdateWindow(hwnd);
@@ -1468,5 +1468,5 @@
 					ReleaseDC(hwnd,hdc);
 				}
-				else if(MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT2){
+				else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT2){
 					InvalidateRect(hwnd,NULL,0);
 					UpdateWindow(hwnd);
@@ -1478,5 +1478,5 @@
 					ReleaseDC(hwnd,hdc);
 				}
-				else if(MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_ELLIPSE){
+				else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_ELLIPSE){
 					InvalidateRect(hwnd,NULL,0);
 					UpdateWindow(hwnd);
@@ -1489,19 +1489,19 @@
 			else{
 				//ドラッグ中でないとき
-				if(MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_SELECT){
-					if(MdiInfo[WndNum].MdiIconEditInfo->SelectLevel)
+				if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_SELECT){
+					if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel)
 						SetCursorByState(IconEdit_GetStateOfDraggingFrame(WndNum,LOWORD(lParam),HIWORD(lParam)));
 					else
 						SetCursor(LoadCursor(NULL,IDC_CROSS));
 				}
-				else if(MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_PEN)
+				else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_PEN)
 					SetCursor(LoadCursor(hResInst,MAKEINTRESOURCE(IDC_CURSOR_PEN)));
-				else if(MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_FILL)
+				else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_FILL)
 					SetCursor(LoadCursor(hResInst,MAKEINTRESOURCE(IDC_CURSOR_FILL)));
-				else if(MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_LINE||
-					MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_RECTANGLE||
-					MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT||
-					MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT2||
-					MdiInfo[WndNum].MdiIconEditInfo->NowTool==IDC_TOOL_ELLIPSE){
+				else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_LINE||
+					MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_RECTANGLE||
+					MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT||
+					MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT2||
+					MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_ELLIPSE){
 					SetCursor(LoadCursor(NULL,IDC_CROSS));
 				}
@@ -1512,7 +1512,7 @@
 				case VK_ESCAPE:
 					WndNum=GetWndNum(GetParent(hwnd));
-					if(MdiInfo[WndNum].MdiIconEditInfo->SelectLevel==2){
-						DeleteObject(MdiInfo[WndNum].MdiIconEditInfo->hSelectingBmp);
-						MdiInfo[WndNum].MdiIconEditInfo->SelectLevel=0;
+					if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==2){
+						DeleteObject(MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp);
+						MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel=0;
 					}
 					InvalidateRect(hwnd,NULL,0);
@@ -1526,5 +1526,5 @@
 			WndNum=GetWndNum(GetParent(hwnd));
 			BITMAPINFOHEADER *pBmpInfoHdr;
-			pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum].MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum];
+			pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum];
 
 			hdc=BeginPaint(hwnd,&ps);
@@ -1537,5 +1537,5 @@
 				size.cx,
 				size.cy,
-				MdiInfo[WndNum].MdiIconEditInfo->memdc,0,0,SRCCOPY);
+				MdiInfo[WndNum]->MdiIconEditInfo->memdc,0,0,SRCCOPY);
 
 			HBRUSH hOldBrush;
@@ -1550,7 +1550,7 @@
 				PATCOPY);
 
-			if(MdiInfo[WndNum].MdiIconEditInfo->SelectLevel==1)
+			if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==1)
 				IconEdit_DrawSelectingRect(hdc,WndNum);
-			if(MdiInfo[WndNum].MdiIconEditInfo->SelectLevel==2){
+			if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==2){
 				DrawSelectingImage(hdc,WndNum);
 				if(dwDrag==0) IconEdit_DrawSelectingRect(hdc,WndNum);
