Index: trunk/ab5.0/abdev/abdev/RadProc.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/RadProc.cpp	(revision 615)
+++ trunk/ab5.0/abdev/abdev/RadProc.cpp	(revision 616)
@@ -163,17 +163,25 @@
 	int i,i2,NewItemNum;
 	char temporary[MAX_PATH];
-	CHILDINFO *pChildInfo;
 
 	WindowInfo *pWindowInfo = ProjectInfo.windowInfos[WndInfoNum];
 
-	pWindowInfo->pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,pWindowInfo->pChildInfo,(pWindowInfo->NumberOfChildWindows+1)*sizeof(WindowInfo));
+	CHILDINFO *pChildInfo = new CHILDINFO();
+
 	if(ItemNum==-1)
-		NewItemNum=pWindowInfo->NumberOfChildWindows;
-	else{
-		for(i=pWindowInfo->NumberOfChildWindows;i>ItemNum;i--)
-			pWindowInfo->pChildInfo[i]=pWindowInfo->pChildInfo[i-1];
+	{
+		NewItemNum = pWindowInfo->childWindowInfos.size();
+		pWindowInfo->childWindowInfos.push_back( pChildInfo );
+	}
+	else
+	{
+		std::vector<CHILDINFO *>::iterator it = pWindowInfo->childWindowInfos.begin();
+		for( int i=0; i<ItemNum; i++ )
+		{
+			it++;
+		}
+		pWindowInfo->childWindowInfos.insert( it, pChildInfo );
+
 		NewItemNum=ItemNum;
 	}
-	pChildInfo=&pWindowInfo->pChildInfo[NewItemNum];
 
 	//ID
@@ -197,7 +205,7 @@
 		else sprintf(temporary,"%s%d",IdName,i2);
 SearchStart:
-		for(i=0;i<pWindowInfo->NumberOfChildWindows;i++){
+		for(i=0;i<pWindowInfo->childWindowInfos.size();i++){
 			if(i!=NewItemNum){
-				if(lstrcmp(pWindowInfo->pChildInfo[i].IdName,temporary)==0){
+				if(lstrcmp(pWindowInfo->childWindowInfos[i]->IdName,temporary)==0){
 					i2++;
 					sprintf(temporary,"%s%d",IdName,i2);
@@ -254,6 +262,4 @@
 		Rad_NoticeChanging(WndNum,RAD_UNDO_INSERTITEM,NewItemNum,(DWORD)pChildInfo);
 
-	pWindowInfo->NumberOfChildWindows++;
-
 	DrawRadWindow(WndNum,pWindowInfo);
 	return NewItemNum;
@@ -268,27 +274,21 @@
 	//変更情報
 	if(bNoticeChanging)
-		Rad_NoticeChanging(WndNum,RAD_UNDO_DELETEITEM,ItemNum,(DWORD)&pWindowInfo->pChildInfo[ItemNum]);
+		Rad_NoticeChanging(WndNum,RAD_UNDO_DELETEITEM,ItemNum,(DWORD)pWindowInfo->childWindowInfos[ItemNum]);
 
 	//子ウィンドウのメモリを解放
-	HeapDefaultFree(pWindowInfo->pChildInfo[ItemNum].IdName);
-	HeapDefaultFree(pWindowInfo->pChildInfo[ItemNum].caption);
-	if(pWindowInfo->pChildInfo[ItemNum].Control==CT_IMAGEBOX){
+	HeapDefaultFree(pWindowInfo->childWindowInfos[ItemNum]->IdName);
+	HeapDefaultFree(pWindowInfo->childWindowInfos[ItemNum]->caption);
+	if(pWindowInfo->childWindowInfos[ItemNum]->Control==CT_IMAGEBOX){
 		//イメージ ボックスの場合
-		HeapDefaultFree(pWindowInfo->pChildInfo[ItemNum].ImageCtrlInfo.path);
-	}
-
-	pWindowInfo->NumberOfChildWindows--;
-	for(i=ItemNum;i<pWindowInfo->NumberOfChildWindows;i++)
+		HeapDefaultFree(pWindowInfo->childWindowInfos[ItemNum]->ImageCtrlInfo.path);
+	}
+	delete pWindowInfo->childWindowInfos[ItemNum];
+
+	std::vector<CHILDINFO *>::iterator it = pWindowInfo->childWindowInfos.begin();
+	for( int i=0; i<ItemNum; i++ )
 	{
-		pWindowInfo->pChildInfo[i]=pWindowInfo->pChildInfo[i+1];
-	}
-	if( pWindowInfo->NumberOfChildWindows == 0 )
-	{
-		pWindowInfo->pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,pWindowInfo->pChildInfo,1);
-	}
-	else
-	{
-		pWindowInfo->pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,pWindowInfo->pChildInfo,pWindowInfo->NumberOfChildWindows*sizeof(CHILDINFO));
-	}
+		it++;
+	}
+	pWindowInfo->childWindowInfos.erase( it );
 
 	DrawRadWindow(WndNum,pWindowInfo);
@@ -353,15 +353,16 @@
 	sw=0;
 	if(pobj_nv->bLineAdjust&&bLA){
-		for(i=0;i<pWindowInfo->NumberOfChildWindows;i++){
+		for(i=0;i<pWindowInfo->childWindowInfos.size();i++){
+			const CHILDINFO *pChildInfo = pWindowInfo->childWindowInfos[i];
 			if(i==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) continue;
-			if(pWindowInfo->pChildInfo[i].Control !=
-				pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control) continue;
+			if(pChildInfo->Control !=
+				pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->Control) continue;
 
 			if(NewRect->left<OldRect->left){
-				if(pWindowInfo->pChildInfo[i].pos.x
+				if(pChildInfo->pos.x
 											>
 					NewRect->left - MdiInfo[WndNum].MdiRadInfo->ClientPos.x
 					&&
-					pWindowInfo->pChildInfo[i].pos.x-10
+					pChildInfo->pos.x-10
 											<
 					NewRect->left - MdiInfo[WndNum].MdiRadInfo->ClientPos.x){
@@ -369,5 +370,5 @@
 					//左側をストップする
 					x=NewRect->right-NewRect->left;
-					NewRect->left=pWindowInfo->pChildInfo[i].pos.x + MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
+					NewRect->left=pChildInfo->pos.x + MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
 					NewRect->right=NewRect->left+x;
 
@@ -384,9 +385,9 @@
 			}
 			if(NewRect->top<OldRect->top){
-				if(pWindowInfo->pChildInfo[i].pos.y
+				if(pChildInfo->pos.y
 											>
 					NewRect->top - MdiInfo[WndNum].MdiRadInfo->ClientPos.y
 					&&
-					pWindowInfo->pChildInfo[i].pos.y-10
+					pChildInfo->pos.y-10
 											<
 					NewRect->top - MdiInfo[WndNum].MdiRadInfo->ClientPos.y){
@@ -394,5 +395,5 @@
 					//左側をストップする
 					y=NewRect->bottom-NewRect->top;
-					NewRect->top=pWindowInfo->pChildInfo[i].pos.y + MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
+					NewRect->top=pChildInfo->pos.y + MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
 					NewRect->bottom=NewRect->top+y;
 
@@ -460,8 +461,8 @@
 	else{
 		//子ウィンドウを選択
-		rect->left=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.x-LEVER_THICK;
-		rect->top=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.y-LEVER_THICK;
-		rect->right=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.x+pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].size.cx+LEVER_THICK;
-		rect->bottom=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.y+pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].size.cy+LEVER_THICK;
+		rect->left=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]]->pos.x-LEVER_THICK;
+		rect->top=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]]->pos.y-LEVER_THICK;
+		rect->right=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]]->pos.x+pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]]->size.cx+LEVER_THICK;
+		rect->bottom=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]]->pos.y+pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]]->size.cy+LEVER_THICK;
 	}
 }
