Index: trunk/ab5.0/abdev/abdev/DrawWindow.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/DrawWindow.cpp	(revision 615)
+++ trunk/ab5.0/abdev/abdev/DrawWindow.cpp	(revision 616)
@@ -1017,16 +1017,17 @@
 	//子ウィンドウ（ダイアログアイテム）を描画
 	hFont=CreateFontIndirect(&pWindowInfo->LogFont);
-	for(i=0;i<pWindowInfo->NumberOfChildWindows;i++){
-		pos=pWindowInfo->pChildInfo[i].pos;
-		size=pWindowInfo->pChildInfo[i].size;
+	BOOST_FOREACH( CHILDINFO *pChildInfo, pWindowInfo->childWindowInfos )
+	{
+		pos=pChildInfo->pos;
+		size=pChildInfo->size;
 
 		//ExStyleによる縁を描画
-		DrawItemEdgeByExStyle(WndNum,pWindowInfo->pChildInfo[i].ExStyle,&pos,&size);
-
-		if(pWindowInfo->pChildInfo[i].Control==CT_BUTTON){
+		DrawItemEdgeByExStyle(WndNum,pChildInfo->ExStyle,&pos,&size);
+
+		if(pChildInfo->Control==CT_BUTTON){
 			////////////////////////
 			// Button コントロール
 
-			if((pWindowInfo->pChildInfo[i].style&0x0000000F)==BS_DEFPUSHBUTTON){
+			if((pChildInfo->style&0x0000000F)==BS_DEFPUSHBUTTON){
 				//標準のボタンの場合（黒枠描画）
 				DrawRectangleInClient(WndNum,
@@ -1043,5 +1044,5 @@
 			DrawButtonEdge(WndNum,&pos,&size);
 
-			if(!(pWindowInfo->pChildInfo[i].style&(BS_ICON|BS_BITMAP))){
+			if(!(pChildInfo->style&(BS_ICON|BS_BITMAP))){
 				//キャプション テキスト
 
@@ -1051,21 +1052,21 @@
 				rect.bottom=pos.y+size.cy-2+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
 
-				if(pWindowInfo->pChildInfo[i].style&BS_MULTILINE) i4=0;
+				if(pChildInfo->style&BS_MULTILINE) i4=0;
 				else i4=DT_SINGLELINE;
 
 				//ビットを考慮してBS_CENTERを最初に比較する
-				if((pWindowInfo->pChildInfo[i].style&BS_CENTER)==BS_CENTER) i2=DT_CENTER;
-				else if(pWindowInfo->pChildInfo[i].style&BS_LEFT) i2=DT_LEFT;
-				else if(pWindowInfo->pChildInfo[i].style&BS_RIGHT) i2=DT_RIGHT;
+				if((pChildInfo->style&BS_CENTER)==BS_CENTER) i2=DT_CENTER;
+				else if(pChildInfo->style&BS_LEFT) i2=DT_LEFT;
+				else if(pChildInfo->style&BS_RIGHT) i2=DT_RIGHT;
 				else i2=DT_CENTER;
 
 				//ビットを考慮してBS_VCENTERを最初に比較する
-				if((pWindowInfo->pChildInfo[i].style&BS_VCENTER)==BS_VCENTER) i3=DT_VCENTER;
-				else if(pWindowInfo->pChildInfo[i].style&BS_TOP) i3=DT_TOP;
-				else if(pWindowInfo->pChildInfo[i].style&BS_BOTTOM) i3=DT_BOTTOM;
+				if((pChildInfo->style&BS_VCENTER)==BS_VCENTER) i3=DT_VCENTER;
+				else if(pChildInfo->style&BS_TOP) i3=DT_TOP;
+				else if(pChildInfo->style&BS_BOTTOM) i3=DT_BOTTOM;
 				else i3=DT_VCENTER;
 
 				hOldFont=(HFONT)SelectObject(hdc,hFont);
-				if(pWindowInfo->pChildInfo[i].style&WS_DISABLED){
+				if(pChildInfo->style&WS_DISABLED){
 					SetTextColor(hdc,RGB(255,255,255));
 					rc2.left=rect.left+1;
@@ -1073,18 +1074,18 @@
 					rc2.right=rect.right+1;
 					rc2.bottom=rect.bottom+1;
-					DrawText(hdc,pWindowInfo->pChildInfo[i].caption,-1,&rc2,i4|i2|i3);
+					DrawText(hdc,pChildInfo->caption,-1,&rc2,i4|i2|i3);
 					SetTextColor(hdc,GetSysColor(COLOR_GRAYTEXT));
 				}
 				else SetTextColor(hdc,GetSysColor(COLOR_BTNTEXT));
 
-				DrawText(hdc,pWindowInfo->pChildInfo[i].caption,-1,&rect,i4|i2|i3);
+				DrawText(hdc,pChildInfo->caption,-1,&rect,i4|i2|i3);
 				SelectObject(hdc,hOldFont);
 			}
 		}
-		else if(pWindowInfo->pChildInfo[i].Control==CT_CHECKBOX){
+		else if(pChildInfo->Control==CT_CHECKBOX){
 			//////////////////////////
 			// CheckBox コントロール
 
-			if(pWindowInfo->pChildInfo[i].style&BS_PUSHLIKE){
+			if(pChildInfo->style&BS_PUSHLIKE){
 				//ボタンの縁を描画
 				DrawButtonEdge(WndNum,&pos,&size);
@@ -1094,17 +1095,17 @@
 				size2.cx=13;
 				size2.cy=13;
-				if(pWindowInfo->pChildInfo[i].style&BS_LEFTTEXT)
+				if(pChildInfo->style&BS_LEFTTEXT)
 					pos2.x=pos.x+size.cx-size2.cx;
 				else pos2.x=pos.x;
-				if((pWindowInfo->pChildInfo[i].style&BS_VCENTER)==BS_VCENTER||
-					(pWindowInfo->pChildInfo[i].style&BS_VCENTER)==0)
+				if((pChildInfo->style&BS_VCENTER)==BS_VCENTER||
+					(pChildInfo->style&BS_VCENTER)==0)
 					pos2.y=pos.y+(size.cy/2)-(size2.cy/2);
-				else if(pWindowInfo->pChildInfo[i].style&BS_TOP)
+				else if(pChildInfo->style&BS_TOP)
 					pos2.y=pos.y+1;
-				else if(pWindowInfo->pChildInfo[i].style&BS_BOTTOM)
+				else if(pChildInfo->style&BS_BOTTOM)
 					pos2.y=pos.y+size.cy-size2.cy-1;
 				DrawItemEdgeByExStyle(WndNum,WS_EX_CLIENTEDGE,&pos2,&size2);
 
-				if(pWindowInfo->pChildInfo[i].style&WS_DISABLED)
+				if(pChildInfo->style&WS_DISABLED)
 					rgb=GetSysColor(COLOR_3DFACE);
 				else rgb=GetSysColor(COLOR_WINDOW);
@@ -1112,10 +1113,10 @@
 					pos2.x+size2.cx, pos2.y+size2.cy,
 					rgb,rgb,1);
-				if(!(pWindowInfo->pChildInfo[i].style&BS_LEFTTEXT)) pos.x+=17;
+				if(!(pChildInfo->style&BS_LEFTTEXT)) pos.x+=17;
 				else pos.x++;
 				size.cx-=17;
 			}
 
-			if(!(pWindowInfo->pChildInfo[i].style&(BS_ICON|BS_BITMAP))){
+			if(!(pChildInfo->style&(BS_ICON|BS_BITMAP))){
 				//キャプション テキスト
 				rect.left=pos.x+1+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
@@ -1124,21 +1125,21 @@
 				rect.bottom=pos.y+size.cy-2+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
 
-				if(pWindowInfo->pChildInfo[i].style&BS_MULTILINE) i4=0;
+				if(pChildInfo->style&BS_MULTILINE) i4=0;
 				else i4=DT_SINGLELINE;
 
 				//ビットを考慮してBS_CENTERを最初に比較する
-				if((pWindowInfo->pChildInfo[i].style&BS_CENTER)==BS_CENTER) i2=DT_CENTER;
-				else if(pWindowInfo->pChildInfo[i].style&BS_LEFT) i2=DT_LEFT;
-				else if(pWindowInfo->pChildInfo[i].style&BS_RIGHT) i2=DT_RIGHT;
+				if((pChildInfo->style&BS_CENTER)==BS_CENTER) i2=DT_CENTER;
+				else if(pChildInfo->style&BS_LEFT) i2=DT_LEFT;
+				else if(pChildInfo->style&BS_RIGHT) i2=DT_RIGHT;
 				else i2=DT_LEFT;
 
 				//ビットを考慮してBS_VCENTERを最初に比較する
-				if((pWindowInfo->pChildInfo[i].style&BS_VCENTER)==BS_VCENTER) i3=DT_VCENTER;
-				else if(pWindowInfo->pChildInfo[i].style&BS_TOP) i3=DT_TOP;
-				else if(pWindowInfo->pChildInfo[i].style&BS_BOTTOM) i3=DT_BOTTOM;
+				if((pChildInfo->style&BS_VCENTER)==BS_VCENTER) i3=DT_VCENTER;
+				else if(pChildInfo->style&BS_TOP) i3=DT_TOP;
+				else if(pChildInfo->style&BS_BOTTOM) i3=DT_BOTTOM;
 				else i3=DT_VCENTER;
 
 				hOldFont=(HFONT)SelectObject(hdc,hFont);
-				if(pWindowInfo->pChildInfo[i].style&WS_DISABLED){
+				if(pChildInfo->style&WS_DISABLED){
 					SetTextColor(hdc,RGB(255,255,255));
 					rc2.left=rect.left+1;
@@ -1146,14 +1147,14 @@
 					rc2.right=rect.right+1;
 					rc2.bottom=rect.bottom+1;
-					DrawText(hdc,pWindowInfo->pChildInfo[i].caption,-1,&rc2,i4|i2|i3);
+					DrawText(hdc,pChildInfo->caption,-1,&rc2,i4|i2|i3);
 					SetTextColor(hdc,GetSysColor(COLOR_GRAYTEXT));
 				}
 				else SetTextColor(hdc,GetSysColor(COLOR_BTNTEXT));
 
-				DrawText(hdc,pWindowInfo->pChildInfo[i].caption,-1,&rect,i4|i2|i3);
+				DrawText(hdc,pChildInfo->caption,-1,&rect,i4|i2|i3);
 				SelectObject(hdc,hOldFont);
 			}
 		}
-		else if(pWindowInfo->pChildInfo[i].Control==CT_COMBOBOX){
+		else if(pChildInfo->Control==CT_COMBOBOX){
 			//////////////////////////
 			// ComboBox コントロール
@@ -1165,5 +1166,5 @@
 
 			//内部
-			if(pWindowInfo->pChildInfo[i].style&WS_DISABLED)
+			if(pChildInfo->style&WS_DISABLED)
 				rgb=GetSysColor(COLOR_3DFACE);
 			else rgb=GetSysColor(COLOR_WINDOW);
@@ -1173,5 +1174,5 @@
 				rgb,rgb,1);
 
-			if((pWindowInfo->pChildInfo[i].style&0x000F)==CBS_SIMPLE){
+			if((pChildInfo->style&0x000F)==CBS_SIMPLE){
 				pos.y+=20;
 				size.cy-=20;
@@ -1199,5 +1200,5 @@
 
 				pos2.x--;
-				if(pWindowInfo->pChildInfo[i].style&WS_DISABLED){
+				if(pChildInfo->style&WS_DISABLED){
 					hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT));
 					hOldPen=(HPEN)SelectObject(hdc,hPen);
@@ -1225,10 +1226,10 @@
 			}
 		}
-		else if(pWindowInfo->pChildInfo[i].Control==CT_EDIT){
+		else if(pChildInfo->Control==CT_EDIT){
 			//////////////////////
 			// Edit コントロール
 
 			//内部
-			if(pWindowInfo->pChildInfo[i].style&WS_DISABLED||pWindowInfo->pChildInfo[i].style&ES_READONLY)
+			if(pChildInfo->style&WS_DISABLED||pChildInfo->style&ES_READONLY)
 				rgb=GetSysColor(COLOR_3DFACE);
 			else rgb=GetSysColor(COLOR_WINDOW);
@@ -1244,14 +1245,14 @@
 			rect.bottom=pos.y+size.cy-1+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
 
-			if(pWindowInfo->pChildInfo[i].style&ES_MULTILINE) i4=0;
+			if(pChildInfo->style&ES_MULTILINE) i4=0;
 			else i4=DT_SINGLELINE;
 
 			//ビットを考慮してES_LEFTを最後に検討する
-			if(pWindowInfo->pChildInfo[i].style&ES_CENTER) i2=DT_CENTER;
-			else if(pWindowInfo->pChildInfo[i].style&ES_RIGHT) i2=DT_RIGHT;
+			if(pChildInfo->style&ES_CENTER) i2=DT_CENTER;
+			else if(pChildInfo->style&ES_RIGHT) i2=DT_RIGHT;
 			else i2=DT_LEFT;
 
 			//文字色を設定
-			if(pWindowInfo->pChildInfo[i].style&WS_DISABLED)
+			if(pChildInfo->style&WS_DISABLED)
 				SetTextColor(hdc,GetSysColor(COLOR_GRAYTEXT));
 			else
@@ -1259,14 +1260,14 @@
 
 			hOldFont=(HFONT)SelectObject(hdc,hFont);
-			DrawText(hdc,pWindowInfo->pChildInfo[i].caption,-1,&rect,i4|i2);
+			DrawText(hdc,pChildInfo->caption,-1,&rect,i4|i2);
 			SelectObject(hdc,hOldFont);
 		}
 
-		else if(pWindowInfo->pChildInfo[i].Control==CT_GROUPBOX){
+		else if(pChildInfo->Control==CT_GROUPBOX){
 			///////////////////////////////////
 			// グループ ボックス コントロール
 
 			hOldFont=(HFONT)SelectObject(hdc,hFont);
-			GetTextExtentPoint32(hdc,pWindowInfo->pChildInfo[i].caption,lstrlen(pWindowInfo->pChildInfo[i].caption),&size2);
+			GetTextExtentPoint32(hdc,pChildInfo->caption,lstrlen(pChildInfo->caption),&size2);
 
 			//枠を描画
@@ -1278,9 +1279,9 @@
 
 			//ビットを考慮してBS_CENTERを最初に検討する
-			if((pWindowInfo->pChildInfo[i].style&BS_CENTER)==BS_CENTER){
+			if((pChildInfo->style&BS_CENTER)==BS_CENTER){
 				rect.left=pos.x+(size.cx/2)-(size2.cx/2)-3;
 				rect.right=rect.left+size2.cx+4;
 			}
-			else if(pWindowInfo->pChildInfo[i].style&BS_RIGHT){
+			else if(pChildInfo->style&BS_RIGHT){
 				rect.right=pos.x+size.cx-7;
 				rect.left=rect.right-size2.cx-4;
@@ -1297,5 +1298,5 @@
 			DrawRectangleInClient(WndNum,rect.left,rect.top,rect.right,rect.bottom,rgb,rgb,1);
 
-			if(!((pWindowInfo->pChildInfo[i].style&BS_ICON)||(pWindowInfo->pChildInfo[i].style&BS_BITMAP))){
+			if(!((pChildInfo->style&BS_ICON)||(pChildInfo->style&BS_BITMAP))){
 				rect.left+=MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
 				rect.top+=MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
@@ -1306,5 +1307,5 @@
 
 				//テキストを描画
-				if(pWindowInfo->pChildInfo[i].style&WS_DISABLED){
+				if(pChildInfo->style&WS_DISABLED){
 					SetTextColor(hdc,RGB(255,255,255));
 					rc2.left=rect.left+1;
@@ -1312,5 +1313,5 @@
 					rc2.right=rect.right+1;
 					rc2.bottom=rect.bottom+1;
-					DrawText(hdc,pWindowInfo->pChildInfo[i].caption,-1,&rc2,DT_SINGLELINE);
+					DrawText(hdc,pChildInfo->caption,-1,&rc2,DT_SINGLELINE);
 					SetTextColor(hdc,GetSysColor(COLOR_GRAYTEXT));
 				}
@@ -1318,27 +1319,27 @@
 					SetTextColor(hdc,GetSysColor(COLOR_BTNTEXT));
 
-				DrawText(hdc,pWindowInfo->pChildInfo[i].caption,-1,&rect,DT_SINGLELINE);
+				DrawText(hdc,pChildInfo->caption,-1,&rect,DT_SINGLELINE);
 			}
 			SelectObject(hdc,hOldFont);
 		}
 
-		else if(pWindowInfo->pChildInfo[i].Control==CT_HSCROLLBAR){
+		else if(pChildInfo->Control==CT_HSCROLLBAR){
 			////////////////////////////////////
 			// 水平スクロールバー コントロール
-			DrawScrollBar(WndNum,pWindowInfo->pChildInfo[i].style,0,&pos,&size);
-		}
-
-		else if(pWindowInfo->pChildInfo[i].Control==CT_IMAGEBOX){
+			DrawScrollBar(WndNum,pChildInfo->style,0,&pos,&size);
+		}
+
+		else if(pChildInfo->Control==CT_IMAGEBOX){
 			/////////////////////
 			// イメージ ボックス
 			HDC memdc;
 
-			if((pWindowInfo->pChildInfo[i].style&0x0000000F)==SS_BLACKFRAME)
+			if((pChildInfo->style&0x0000000F)==SS_BLACKFRAME)
 				DrawRectangleInClient(WndNum,pos.x,pos.y,pos.x+size.cx,pos.y+size.cy,RGB(0,0,0),0,0);
-			else if((pWindowInfo->pChildInfo[i].style&0x0000000F)==SS_GRAYFRAME)
+			else if((pChildInfo->style&0x0000000F)==SS_GRAYFRAME)
 				DrawRectangleInClient(WndNum,pos.x,pos.y,pos.x+size.cx,pos.y+size.cy,GetSysColor(COLOR_3DSHADOW),0,0);
-			else if((pWindowInfo->pChildInfo[i].style&0x0000000F)==SS_WHITEFRAME)
+			else if((pChildInfo->style&0x0000000F)==SS_WHITEFRAME)
 				DrawRectangleInClient(WndNum,pos.x,pos.y,pos.x+size.cx,pos.y+size.cy,RGB(255,255,255),0,0);
-			else if((pWindowInfo->pChildInfo[i].style&0x0000001F)==SS_ETCHEDFRAME){
+			else if((pChildInfo->style&0x0000001F)==SS_ETCHEDFRAME){
 				rect.left=pos.x+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
 				rect.top=pos.y+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
@@ -1347,16 +1348,16 @@
 				DrawEdge(hdc,&rect,EDGE_ETCHED,BF_RECT);
 			}
-			else if((pWindowInfo->pChildInfo[i].style&0x0000000F)==SS_BLACKRECT)
+			else if((pChildInfo->style&0x0000000F)==SS_BLACKRECT)
 				DrawRectangleInClient(WndNum,pos.x,pos.y,pos.x+size.cx,pos.y+size.cy,GetSysColor(COLOR_3DDKSHADOW),GetSysColor(COLOR_3DDKSHADOW),1);
-			else if((pWindowInfo->pChildInfo[i].style&0x0000000F)==SS_GRAYRECT)
+			else if((pChildInfo->style&0x0000000F)==SS_GRAYRECT)
 				DrawRectangleInClient(WndNum,pos.x,pos.y,pos.x+size.cx,pos.y+size.cy,GetSysColor(COLOR_3DSHADOW),GetSysColor(COLOR_3DSHADOW),1);
-			else if((pWindowInfo->pChildInfo[i].style&0x0000000F)==SS_WHITERECT)
+			else if((pChildInfo->style&0x0000000F)==SS_WHITERECT)
 				DrawRectangleInClient(WndNum,pos.x,pos.y,pos.x+size.cx,pos.y+size.cy,RGB(255,255,255),RGB(255,255,255),1);
-			else if((pWindowInfo->pChildInfo[i].style&0x0000000F)==SS_ICON){
-				if(pWindowInfo->pChildInfo[i].ImageCtrlInfo.type==IMGTYPE_FILE)
-					lstrcpy(temporary,pWindowInfo->pChildInfo[i].ImageCtrlInfo.path);
+			else if((pChildInfo->style&0x0000000F)==SS_ICON){
+				if(pChildInfo->ImageCtrlInfo.type==IMGTYPE_FILE)
+					lstrcpy(temporary,pChildInfo->ImageCtrlInfo.path);
 				else{
 					for(i2=0;i2<ProjectInfo.res.NumberOfIconRes;i2++){
-						if(lstrcmp(pWindowInfo->pChildInfo[i].ImageCtrlInfo.path,
+						if(lstrcmp(pChildInfo->ImageCtrlInfo.path,
 							ProjectInfo.res.pIconResInfo[i2].IdName)==0) break;
 					}
@@ -1368,11 +1369,11 @@
 				hImage=LoadImage(NULL,temporary,IMAGE_ICON,0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE);
 				if(hImage){
-					pWindowInfo->pChildInfo[i].size.cx=32+(pWindowInfo->pChildInfo[i].size.cx-size.cx);
-					pWindowInfo->pChildInfo[i].size.cy=32+(pWindowInfo->pChildInfo[i].size.cy-size.cy);
-					pos=pWindowInfo->pChildInfo[i].pos;
-					size=pWindowInfo->pChildInfo[i].size;
+					pChildInfo->size.cx=32+(pChildInfo->size.cx-size.cx);
+					pChildInfo->size.cy=32+(pChildInfo->size.cy-size.cy);
+					pos=pChildInfo->pos;
+					size=pChildInfo->size;
 
 					//ExStyleによる縁を再描画
-					DrawItemEdgeByExStyle(WndNum,pWindowInfo->pChildInfo[i].ExStyle,&pos,&size);
+					DrawItemEdgeByExStyle(WndNum,pChildInfo->ExStyle,&pos,&size);
 
 					DrawIcon(hdc,
@@ -1395,12 +1396,12 @@
 				}
 			}
-			else if((pWindowInfo->pChildInfo[i].style&0x0000000F)==SS_BITMAP){
+			else if((pChildInfo->style&0x0000000F)==SS_BITMAP){
 				BITMAP Bitmap;
 
-				if(pWindowInfo->pChildInfo[i].ImageCtrlInfo.type==IMGTYPE_FILE)
-					lstrcpy(temporary,pWindowInfo->pChildInfo[i].ImageCtrlInfo.path);
+				if(pChildInfo->ImageCtrlInfo.type==IMGTYPE_FILE)
+					lstrcpy(temporary,pChildInfo->ImageCtrlInfo.path);
 				else{
 					for(i2=0;i2<ProjectInfo.res.NumberOfBitmapRes;i2++){
-						if(lstrcmp(pWindowInfo->pChildInfo[i].ImageCtrlInfo.path,
+						if(lstrcmp(pChildInfo->ImageCtrlInfo.path,
 							ProjectInfo.res.pBitmapResInfo[i2].IdName)==0) break;
 					}
@@ -1414,11 +1415,11 @@
 					GetObject(hImage,sizeof(BITMAP),&Bitmap);
 
-					pWindowInfo->pChildInfo[i].size.cx=Bitmap.bmWidth+(pWindowInfo->pChildInfo[i].size.cx-size.cx);
-					pWindowInfo->pChildInfo[i].size.cy=Bitmap.bmHeight+(pWindowInfo->pChildInfo[i].size.cy-size.cy);
-					pos=pWindowInfo->pChildInfo[i].pos;
-					size=pWindowInfo->pChildInfo[i].size;
+					pChildInfo->size.cx=Bitmap.bmWidth+(pChildInfo->size.cx-size.cx);
+					pChildInfo->size.cy=Bitmap.bmHeight+(pChildInfo->size.cy-size.cy);
+					pos=pChildInfo->pos;
+					size=pChildInfo->size;
 
 					//ExStyleによる縁を再描画
-					DrawItemEdgeByExStyle(WndNum,pWindowInfo->pChildInfo[i].ExStyle,&pos,&size);
+					DrawItemEdgeByExStyle(WndNum,pChildInfo->ExStyle,&pos,&size);
 
 					memdc=CreateCompatibleDC(hdc);
@@ -1448,10 +1449,10 @@
 		}
 
-		else if(pWindowInfo->pChildInfo[i].Control==CT_LISTBOX){
+		else if(pChildInfo->Control==CT_LISTBOX){
 			/////////////////////////
 			// ListBox コントロール
 
 			//内部
-			if(pWindowInfo->pChildInfo[i].style&WS_DISABLED)
+			if(pChildInfo->style&WS_DISABLED)
 				rgb=GetSysColor(COLOR_3DFACE);
 			else rgb=GetSysColor(COLOR_WINDOW);
@@ -1461,14 +1462,14 @@
 				rgb,rgb,1);
 
-			if(pWindowInfo->pChildInfo[i].style&LBS_DISABLENOSCROLL)
-				DrawWindowScrollBar(WndNum,pWindowInfo->pChildInfo[i].style|WS_DISABLED,&pos,&size);
-		}
-
-		else if(pWindowInfo->pChildInfo[i].Control==CT_LISTVIEW){
+			if(pChildInfo->style&LBS_DISABLENOSCROLL)
+				DrawWindowScrollBar(WndNum,pChildInfo->style|WS_DISABLED,&pos,&size);
+		}
+
+		else if(pChildInfo->Control==CT_LISTVIEW){
 			//////////////////////////
 			// ListView コントロール
 
 			//内部
-			if(pWindowInfo->pChildInfo[i].style&WS_DISABLED)
+			if(pChildInfo->style&WS_DISABLED)
 				rgb=GetSysColor(COLOR_3DFACE);
 			else rgb=GetSysColor(COLOR_WINDOW);
@@ -1478,6 +1479,6 @@
 				rgb,rgb,1);
 
-			if((pWindowInfo->pChildInfo[i].style&LVS_REPORT)&&
-				(!((pWindowInfo->pChildInfo[i].style&LVS_LIST)==LVS_LIST))){
+			if((pChildInfo->style&LVS_REPORT)&&
+				(!((pChildInfo->style&LVS_LIST)==LVS_LIST))){
 				//レポート ビュー
 				size.cy=16;
@@ -1486,5 +1487,5 @@
 		}
 
-		else if(pWindowInfo->pChildInfo[i].Control==CT_PROGRESSBAR){
+		else if(pChildInfo->Control==CT_PROGRESSBAR){
 			/////////////////////////////
 			// ProgressBar コントロール
@@ -1496,6 +1497,6 @@
 			size.cy-=2;
 			rgb=GetSysColor(COLOR_ACTIVECAPTION);
-			if(pWindowInfo->pChildInfo[i].style&PBS_SMOOTH){
-				if(pWindowInfo->pChildInfo[i].style&PBS_VERTICAL){
+			if(pChildInfo->style&PBS_SMOOTH){
+				if(pChildInfo->style&PBS_VERTICAL){
 					pos.y+=(long)((double)size.cy*0.3);
 					DrawRectangleInClient(WndNum,
@@ -1512,5 +1513,5 @@
 			}
 			else{
-				if(pWindowInfo->pChildInfo[i].style&PBS_VERTICAL){
+				if(pChildInfo->style&PBS_VERTICAL){
 					pos.y+=(long)((double)size.cy*0.3);
 					i3=(size.cx*2)/3;
@@ -1536,9 +1537,9 @@
 		}
 
-		else if(pWindowInfo->pChildInfo[i].Control==CT_RADIOBUTTON){
+		else if(pChildInfo->Control==CT_RADIOBUTTON){
 			/////////////////////////////
 			// RadioButton コントロール
 
-			if(pWindowInfo->pChildInfo[i].style&BS_PUSHLIKE){
+			if(pChildInfo->style&BS_PUSHLIKE){
 				//ボタンの縁を描画
 				DrawButtonEdge(WndNum,&pos,&size);
@@ -1548,13 +1549,13 @@
 				size2.cx=12;
 				size2.cy=12;
-				if(pWindowInfo->pChildInfo[i].style&BS_LEFTTEXT)
+				if(pChildInfo->style&BS_LEFTTEXT)
 					pos2.x=pos.x+size.cx-size2.cx;
 				else pos2.x=pos.x+1;
-				if((pWindowInfo->pChildInfo[i].style&BS_VCENTER)==BS_VCENTER||
-					(pWindowInfo->pChildInfo[i].style&BS_VCENTER)==0)
+				if((pChildInfo->style&BS_VCENTER)==BS_VCENTER||
+					(pChildInfo->style&BS_VCENTER)==0)
 					pos2.y=pos.y+(size.cy/2)-(size2.cy/2);
-				else if(pWindowInfo->pChildInfo[i].style&BS_TOP)
+				else if(pChildInfo->style&BS_TOP)
 					pos2.y=pos.y+1;
-				else if(pWindowInfo->pChildInfo[i].style&BS_BOTTOM)
+				else if(pChildInfo->style&BS_BOTTOM)
 					pos2.y=pos.y+size.cy-size2.cy-1;
 
@@ -1581,5 +1582,5 @@
 					//内部
 					else if(rgb==RGB(255,255,255)){
-						if(pWindowInfo->pChildInfo[i].style&WS_DISABLED) rgb=GetSysColor(COLOR_3DFACE);
+						if(pChildInfo->style&WS_DISABLED) rgb=GetSysColor(COLOR_3DFACE);
 					}
 
@@ -1599,10 +1600,10 @@
 				GlobalFree(pByte2);
 
-				if(!(pWindowInfo->pChildInfo[i].style&BS_LEFTTEXT)) pos.x+=17;
+				if(!(pChildInfo->style&BS_LEFTTEXT)) pos.x+=17;
 				else pos.x++;
 				size.cx-=17;
 			}
 
-			if(!(pWindowInfo->pChildInfo[i].style&(BS_ICON|BS_BITMAP))){
+			if(!(pChildInfo->style&(BS_ICON|BS_BITMAP))){
 				//キャプション テキスト
 				rect.left=pos.x+1+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
@@ -1611,21 +1612,21 @@
 				rect.bottom=pos.y+size.cy-2+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
 
-				if(pWindowInfo->pChildInfo[i].style&BS_MULTILINE) i4=0;
+				if(pChildInfo->style&BS_MULTILINE) i4=0;
 				else i4=DT_SINGLELINE;
 
 				//ビットを考慮してBS_CENTERを最初に比較する
-				if((pWindowInfo->pChildInfo[i].style&BS_CENTER)==BS_CENTER) i2=DT_CENTER;
-				else if(pWindowInfo->pChildInfo[i].style&BS_LEFT) i2=DT_LEFT;
-				else if(pWindowInfo->pChildInfo[i].style&BS_RIGHT) i2=DT_RIGHT;
+				if((pChildInfo->style&BS_CENTER)==BS_CENTER) i2=DT_CENTER;
+				else if(pChildInfo->style&BS_LEFT) i2=DT_LEFT;
+				else if(pChildInfo->style&BS_RIGHT) i2=DT_RIGHT;
 				else i2=DT_LEFT;
 
 				//ビットを考慮してBS_VCENTERを最初に比較する
-				if((pWindowInfo->pChildInfo[i].style&BS_VCENTER)==BS_VCENTER) i3=DT_VCENTER;
-				else if(pWindowInfo->pChildInfo[i].style&BS_TOP) i3=DT_TOP;
-				else if(pWindowInfo->pChildInfo[i].style&BS_BOTTOM) i3=DT_BOTTOM;
+				if((pChildInfo->style&BS_VCENTER)==BS_VCENTER) i3=DT_VCENTER;
+				else if(pChildInfo->style&BS_TOP) i3=DT_TOP;
+				else if(pChildInfo->style&BS_BOTTOM) i3=DT_BOTTOM;
 				else i3=DT_VCENTER;
 
 				hOldFont=(HFONT)SelectObject(hdc,hFont);
-				if(pWindowInfo->pChildInfo[i].style&WS_DISABLED){
+				if(pChildInfo->style&WS_DISABLED){
 					SetTextColor(hdc,RGB(255,255,255));
 					rc2.left=rect.left+1;
@@ -1633,15 +1634,15 @@
 					rc2.right=rect.right+1;
 					rc2.bottom=rect.bottom+1;
-					DrawText(hdc,pWindowInfo->pChildInfo[i].caption,-1,&rc2,i4|i2|i3);
+					DrawText(hdc,pChildInfo->caption,-1,&rc2,i4|i2|i3);
 					SetTextColor(hdc,GetSysColor(COLOR_GRAYTEXT));
 				}
 				else SetTextColor(hdc,GetSysColor(COLOR_BTNTEXT));
 
-				DrawText(hdc,pWindowInfo->pChildInfo[i].caption,-1,&rect,i4|i2|i3);
+				DrawText(hdc,pChildInfo->caption,-1,&rect,i4|i2|i3);
 				SelectObject(hdc,hOldFont);
 			}
 		}
 
-		else if(pWindowInfo->pChildInfo[i].Control==CT_STATIC){
+		else if(pChildInfo->Control==CT_STATIC){
 			////////////////////////
 			// Static コントロール
@@ -1654,10 +1655,10 @@
 
 			//ビットを考慮してSS_LEFTを最後に検討する
-			if(pWindowInfo->pChildInfo[i].style&SS_CENTER) i2=DT_CENTER;
-			else if(pWindowInfo->pChildInfo[i].style&SS_RIGHT) i2=DT_RIGHT;
+			if(pChildInfo->style&SS_CENTER) i2=DT_CENTER;
+			else if(pChildInfo->style&SS_RIGHT) i2=DT_RIGHT;
 			else i2=DT_LEFT;
 
 			hOldFont=(HFONT)SelectObject(hdc,hFont);
-			if(pWindowInfo->pChildInfo[i].style&WS_DISABLED){
+			if(pChildInfo->style&WS_DISABLED){
 				SetTextColor(hdc,RGB(255,255,255));
 				rc2.left=rect.left+1;
@@ -1665,5 +1666,5 @@
 				rc2.right=rect.right+1;
 				rc2.bottom=rect.bottom+1;
-				DrawText(hdc,pWindowInfo->pChildInfo[i].caption,-1,&rc2,i2);
+				DrawText(hdc,pChildInfo->caption,-1,&rc2,i2);
 				SetTextColor(hdc,GetSysColor(COLOR_GRAYTEXT));
 			}
@@ -1672,17 +1673,17 @@
 
 			//折り返すかどうか
-			if(!(pWindowInfo->pChildInfo[i].style&SS_LEFTNOWORDWRAP)){
+			if(!(pChildInfo->style&SS_LEFTNOWORDWRAP)){
 				i2|=DT_WORDBREAK;
 			}
 
-			DrawText(hdc,pWindowInfo->pChildInfo[i].caption,-1,&rect,i2);
+			DrawText(hdc,pChildInfo->caption,-1,&rect,i2);
 			SelectObject(hdc,hOldFont);
 		}
 
-		else if(pWindowInfo->pChildInfo[i].Control==CT_TRACKBAR){
+		else if(pChildInfo->Control==CT_TRACKBAR){
 			//////////////////////////
 			// TrackBar コントロール
 
-			if(pWindowInfo->pChildInfo[i].style&TBS_VERT){
+			if(pChildInfo->style&TBS_VERT){
 				pos.x+=2;
 				size.cx-=2;
@@ -1718,10 +1719,10 @@
 		}
 
-		else if(pWindowInfo->pChildInfo[i].Control==CT_TREEVIEW){
+		else if(pChildInfo->Control==CT_TREEVIEW){
 			//////////////////////////
 			// TreeView コントロール
 
 			//内部
-			if(pWindowInfo->pChildInfo[i].style&WS_DISABLED)
+			if(pChildInfo->style&WS_DISABLED)
 				rgb=GetSysColor(COLOR_3DFACE);
 			else rgb=GetSysColor(COLOR_WINDOW);
@@ -1732,16 +1733,16 @@
 		}
 
-		else if(pWindowInfo->pChildInfo[i].Control==CT_UPDOWN){
+		else if(pChildInfo->Control==CT_UPDOWN){
 			///////////////////////////////
 			// アップ ダウン コントロール
-			if(pWindowInfo->pChildInfo[i].style&UDS_HORZ)
-				DrawUpDownControl(WndNum,pWindowInfo->pChildInfo[i].style,0,&pos,&size);
-			else DrawUpDownControl(WndNum,pWindowInfo->pChildInfo[i].style,1,&pos,&size);
-		}
-
-		else if(pWindowInfo->pChildInfo[i].Control==CT_VSCROLLBAR){
+			if(pChildInfo->style&UDS_HORZ)
+				DrawUpDownControl(WndNum,pChildInfo->style,0,&pos,&size);
+			else DrawUpDownControl(WndNum,pChildInfo->style,1,&pos,&size);
+		}
+
+		else if(pChildInfo->Control==CT_VSCROLLBAR){
 			////////////////////////////////////
 			// 垂直スクロールバー コントロール
-			DrawScrollBar(WndNum,pWindowInfo->pChildInfo[i].style,1,&pos,&size);
+			DrawScrollBar(WndNum,pChildInfo->style,1,&pos,&size);
 		}
 	}