@@ -561,35 +562,35 @@
 	}
 	else{
-		if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_BUTTON)
+		if(pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->Control==CT_BUTTON)
 			MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_BUTTON),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ButtonProc);
-		else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX)
+		else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->Control==CT_CHECKBOX)
 			MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_CHECKBOX),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_CheckBoxProc);
-		else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_COMBOBOX)
+		else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->Control==CT_COMBOBOX)
 			MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_COMBOBOX),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ComboBoxProc);
-		else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_EDIT)
+		else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->Control==CT_EDIT)
 			MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_EDIT),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_EditProc);
-		else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_GROUPBOX)
+		else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->Control==CT_GROUPBOX)
 			MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_GROUPBOX),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_GroupBoxProc);
-		else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_HSCROLLBAR)
+		else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->Control==CT_HSCROLLBAR)
 			MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_SCROLLBAR),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ScrollBarProc);
-		else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_IMAGEBOX)
+		else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->Control==CT_IMAGEBOX)
 			MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_IMAGEBOX),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ImageBoxProc);
-		else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTBOX)
+		else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->Control==CT_LISTBOX)
 			MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_LISTBOX),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ListBoxProc);
-		else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTVIEW)
+		else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->Control==CT_LISTVIEW)
 			MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_LISTVIEW),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ListViewProc);
-		else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_PROGRESSBAR)
+		else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->Control==CT_PROGRESSBAR)
 			MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_PROGRESSBAR),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ProgressBarProc);
-		else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON)
+		else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->Control==CT_RADIOBUTTON)
 			MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_RADIOBUTTON),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_RadioButtonProc);
-		else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC)
+		else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->Control==CT_STATIC)
 			MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_STATIC),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_StaticProc);
-		else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TRACKBAR)
+		else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->Control==CT_TRACKBAR)
 			MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_TRACKBAR),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_TrackBarProc);
-		else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TREEVIEW)
+		else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->Control==CT_TREEVIEW)
 			MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_TREEVIEW),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_TreeViewProc);
-		else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_UPDOWN)
+		else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->Control==CT_UPDOWN)
 			MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_UPDOWN),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_UpDownProc);
-		else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_VSCROLLBAR)
+		else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->Control==CT_VSCROLLBAR)
 			MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_SCROLLBAR),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ScrollBarProc);
 
@@ -609,28 +610,28 @@
 	WindowInfo *pWindowInfo = ProjectInfo.windowInfos[WndInfoNum];
 
-	for(i=pWindowInfo->NumberOfChildWindows-1;i>=0;i--){
-		if(pWindowInfo->pChildInfo[i].Control==CT_COMBOBOX&&
-			(pWindowInfo->pChildInfo[i].style&0x000F)!=CBS_SIMPLE){
+	for(i=pWindowInfo->childWindowInfos.size()-1;i>=0;i--){
+		if(pWindowInfo->childWindowInfos[i]->Control==CT_COMBOBOX&&
+			(pWindowInfo->childWindowInfos[i]->style&0x000F)!=CBS_SIMPLE){
 			//コンボ ボックスの場合は表示部分をターゲットに選択する（高さ20pixel）
-			if(x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x&&
-				x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x+pWindowInfo->pChildInfo[i].size.cx&&
-				y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y&&
-				y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y+20){
+			if(x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x&&
+				x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x+pWindowInfo->childWindowInfos[i]->size.cx&&
+				y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y&&
+				y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y+20){
 				break;
 			}
 		}
-		else if(pWindowInfo->pChildInfo[i].Control==CT_GROUPBOX){
+		else if(pWindowInfo->childWindowInfos[i]->Control==CT_GROUPBOX){
 			//グループ ボックスの場合は中央をあける
 			if((
-				x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x&&
-				x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x+pWindowInfo->pChildInfo[i].size.cx&&
-				y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y&&
-				y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y+pWindowInfo->pChildInfo[i].size.cy
+				x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x&&
+				x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x+pWindowInfo->childWindowInfos[i]->size.cx&&
+				y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y&&
+				y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y+pWindowInfo->childWindowInfos[i]->size.cy
 				)&&
 				(!(
-				x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x+LEVER_THICK*2&&
-				x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x+pWindowInfo->pChildInfo[i].size.cx-LEVER_THICK*2&&
-				y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y+LEVER_THICK*3&&
-				y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y+pWindowInfo->pChildInfo[i].size.cy-LEVER_THICK*2
+				x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x+LEVER_THICK*2&&
+				x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x+pWindowInfo->childWindowInfos[i]->size.cx-LEVER_THICK*2&&
+				y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y+LEVER_THICK*3&&
+				y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y+pWindowInfo->childWindowInfos[i]->size.cy-LEVER_THICK*2
 				))
 				){
@@ -638,8 +639,8 @@
 			}
 		}
-		else if(x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x&&
-			x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x+pWindowInfo->pChildInfo[i].size.cx&&
-			y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y&&
-			y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y+pWindowInfo->pChildInfo[i].size.cy){
+		else if(x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x&&
+			x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x+pWindowInfo->childWindowInfos[i]->size.cx&&
+			y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y&&
+			y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y+pWindowInfo->childWindowInfos[i]->size.cy){
 			break;
 		}
@@ -682,9 +683,9 @@
 	if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW) sw=0;
 	else sw=1;
-	for(i=pWindowInfo->NumberOfChildWindows-1,i2=0;i>=0;i--){
-		if(rect.left <= pWindowInfo->pChildInfo[i].pos.x+MdiInfo[WndNum].MdiRadInfo->ClientPos.x&&
-			rect.top <= pWindowInfo->pChildInfo[i].pos.y+MdiInfo[WndNum].MdiRadInfo->ClientPos.y&&
-			rect.right >= pWindowInfo->pChildInfo[i].pos.x+pWindowInfo->pChildInfo[i].size.cx+MdiInfo[WndNum].MdiRadInfo->ClientPos.x&&
-			rect.bottom >= pWindowInfo->pChildInfo[i].pos.y+pWindowInfo->pChildInfo[i].size.cy+MdiInfo[WndNum].MdiRadInfo->ClientPos.y){
+	for(i=pWindowInfo->childWindowInfos.size()-1,i2=0;i>=0;i--){
+		if(rect.left <= pWindowInfo->childWindowInfos[i]->pos.x+MdiInfo[WndNum].MdiRadInfo->ClientPos.x&&
+			rect.top <= pWindowInfo->childWindowInfos[i]->pos.y+MdiInfo[WndNum].MdiRadInfo->ClientPos.y&&
+			rect.right >= pWindowInfo->childWindowInfos[i]->pos.x+pWindowInfo->childWindowInfos[i]->size.cx+MdiInfo[WndNum].MdiRadInfo->ClientPos.x&&
+			rect.bottom >= pWindowInfo->childWindowInfos[i]->pos.y+pWindowInfo->childWindowInfos[i]->size.cy+MdiInfo[WndNum].MdiRadInfo->ClientPos.y){
 			MdiInfo[WndNum].MdiRadInfo->SelectingItem[i2]=i;
 			i2++;
@@ -710,5 +711,5 @@
 			if(x>=rect.left+LEVER_THICK&&x<=rect.right-LEVER_THICK&&
 				y>=rect.top+LEVER_THICK&&y<=rect.bottom-LEVER_THICK){
-				if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[i]].Control==CT_GROUPBOX){
+					if(pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[i]]->Control==CT_GROUPBOX){
 					//グループボックスの場合は中央をあける
 					if(!(x>=rect.left+LEVER_THICK*2&&x<=rect.right-LEVER_THICK*2&&
@@ -728,5 +729,5 @@
 			if(x>=rect.left+LEVER_THICK&&x<=rect.right-LEVER_THICK&&
 				y>=rect.top+LEVER_THICK&&y<=rect.bottom-LEVER_THICK){
-				if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_GROUPBOX){
+				if(pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->Control==CT_GROUPBOX){
 					//グループ ボックスの場合は中央をあける
 					if(!(x>=rect.left+LEVER_THICK*3&&x<=rect.right-LEVER_THICK*3&&
@@ -855,8 +856,8 @@
 								i3=0;
 								while(MdiInfo[i].MdiRadInfo->SelectingItem[i3]!=-1){
-									RadInfo.DraggingRect[i3].left=MdiInfo[i].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x;
-									RadInfo.DraggingRect[i3].top=MdiInfo[i].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y;
-									RadInfo.DraggingRect[i3].right=MdiInfo[i].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x+pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cx;
-									RadInfo.DraggingRect[i3].bottom=MdiInfo[i].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y+pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cy;
+									RadInfo.DraggingRect[i3].left=MdiInfo[i].MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->pos.x;
+									RadInfo.DraggingRect[i3].top=MdiInfo[i].MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->pos.y;
+									RadInfo.DraggingRect[i3].right=MdiInfo[i].MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->pos.x+pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->size.cx;
+									RadInfo.DraggingRect[i3].bottom=MdiInfo[i].MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->pos.y+pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->size.cy;
 									RadInfo.DragStartRect[i3]=RadInfo.DraggingRect[i3];
 									i3++;
@@ -930,11 +931,11 @@
 							while(MdiInfo[i].MdiRadInfo->SelectingItem[i3]!=-1){
 								//アイテム枠の調整完了
-								PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
-								PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
+								PointAndSize.pos=pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->pos;
+								PointAndSize.size=pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->size;
 								Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
-								pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x=RadInfo.DraggingRect[i3].left-MdiInfo[i].MdiRadInfo->ClientPos.x;
-								pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y=RadInfo.DraggingRect[i3].top-MdiInfo[i].MdiRadInfo->ClientPos.y;
-								pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cx=RadInfo.DraggingRect[i3].right-RadInfo.DraggingRect[i3].left;
-								pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cy=RadInfo.DraggingRect[i3].bottom-RadInfo.DraggingRect[i3].top;
+								pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->pos.x=RadInfo.DraggingRect[i3].left-MdiInfo[i].MdiRadInfo->ClientPos.x;
+								pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->pos.y=RadInfo.DraggingRect[i3].top-MdiInfo[i].MdiRadInfo->ClientPos.y;
+								pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->size.cx=RadInfo.DraggingRect[i3].right-RadInfo.DraggingRect[i3].left;
+								pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->size.cy=RadInfo.DraggingRect[i3].bottom-RadInfo.DraggingRect[i3].top;
 								DrawRadWindow(i,pWindowInfo);
 								i3++;
@@ -1444,17 +1445,17 @@
 					if(MdiInfo[i].MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW){
 						temp2[0]=0;
-						if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_BUTTON||
-							pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX||
-							pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_IMAGEBOX||
-							pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON||
-							pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC){
-							sprintf(temporary,"%s_%s_Click",pWindowInfo->name,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
-						}
-						else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_COMBOBOX)
-							sprintf(temporary,"%s_%s_EditChange",pWindowInfo->name,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
-						else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_EDIT)
-							sprintf(temporary,"%s_%s_Change",pWindowInfo->name,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
-						else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_LISTBOX)
-							sprintf(temporary,"%s_%s_SelChange",pWindowInfo->name,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
+						if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_BUTTON||
+							pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_CHECKBOX||
+							pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_IMAGEBOX||
+							pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_RADIOBUTTON||
+							pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_STATIC){
+							sprintf(temporary,"%s_%s_Click",pWindowInfo->name,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
+						}
+						else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_COMBOBOX)
+							sprintf(temporary,"%s_%s_EditChange",pWindowInfo->name,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
+						else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_EDIT)
+							sprintf(temporary,"%s_%s_Change",pWindowInfo->name,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
+						else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_LISTBOX)
+							sprintf(temporary,"%s_%s_SelChange",pWindowInfo->name,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
 						else temporary[0]=0;
 						if(temporary[0]) SelectProcedureOfMessageCall(i2,temporary,temp2);
@@ -1496,19 +1497,19 @@
 					}
 					else{
-						PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos;
-						PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size;
+						PointAndSize.pos=pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->pos;
+						PointAndSize.size=pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->size;
 						if(wParam==VK_RIGHT){
 							if(GetKeyState(VK_SHIFT)&0x8000){
 								Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
-								pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx++;
+								pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->size.cx++;
 							}
 							else{
 								for(i3=0;;i3++){
 									if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break;
-									PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
-									PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
+									PointAndSize.pos=pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->pos;
+									PointAndSize.size=pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->size;
 									Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
 
-									pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x++;
+									pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->pos.x++;
 								}
 							}
@@ -1522,14 +1523,14 @@
 							if(GetKeyState(VK_SHIFT)&0x8000){
 								Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
-								pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx--;
+								pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->size.cx--;
 							}
 							else{
 								for(i3=0;;i3++){
 									if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break;
-									PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
-									PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
+									PointAndSize.pos=pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->pos;
+									PointAndSize.size=pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->size;
 									Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
 
-									pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x--;
+									pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->pos.x--;
 								}
 							}
@@ -1543,14 +1544,14 @@
 							if(GetKeyState(VK_SHIFT)&0x8000){
 								Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
-								pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cy--;
+								pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->size.cy--;
 							}
 							else{
 								for(i3=0;;i3++){
 									if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break;
-									PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
-									PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
+									PointAndSize.pos=pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->pos;
+									PointAndSize.size=pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->size;
 									Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
 
-									pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y--;
+									pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->pos.y--;
 								}
 							}
@@ -1564,14 +1565,14 @@
 							if(GetKeyState(VK_SHIFT)&0x8000){
 								Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
-								pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cy++;
+								pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->size.cy++;
 							}
 							else{
 								for(i3=0;;i3++){
 									if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break;
-									PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
-									PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
+									PointAndSize.pos=pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->pos;
+									PointAndSize.size=pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->size;
 									Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
 
-									pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y++;
+									pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->pos.y++;
 								}
 							}
