Index: trunk/ab5.0/abdev/abdev/RadProc.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/RadProc.cpp	(revision 481)
+++ trunk/ab5.0/abdev/abdev/RadProc.cpp	(revision 609)
@@ -13,7 +13,5 @@
 	RECT rect;
 	MDICREATESTRUCT mdic;
-	WINDOW_INFO *pWindowInfo;
-
-	pWindowInfo=&ProjectInfo.pWindowInfo[WndInfoNum];
+	WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
 
 	//すでに指定されたファイルが開かれている場合
@@ -169,13 +167,15 @@
 	CHILDINFO *pChildInfo;
 
-	ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo,(ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows+1)*sizeof(WINDOW_INFO));
+	WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
+
+	pWindowInfo->pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,pWindowInfo->pChildInfo,(pWindowInfo->NumberOfChildWindows+1)*sizeof(WINDOW_INFO));
 	if(ItemNum==-1)
-		NewItemNum=ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows;
+		NewItemNum=pWindowInfo->NumberOfChildWindows;
 	else{
-		for(i=ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows;i>ItemNum;i--)
-			ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i]=ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i-1];
+		for(i=pWindowInfo->NumberOfChildWindows;i>ItemNum;i--)
+			pWindowInfo->pChildInfo[i]=pWindowInfo->pChildInfo[i-1];
 		NewItemNum=ItemNum;
 	}
-	pChildInfo=&ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[NewItemNum];
+	pChildInfo=&pWindowInfo->pChildInfo[NewItemNum];
 
 	//ID
@@ -199,7 +199,7 @@
 		else sprintf(temporary,"%s%d",IdName,i2);
 SearchStart:
-		for(i=0;i<ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows;i++){
+		for(i=0;i<pWindowInfo->NumberOfChildWindows;i++){
 			if(i!=NewItemNum){
-				if(lstrcmp(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].IdName,temporary)==0){
+				if(lstrcmp(pWindowInfo->pChildInfo[i].IdName,temporary)==0){
 					i2++;
 					sprintf(temporary,"%s%d",IdName,i2);
@@ -256,7 +256,7 @@
 		Rad_NoticeChanging(WndNum,RAD_UNDO_INSERTITEM,NewItemNum,(DWORD)pChildInfo);
 
-	ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows++;
-
-	DrawRadWindow(WndNum,&ProjectInfo.pWindowInfo[WndInfoNum]);
+	pWindowInfo->NumberOfChildWindows++;
+
+	DrawRadWindow(WndNum,pWindowInfo);
 	return NewItemNum;
 }
@@ -267,23 +267,25 @@
 	int i;
 
+	WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
+
 	//変更情報
 	if(bNoticeChanging)
-		Rad_NoticeChanging(WndNum,RAD_UNDO_DELETEITEM,ItemNum,(DWORD)&ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[ItemNum]);
+		Rad_NoticeChanging(WndNum,RAD_UNDO_DELETEITEM,ItemNum,(DWORD)&pWindowInfo->pChildInfo[ItemNum]);
 
 	//子ウィンドウのメモリを解放
-	HeapDefaultFree(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[ItemNum].IdName);
-	HeapDefaultFree(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[ItemNum].caption);
-	if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[ItemNum].Control==CT_IMAGEBOX){
+	HeapDefaultFree(pWindowInfo->pChildInfo[ItemNum].IdName);
+	HeapDefaultFree(pWindowInfo->pChildInfo[ItemNum].caption);
+	if(pWindowInfo->pChildInfo[ItemNum].Control==CT_IMAGEBOX){
 		//イメージ ボックスの場合
-		HeapDefaultFree(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[ItemNum].ImageCtrlInfo.path);
-	}
-
-	ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows--;
-	for(i=ItemNum;i<ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows;i++)
-		ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i]=ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i+1];
-	if(ProjectInfo.NumberOfWindows==0) ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo,1);
-	else ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo,ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows*sizeof(CHILDINFO));
-
-	DrawRadWindow(WndNum,&ProjectInfo.pWindowInfo[WndInfoNum]);
+		HeapDefaultFree(pWindowInfo->pChildInfo[ItemNum].ImageCtrlInfo.path);
+	}
+
+	pWindowInfo->NumberOfChildWindows--;
+	for(i=ItemNum;i<pWindowInfo->NumberOfChildWindows;i++)
+		pWindowInfo->pChildInfo[i]=pWindowInfo->pChildInfo[i+1];
+	if(ProjectInfo.windowInfos.size()==0) pWindowInfo->pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,pWindowInfo->pChildInfo,1);
+	else pWindowInfo->pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,pWindowInfo->pChildInfo,pWindowInfo->NumberOfChildWindows*sizeof(CHILDINFO));
+
+	DrawRadWindow(WndNum,pWindowInfo);
 
 
@@ -341,19 +343,21 @@
 	RECT rect;
 
+	WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
+
 	hdc=GetDC(hwnd);
 
 	sw=0;
 	if(pobj_nv->bLineAdjust&&bLA){
-		for(i=0;i<ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows;i++){
+		for(i=0;i<pWindowInfo->NumberOfChildWindows;i++){
 			if(i==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) continue;
-			if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].Control !=
-				ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control) continue;
+			if(pWindowInfo->pChildInfo[i].Control !=
+				pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control) continue;
 
 			if(NewRect->left<OldRect->left){
-				if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x
+				if(pWindowInfo->pChildInfo[i].pos.x
 											>
 					NewRect->left - MdiInfo[WndNum].MdiRadInfo->ClientPos.x
 					&&
-					ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x-10
+					pWindowInfo->pChildInfo[i].pos.x-10
 											<
 					NewRect->left - MdiInfo[WndNum].MdiRadInfo->ClientPos.x){
@@ -361,5 +365,5 @@
 					//左側をストップする
 					x=NewRect->right-NewRect->left;
-					NewRect->left=ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x + MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
+					NewRect->left=pWindowInfo->pChildInfo[i].pos.x + MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
 					NewRect->right=NewRect->left+x;
 
@@ -376,9 +380,9 @@
 			}
 			if(NewRect->top<OldRect->top){
-				if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y
+				if(pWindowInfo->pChildInfo[i].pos.y
 											>
 					NewRect->top - MdiInfo[WndNum].MdiRadInfo->ClientPos.y
 					&&
-					ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y-10
+					pWindowInfo->pChildInfo[i].pos.y-10
 											<
 					NewRect->top - MdiInfo[WndNum].MdiRadInfo->ClientPos.y){
@@ -386,5 +390,5 @@
 					//左側をストップする
 					y=NewRect->bottom-NewRect->top;
-					NewRect->top=ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y + MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
+					NewRect->top=pWindowInfo->pChildInfo[i].pos.y + MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
 					NewRect->bottom=NewRect->top+y;
 
@@ -441,17 +445,20 @@
 	extern MDIINFO MdiInfo[MAX_WNDNUM];
 	extern PROJECTINFO ProjectInfo;
+
+	WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
+
 	if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]==SELECT_WINDOW){
 		//ウィンドウ軸を選択
 		rect->left=0;
 		rect->top=0;
-		rect->right=ProjectInfo.pWindowInfo[WndInfoNum].size.cx+(LEVER_THICK*2);
-		rect->bottom=ProjectInfo.pWindowInfo[WndInfoNum].size.cy+(LEVER_THICK*2);
+		rect->right=pWindowInfo->size.cx+(LEVER_THICK*2);
+		rect->bottom=pWindowInfo->size.cy+(LEVER_THICK*2);
 	}
 	else{
 		//子ウィンドウを選択
-		rect->left=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.x-LEVER_THICK;
-		rect->top=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.y-LEVER_THICK;
-		rect->right=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].size.cx+LEVER_THICK;
-		rect->bottom=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].size.cy+LEVER_THICK;
+		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;
 	}
 }
@@ -538,4 +545,6 @@
 	SCROLLINFO ScrollInfo;
 
+	WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
+
 	DestroyWindow(MdiInfo[WndNum].MdiRadInfo->hProp_Dlg);
 	if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
@@ -551,35 +560,35 @@
 	}
 	else{
-		if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_BUTTON)
+		if(pWindowInfo->pChildInfo[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(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX)
+		else if(pWindowInfo->pChildInfo[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(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_COMBOBOX)
+		else if(pWindowInfo->pChildInfo[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(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_EDIT)
+		else if(pWindowInfo->pChildInfo[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(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_GROUPBOX)
+		else if(pWindowInfo->pChildInfo[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(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_HSCROLLBAR)
+		else if(pWindowInfo->pChildInfo[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(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_IMAGEBOX)
+		else if(pWindowInfo->pChildInfo[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(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTBOX)
+		else if(pWindowInfo->pChildInfo[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(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTVIEW)
+		else if(pWindowInfo->pChildInfo[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(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_PROGRESSBAR)
+		else if(pWindowInfo->pChildInfo[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(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON)
+		else if(pWindowInfo->pChildInfo[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(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC)
+		else if(pWindowInfo->pChildInfo[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(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TRACKBAR)
+		else if(pWindowInfo->pChildInfo[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(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TREEVIEW)
+		else if(pWindowInfo->pChildInfo[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(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_UPDOWN)
+		else if(pWindowInfo->pChildInfo[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(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_VSCROLLBAR)
+		else if(pWindowInfo->pChildInfo[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);
 
@@ -598,28 +607,30 @@
 	int i;
 
-	for(i=ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows-1;i>=0;i--){
-		if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].Control==CT_COMBOBOX&&
-			(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].style&0x000F)!=CBS_SIMPLE){
+	WINDOW_INFO *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){
 			//コンボ ボックスの場合は表示部分をターゲットに選択する（高さ20pixel）
-			if(x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x&&
-				x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cx&&
-				y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y&&
-				y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y+20){
+			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){
 				break;
 			}
 		}
-		else if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].Control==CT_GROUPBOX){
+		else if(pWindowInfo->pChildInfo[i].Control==CT_GROUPBOX){
 			//グループ ボックスの場合は中央をあける
 			if((
-				x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x&&
-				x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cx&&
-				y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y&&
-				y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cy
+				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+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x+LEVER_THICK*2&&
-				x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cx-LEVER_THICK*2&&
-				y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y+LEVER_THICK*3&&
-				y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cy-LEVER_THICK*2
+				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
 				))
 				){
@@ -627,8 +638,8 @@
 			}
 		}
-		else if(x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x&&
-			x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cx&&
-			y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y&&
-			y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cy){
+		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){
 			break;
 		}
@@ -667,13 +678,15 @@
 	RECT rect;
 
+	WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
+
 	for(i=1;i<MAX_RAD_SELITEM;i++) MdiInfo[WndNum].MdiRadInfo->SelectingItem[i]=-1;
 	RectNaturalFormat(pRect,&rect);
 	if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW) sw=0;
 	else sw=1;
-	for(i=ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows-1,i2=0;i>=0;i--){
-		if(rect.left <= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x+MdiInfo[WndNum].MdiRadInfo->ClientPos.x&&
-			rect.top <= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y+MdiInfo[WndNum].MdiRadInfo->ClientPos.y&&
-			rect.right >= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cx+MdiInfo[WndNum].MdiRadInfo->ClientPos.x&&
-			rect.bottom >= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cy+MdiInfo[WndNum].MdiRadInfo->ClientPos.y){
+	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){
 			MdiInfo[WndNum].MdiRadInfo->SelectingItem[i2]=i;
 			i2++;
@@ -691,4 +704,6 @@
 	RECT rect;
 
+	WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
+
 	if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[1]!=-1){
 		i=0;
@@ -698,5 +713,5 @@
 			if(x>=rect.left+LEVER_THICK&&x<=rect.right-LEVER_THICK&&
 				y>=rect.top+LEVER_THICK&&y<=rect.bottom-LEVER_THICK){
-				if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[i]].Control==CT_GROUPBOX){
+				if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[i]].Control==CT_GROUPBOX){
 					//グループボックスの場合は中央をあける
 					if(!(x>=rect.left+LEVER_THICK*2&&x<=rect.right-LEVER_THICK*2&&
@@ -716,5 +731,5 @@
 			if(x>=rect.left+LEVER_THICK&&x<=rect.right-LEVER_THICK&&
 				y>=rect.top+LEVER_THICK&&y<=rect.bottom-LEVER_THICK){
-				if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_GROUPBOX){
+				if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_GROUPBOX){
 					//グループ ボックスの場合は中央をあける
 					if(!(x>=rect.left+LEVER_THICK*3&&x<=rect.right-LEVER_THICK*3&&
@@ -748,13 +763,12 @@
 	extern PROJECTINFO ProjectInfo;
 	extern MDIINFO MdiInfo[MAX_WNDNUM];
-	int WndInfoNum;
 	SCROLLINFO ScrollInfo;
 	SIZE NeedSize;
 
-	WndInfoNum=GetWndInfoNum(MdiInfo[WndNum].path);
+	WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path);
 
 	//必要な幅、高さを共に100ピクセル余裕を持たせる
-	NeedSize.cx=ProjectInfo.pWindowInfo[WndInfoNum].size.cx+(LEVER_THICK*2)+100;
-	NeedSize.cy=ProjectInfo.pWindowInfo[WndInfoNum].size.cy+(LEVER_THICK*2)+100;
+	NeedSize.cx=pWindowInfo->size.cx+(LEVER_THICK*2)+100;
+	NeedSize.cy=pWindowInfo->size.cy+(LEVER_THICK*2)+100;
 
 	ScrollInfo.cbSize=sizeof(SCROLLINFO);
@@ -798,457 +812,463 @@
 	switch(message){
 		case WM_LBUTTONDOWN:
-			SetCapture(hwnd);
-
-			SetFocus(hwnd);
-			mouse.x=LOWORD(lParam);
-			mouse.y=HIWORD(lParam);
-			CursorPos_LocalToGlobal(hwnd,&mouse.x,&mouse.y);
-
-			i=GetWndNum(GetParent(hwnd));
-			i2=GetWndInfoNum(MdiInfo[i].path);
-
-			if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
-				if(((wParam&MK_CONTROL)||(wParam&MK_SHIFT))&&
-					MdiInfo[i].MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW){
-
-					//Shiftキー、Ctrlキーによる複数選択
-					for(i3=0;;i3++){
-						if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1){
-							MdiInfo[i].MdiRadInfo->SelectingItem[i3]=GetItemNumOnMouse(i,i2,mouse.x,mouse.y);
+			{
+				SetCapture(hwnd);
+
+				SetFocus(hwnd);
+				mouse.x=LOWORD(lParam);
+				mouse.y=HIWORD(lParam);
+				CursorPos_LocalToGlobal(hwnd,&mouse.x,&mouse.y);
+
+				i=GetWndNum(GetParent(hwnd));
+				i2 = GetWndInfoNum(MdiInfo[i].path);
+				WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
+
+				if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
+					if(((wParam&MK_CONTROL)||(wParam&MK_SHIFT))&&
+						MdiInfo[i].MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW){
+
+						//Shiftキー、Ctrlキーによる複数選択
+						for(i3=0;;i3++){
+							if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1){
+								MdiInfo[i].MdiRadInfo->SelectingItem[i3]=GetItemNumOnMouse(i,i2,mouse.x,mouse.y);
+								InvalidateRect(hwnd,NULL,0);
+
+								//サポートダイアログの内容をセット
+								SetSupportDlgData(i,i2);
+								break;
+							}
+						}
+					}
+					else{
+						RadInfo.NowDragging=GetStateOfDraggingFrame(i,i2,mouse.x,mouse.y);
+						if(!RadInfo.NowDragging){
+							SelectItemNumOnMouse(i,i2,mouse.x,mouse.y);
 							InvalidateRect(hwnd,NULL,0);
-
-							//サポートダイアログの内容をセット
-							SetSupportDlgData(i,i2);
-							break;
-						}
-					}
+							RadInfo.NowDragging=GetStateOfDraggingFrame(i,i2,mouse.x,mouse.y);
+						}
+						if(RadInfo.NowDragging){
+							//アイテム選択中。サイズ、位置変更開始
+
+							if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
+								RadInfo.DraggingRect[0].left=LEVER_THICK;
+								RadInfo.DraggingRect[0].top=LEVER_THICK;
+								RadInfo.DraggingRect[0].right=pWindowInfo->size.cx+LEVER_THICK;
+								RadInfo.DraggingRect[0].bottom=pWindowInfo->size.cy+LEVER_THICK;
+								RadInfo.DragStartRect[0]=RadInfo.DraggingRect[0];
+							}
+							else{
+								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.DragStartRect[i3]=RadInfo.DraggingRect[i3];
+									i3++;
+								}
+							}
+						}
+						else{
+							//範囲選択
+
+							RadInfo.NowDragging=SELECTING_FRAME;
+							RadInfo.OldDraggingRect[0].left=LEVER_THICK;
+							RadInfo.OldDraggingRect[0].top=LEVER_THICK;
+							RadInfo.OldDraggingRect[0].right=pWindowInfo->size.cx+LEVER_THICK;
+							RadInfo.OldDraggingRect[0].bottom=pWindowInfo->size.cy+LEVER_THICK;
+						}
+						RadInfo.DragStartPos.x=mouse.x;
+						RadInfo.DragStartPos.y=mouse.y;
+					}
+					SetCursorByState(RadInfo.NowDragging);
 				}
 				else{
-					RadInfo.NowDragging=GetStateOfDraggingFrame(i,i2,mouse.x,mouse.y);
-					if(!RadInfo.NowDragging){
-						SelectItemNumOnMouse(i,i2,mouse.x,mouse.y);
-						InvalidateRect(hwnd,NULL,0);
-						RadInfo.NowDragging=GetStateOfDraggingFrame(i,i2,mouse.x,mouse.y);
-					}
+					RadInfo.DraggingRect[0].left=mouse.x;
+					RadInfo.DraggingRect[0].top=mouse.y;
+					RadInfo.NowDragging=ITEM_MAKING;
+				}
+				return 0;
+			}
+		case WM_LBUTTONUP:
+			{
+				ReleaseCapture();
+
+				SetFocus(hwnd);
+				mouse.x=(int)(short)LOWORD(lParam);
+				mouse.y=(int)(short)HIWORD(lParam);
+				CursorPos_LocalToGlobal(hwnd,&mouse.x,&mouse.y);
+
+				hParent=GetParent(hwnd);
+				i=GetWndNum(hParent);
+				i2 = GetWndInfoNum(MdiInfo[i].path);
+				WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
+
+				if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
 					if(RadInfo.NowDragging){
-						//アイテム選択中。サイズ、位置変更開始
+						if(RadInfo.DragStartPos.x==mouse.x&&RadInfo.DragStartPos.y==mouse.y){
+							RadInfo.NowDragging=0;
+							InvalidateRect(hwnd,NULL,0);
+							ResetState_EditMenu();
+							return 0;
+						}
 
 						if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
-							RadInfo.DraggingRect[0].left=LEVER_THICK;
-							RadInfo.DraggingRect[0].top=LEVER_THICK;
-							RadInfo.DraggingRect[0].right=ProjectInfo.pWindowInfo[i2].size.cx+LEVER_THICK;
-							RadInfo.DraggingRect[0].bottom=ProjectInfo.pWindowInfo[i2].size.cy+LEVER_THICK;
-							RadInfo.DragStartRect[0]=RadInfo.DraggingRect[0];
+							if(RadInfo.NowDragging==SELECTING_FRAME){
+								SetItemNumOnFrame(i,i2,&RadInfo.DraggingRect[0]);
+								InvalidateRect(hwnd,NULL,1);
+							}
+							else{
+								//ウィンドウ枠の調整完了
+								PointAndSize.size=pWindowInfo->size;
+								Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
+								pWindowInfo->size.cx=RadInfo.DraggingRect[0].right-LEVER_THICK;
+								pWindowInfo->size.cy=RadInfo.DraggingRect[0].bottom-LEVER_THICK;
+								DrawRadWindow(i,pWindowInfo);
+								InvalidateRect(hwnd,NULL,1);
+
+								GetClientRect(hwnd,&rect);
+								ResetScrollbarOfRadEditor(i,rect.right,rect.bottom);
+							}
 						}
 						else{
 							i3=0;
 							while(MdiInfo[i].MdiRadInfo->SelectingItem[i3]!=-1){
-								RadInfo.DraggingRect[i3].left=MdiInfo[i].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x;
-								RadInfo.DraggingRect[i3].top=MdiInfo[i].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y;
-								RadInfo.DraggingRect[i3].right=MdiInfo[i].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x+ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cx;
-								RadInfo.DraggingRect[i3].bottom=MdiInfo[i].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y+ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cy;
-								RadInfo.DragStartRect[i3]=RadInfo.DraggingRect[i3];
+								//アイテム枠の調整完了
+								PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
+								PointAndSize.size=pWindowInfo->pChildInfo[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;
+								DrawRadWindow(i,pWindowInfo);
 								i3++;
 							}
 						}
-					}
-					else{
-						//範囲選択
-
-						RadInfo.NowDragging=SELECTING_FRAME;
-						RadInfo.OldDraggingRect[0].left=LEVER_THICK;
-						RadInfo.OldDraggingRect[0].top=LEVER_THICK;
-						RadInfo.OldDraggingRect[0].right=ProjectInfo.pWindowInfo[i2].size.cx+LEVER_THICK;
-						RadInfo.OldDraggingRect[0].bottom=ProjectInfo.pWindowInfo[i2].size.cy+LEVER_THICK;
-					}
-					RadInfo.DragStartPos.x=mouse.x;
-					RadInfo.DragStartPos.y=mouse.y;
+
+						SetStatusText(NULL);
+
+						//サポートダイアログの内容をセット
+						SetSupportDlgData(i,i2);
+					}
 				}
-				SetCursorByState(RadInfo.NowDragging);
+				else if(RadInfo.NowDragging==ITEM_MAKING){
+					if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_BUTTON){
+						//ボタン コントロール作成
+						if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
+							RadInfo.DraggingRect[0].left-=44;
+							RadInfo.DraggingRect[0].right=mouse.x+44;
+							RadInfo.DraggingRect[0].top-=10;
+							RadInfo.DraggingRect[0].bottom=mouse.y+11;
+						}
+						else{
+							RadInfo.DraggingRect[0].right=mouse.x;
+							RadInfo.DraggingRect[0].bottom=mouse.y;
+						}
+						RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
+						pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
+						pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
+						size.cx=rect.right-rect.left;
+						size.cy=rect.bottom-rect.top;
+						MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"CommandButton","Button",WS_CHILD|WS_VISIBLE,0,CT_BUTTON,0,0,1);
+					}
+					if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_CHECKBOX){
+						//チェック ボックス作成
+						if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
+							RadInfo.DraggingRect[0].left-=33;
+							RadInfo.DraggingRect[0].right=mouse.x+34;
+							RadInfo.DraggingRect[0].top-=7;
+							RadInfo.DraggingRect[0].bottom=mouse.y+8;
+						}
+						else{
+							RadInfo.DraggingRect[0].right=mouse.x;
+							RadInfo.DraggingRect[0].bottom=mouse.y;
+						}
+						RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
+						pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
+						pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
+						size.cx=rect.right-rect.left;
+						size.cy=rect.bottom-rect.top;
+						MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"CheckBox","Check",WS_CHILD|WS_VISIBLE|BS_AUTOCHECKBOX,0,CT_CHECKBOX,0,0,1);
+					}
+					if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_COMBOBOX){
+						//コンボ ボックス作成
+						if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
+							RadInfo.DraggingRect[0].left-=42;
+							RadInfo.DraggingRect[0].right=mouse.x+42;
+							RadInfo.DraggingRect[0].top-=42;
+							RadInfo.DraggingRect[0].bottom=mouse.y+42;
+						}
+						else{
+							RadInfo.DraggingRect[0].right=mouse.x;
+							RadInfo.DraggingRect[0].bottom=mouse.y;
+						}
+						RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
+						pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
+						pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
+						size.cx=rect.right-rect.left;
+						size.cy=rect.bottom-rect.top;
+						MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ComboBox","",WS_CHILD|WS_VISIBLE|CBS_DROPDOWN|CBS_SORT|WS_VSCROLL,0,CT_COMBOBOX,0,0,1);
+					}
+					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_EDIT){
+						//エディット コントロール作成
+						if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
+							RadInfo.DraggingRect[0].left-=35;
+							RadInfo.DraggingRect[0].right=mouse.x+35;
+							RadInfo.DraggingRect[0].top-=10;
+							RadInfo.DraggingRect[0].bottom=mouse.y+11;
+						}
+						else{
+							RadInfo.DraggingRect[0].right=mouse.x;
+							RadInfo.DraggingRect[0].bottom=mouse.y;
+						}
+						RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
+						pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
+						pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
+						size.cx=rect.right-rect.left;
+						size.cy=rect.bottom-rect.top;
+						MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"EditBox","",WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,CT_EDIT,0,0,1);
+					}
+					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_GROUPBOX){
+						//グループ ボックス作成
+						if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
+							RadInfo.DraggingRect[0].left-=42;
+							RadInfo.DraggingRect[0].right=mouse.x+42;
+							RadInfo.DraggingRect[0].top-=30;
+							RadInfo.DraggingRect[0].bottom=mouse.y+30;
+						}
+						else{
+							RadInfo.DraggingRect[0].right=mouse.x;
+							RadInfo.DraggingRect[0].bottom=mouse.y;
+						}
+						RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
+						pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
+						pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
+						size.cx=rect.right-rect.left;
+						size.cy=rect.bottom-rect.top;
+						MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"GroupBox","Group",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,0,CT_GROUPBOX,0,0,1);
+					}
+					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_HSCROLLBAR){
+						//水平スクロールバー作成
+						if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
+							RadInfo.DraggingRect[0].left-=35;
+							RadInfo.DraggingRect[0].right=mouse.x+35;
+							RadInfo.DraggingRect[0].top-=8;
+							RadInfo.DraggingRect[0].bottom=mouse.y+9;
+						}
+						else{
+							RadInfo.DraggingRect[0].right=mouse.x;
+							RadInfo.DraggingRect[0].bottom=mouse.y;
+						}
+						RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
+						pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
+						pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
+						size.cx=rect.right-rect.left;
+						size.cy=rect.bottom-rect.top;
+						MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"HScrollBar","",WS_CHILD|WS_VISIBLE|SBS_HORZ,0,CT_HSCROLLBAR,0,0,1);
+					}
+					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_IMAGEBOX){
+						//イメージ ボックス作成
+						if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
+							RadInfo.DraggingRect[0].left-=16;
+							RadInfo.DraggingRect[0].right=mouse.x+16;
+							RadInfo.DraggingRect[0].top-=16;
+							RadInfo.DraggingRect[0].bottom=mouse.y+16;
+						}
+						else{
+							RadInfo.DraggingRect[0].right=mouse.x;
+							RadInfo.DraggingRect[0].bottom=mouse.y;
+						}
+						RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
+						pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
+						pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
+						size.cx=rect.right-rect.left;
+						size.cy=rect.bottom-rect.top;
+						MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ImageBox","",WS_CHILD|WS_VISIBLE|SS_BLACKFRAME,0,CT_IMAGEBOX,IMGTYPE_FILE,0,1);
+					}
+					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_LISTBOX){
+						//リスト ボックス作成
+						if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
+							RadInfo.DraggingRect[0].left-=42;
+							RadInfo.DraggingRect[0].right=mouse.x+42;
+							RadInfo.DraggingRect[0].top-=30;
+							RadInfo.DraggingRect[0].bottom=mouse.y+30;
+						}
+						else{
+							RadInfo.DraggingRect[0].right=mouse.x;
+							RadInfo.DraggingRect[0].bottom=mouse.y;
+						}
+						RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
+						pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
+						pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
+						size.cx=rect.right-rect.left;
+						size.cy=rect.bottom-rect.top;
+						MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ListBox","",WS_CHILD|WS_VISIBLE|WS_VSCROLL|LBS_SORT|LBS_NOTIFY,WS_EX_CLIENTEDGE,CT_LISTBOX,0,0,1);
+					}
+					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_LISTVIEW){
+						//リスト ビュー作成
+						if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
+							RadInfo.DraggingRect[0].left-=52;
+							RadInfo.DraggingRect[0].right=mouse.x+53;
+							RadInfo.DraggingRect[0].top-=37;
+							RadInfo.DraggingRect[0].bottom=mouse.y+38;
+						}
+						else{
+							RadInfo.DraggingRect[0].right=mouse.x;
+							RadInfo.DraggingRect[0].bottom=mouse.y;
+						}
+						RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
+						pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
+						pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
+						size.cx=rect.right-rect.left;
+						size.cy=rect.bottom-rect.top;
+						MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ListView","",WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,CT_LISTVIEW,0,0,1);
+					}
+					if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_PROGRESSBAR){
+						//プロバレス バー作成
+						if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
+							RadInfo.DraggingRect[0].left-=70;
+							RadInfo.DraggingRect[0].right=mouse.x+70;
+							RadInfo.DraggingRect[0].top-=10;
+							RadInfo.DraggingRect[0].bottom=mouse.y+11;
+						}
+						else{
+							RadInfo.DraggingRect[0].right=mouse.x;
+							RadInfo.DraggingRect[0].bottom=mouse.y;
+						}
+						RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
+						pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
+						pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
+						size.cx=rect.right-rect.left;
+						size.cy=rect.bottom-rect.top;
+						MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ProgressBar","",WS_CHILD|WS_VISIBLE,WS_EX_STATICEDGE,CT_PROGRESSBAR,0,0,1);
+					}
+					if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_RADIOBUTTON){
+						//ラジオ ボタン作成
+						if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
+							RadInfo.DraggingRect[0].left-=31;
+							RadInfo.DraggingRect[0].right=mouse.x+32;
+							RadInfo.DraggingRect[0].top-=7;
+							RadInfo.DraggingRect[0].bottom=mouse.y+8;
+						}
+						else{
+							RadInfo.DraggingRect[0].right=mouse.x;
+							RadInfo.DraggingRect[0].bottom=mouse.y;
+						}
+						RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
+						pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
+						pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
+						size.cx=rect.right-rect.left;
+						size.cy=rect.bottom-rect.top;
+						MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"RadioButton","radio",WS_CHILD|WS_VISIBLE|BS_AUTORADIOBUTTON,0,CT_RADIOBUTTON,0,0,1);
+					}
+					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_STATIC){
+						//スタティック コントロール作成
+						if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
+							RadInfo.DraggingRect[0].left-=25;
+							RadInfo.DraggingRect[0].right=mouse.x+25;
+							RadInfo.DraggingRect[0].top-=6;
+							RadInfo.DraggingRect[0].bottom=mouse.y+6;
+						}
+						else{
+							RadInfo.DraggingRect[0].right=mouse.x;
+							RadInfo.DraggingRect[0].bottom=mouse.y;
+						}
+						RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
+						pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
+						pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
+						size.cx=rect.right-rect.left;
+						size.cy=rect.bottom-rect.top;
+						MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"Static","Text",WS_CHILD|WS_VISIBLE,0,CT_STATIC,0,0,1);
+					}
+					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_TRACKBAR){
+						//トラック バー作成
+						if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
+							RadInfo.DraggingRect[0].left-=87;
+							RadInfo.DraggingRect[0].right=mouse.x+88;
+							RadInfo.DraggingRect[0].top-=11;
+							RadInfo.DraggingRect[0].bottom=mouse.y+12;
+						}
+						else{
+							RadInfo.DraggingRect[0].right=mouse.x;
+							RadInfo.DraggingRect[0].bottom=mouse.y;
+						}
+						RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
+						pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
+						pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
+						size.cx=rect.right-rect.left;
+						size.cy=rect.bottom-rect.top;
+						MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"TrackBar","",WS_CHILD|WS_VISIBLE|TBS_BOTH|TBS_NOTICKS,0,CT_TRACKBAR,0,0,1);
+					}
+					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_TREEVIEW){
+						//ツリー ビュー作成
+						if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
+							RadInfo.DraggingRect[0].left-=52;
+							RadInfo.DraggingRect[0].right=mouse.x+53;
+							RadInfo.DraggingRect[0].top-=37;
+							RadInfo.DraggingRect[0].bottom=mouse.y+38;
+						}
+						else{
+							RadInfo.DraggingRect[0].right=mouse.x;
+							RadInfo.DraggingRect[0].bottom=mouse.y;
+						}
+						RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
+						pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
+						pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
+						size.cx=rect.right-rect.left;
+						size.cy=rect.bottom-rect.top;
+						MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"TreeView","",WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,CT_TREEVIEW,0,0,1);
+					}
+					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_UPDOWN){
+						//アップ ダウン コントロール作成
+						if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
+							RadInfo.DraggingRect[0].left-=8;
+							RadInfo.DraggingRect[0].right=mouse.x+8;
+							RadInfo.DraggingRect[0].top-=10;
+							RadInfo.DraggingRect[0].bottom=mouse.y+11;
+						}
+						else{
+							RadInfo.DraggingRect[0].right=mouse.x;
+							RadInfo.DraggingRect[0].bottom=mouse.y;
+						}
+						RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
+						pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
+						pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
+						size.cx=rect.right-rect.left;
+						size.cy=rect.bottom-rect.top;
+						MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"UpDown","",WS_CHILD|WS_VISIBLE,0,CT_UPDOWN,0,0,1);
+					}
+					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_VSCROLLBAR){
+						//垂直スクロールバー作成
+						if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
+							RadInfo.DraggingRect[0].left-=9;
+							RadInfo.DraggingRect[0].right=mouse.x+9;
+							RadInfo.DraggingRect[0].top-=30;
+							RadInfo.DraggingRect[0].bottom=mouse.y+30;
+						}
+						else{
+							RadInfo.DraggingRect[0].right=mouse.x;
+							RadInfo.DraggingRect[0].bottom=mouse.y;
+						}
+						RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
+						pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
+						pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
+						size.cx=rect.right-rect.left;
+						size.cy=rect.bottom-rect.top;
+						MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"VScrollBar","",WS_CHILD|WS_VISIBLE|SBS_VERT,0,CT_VSCROLLBAR,0,0,1);
+					}
+					SendMessage(GetWindow(MdiInfo[i].MdiRadInfo->hTools,GW_CHILD),WM_COMMAND,IDC_TOOL_MOUSE,0);
+					SendMessage(GetWindow(GetWindow(MdiInfo[i].MdiRadInfo->hTools,GW_CHILD),GW_CHILD),TB_CHECKBUTTON,IDC_TOOL_MOUSE,TRUE);
+					ChangePropertyWindow(i,i2);
+
+					//複数選択を解除
+					MdiInfo[i].MdiRadInfo->SelectingItem[1]=-1;
+				}
+
+				RadInfo.NowDragging=0;
+
+				ResetState_EditMenu();
+				return 0;
 			}
-			else{
-				RadInfo.DraggingRect[0].left=mouse.x;
-				RadInfo.DraggingRect[0].top=mouse.y;
-				RadInfo.NowDragging=ITEM_MAKING;
-			}
-			return 0;
-		case WM_LBUTTONUP:
-			ReleaseCapture();
-
-			SetFocus(hwnd);
-			mouse.x=(int)(short)LOWORD(lParam);
-			mouse.y=(int)(short)HIWORD(lParam);
-			CursorPos_LocalToGlobal(hwnd,&mouse.x,&mouse.y);
-
-			hParent=GetParent(hwnd);
-			i=GetWndNum(hParent);
-			i2=GetWndInfoNum(MdiInfo[i].path);
-
-			if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
-				if(RadInfo.NowDragging){
-					if(RadInfo.DragStartPos.x==mouse.x&&RadInfo.DragStartPos.y==mouse.y){
-						RadInfo.NowDragging=0;
-						InvalidateRect(hwnd,NULL,0);
-						ResetState_EditMenu();
-						return 0;
-					}
-
-					if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
-						if(RadInfo.NowDragging==SELECTING_FRAME){
-							SetItemNumOnFrame(i,i2,&RadInfo.DraggingRect[0]);
-							InvalidateRect(hwnd,NULL,1);
-						}
-						else{
-							//ウィンドウ枠の調整完了
-							PointAndSize.size=ProjectInfo.pWindowInfo[i2].size;
-							Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
-							ProjectInfo.pWindowInfo[i2].size.cx=RadInfo.DraggingRect[0].right-LEVER_THICK;
-							ProjectInfo.pWindowInfo[i2].size.cy=RadInfo.DraggingRect[0].bottom-LEVER_THICK;
-							DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
-							InvalidateRect(hwnd,NULL,1);
-
-							GetClientRect(hwnd,&rect);
-							ResetScrollbarOfRadEditor(i,rect.right,rect.bottom);
-						}
-					}
-					else{
-						i3=0;
-						while(MdiInfo[i].MdiRadInfo->SelectingItem[i3]!=-1){
-							//アイテム枠の調整完了
-							PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
-							PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
-							Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
-							ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x=RadInfo.DraggingRect[i3].left-MdiInfo[i].MdiRadInfo->ClientPos.x;
-							ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y=RadInfo.DraggingRect[i3].top-MdiInfo[i].MdiRadInfo->ClientPos.y;
-							ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cx=RadInfo.DraggingRect[i3].right-RadInfo.DraggingRect[i3].left;
-							ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cy=RadInfo.DraggingRect[i3].bottom-RadInfo.DraggingRect[i3].top;
-							DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
-							i3++;
-						}
-					}
-
-					SetStatusText(NULL);
-
-					//サポートダイアログの内容をセット
-					SetSupportDlgData(i,i2);
-				}
-			}
-			else if(RadInfo.NowDragging==ITEM_MAKING){
-				if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_BUTTON){
-					//ボタン コントロール作成
-					if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
-						RadInfo.DraggingRect[0].left-=44;
-						RadInfo.DraggingRect[0].right=mouse.x+44;
-						RadInfo.DraggingRect[0].top-=10;
-						RadInfo.DraggingRect[0].bottom=mouse.y+11;
-					}
-					else{
-						RadInfo.DraggingRect[0].right=mouse.x;
-						RadInfo.DraggingRect[0].bottom=mouse.y;
-					}
-					RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
-					pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
-					pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
-					size.cx=rect.right-rect.left;
-					size.cy=rect.bottom-rect.top;
-					MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"CommandButton","Button",WS_CHILD|WS_VISIBLE,0,CT_BUTTON,0,0,1);
-				}
-				if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_CHECKBOX){
-					//チェック ボックス作成
-					if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
-						RadInfo.DraggingRect[0].left-=33;
-						RadInfo.DraggingRect[0].right=mouse.x+34;
-						RadInfo.DraggingRect[0].top-=7;
-						RadInfo.DraggingRect[0].bottom=mouse.y+8;
-					}
-					else{
-						RadInfo.DraggingRect[0].right=mouse.x;
-						RadInfo.DraggingRect[0].bottom=mouse.y;
-					}
-					RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
-					pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
-					pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
-					size.cx=rect.right-rect.left;
-					size.cy=rect.bottom-rect.top;
-					MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"CheckBox","Check",WS_CHILD|WS_VISIBLE|BS_AUTOCHECKBOX,0,CT_CHECKBOX,0,0,1);
-				}
-				if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_COMBOBOX){
-					//コンボ ボックス作成
-					if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
-						RadInfo.DraggingRect[0].left-=42;
-						RadInfo.DraggingRect[0].right=mouse.x+42;
-						RadInfo.DraggingRect[0].top-=42;
-						RadInfo.DraggingRect[0].bottom=mouse.y+42;
-					}
-					else{
-						RadInfo.DraggingRect[0].right=mouse.x;
-						RadInfo.DraggingRect[0].bottom=mouse.y;
-					}
-					RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
-					pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
-					pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
-					size.cx=rect.right-rect.left;
-					size.cy=rect.bottom-rect.top;
-					MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ComboBox","",WS_CHILD|WS_VISIBLE|CBS_DROPDOWN|CBS_SORT|WS_VSCROLL,0,CT_COMBOBOX,0,0,1);
-				}
-				else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_EDIT){
-					//エディット コントロール作成
-					if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
-						RadInfo.DraggingRect[0].left-=35;
-						RadInfo.DraggingRect[0].right=mouse.x+35;
-						RadInfo.DraggingRect[0].top-=10;
-						RadInfo.DraggingRect[0].bottom=mouse.y+11;
-					}
-					else{
-						RadInfo.DraggingRect[0].right=mouse.x;
-						RadInfo.DraggingRect[0].bottom=mouse.y;
-					}
-					RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
-					pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
-					pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
-					size.cx=rect.right-rect.left;
-					size.cy=rect.bottom-rect.top;
-					MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"EditBox","",WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,CT_EDIT,0,0,1);
-				}
-				else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_GROUPBOX){
-					//グループ ボックス作成
-					if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
-						RadInfo.DraggingRect[0].left-=42;
-						RadInfo.DraggingRect[0].right=mouse.x+42;
-						RadInfo.DraggingRect[0].top-=30;
-						RadInfo.DraggingRect[0].bottom=mouse.y+30;
-					}
-					else{
-						RadInfo.DraggingRect[0].right=mouse.x;
-						RadInfo.DraggingRect[0].bottom=mouse.y;
-					}
-					RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
-					pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
-					pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
-					size.cx=rect.right-rect.left;
-					size.cy=rect.bottom-rect.top;
-					MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"GroupBox","Group",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,0,CT_GROUPBOX,0,0,1);
-				}
-				else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_HSCROLLBAR){
-					//水平スクロールバー作成
-					if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
-						RadInfo.DraggingRect[0].left-=35;
-						RadInfo.DraggingRect[0].right=mouse.x+35;
-						RadInfo.DraggingRect[0].top-=8;
-						RadInfo.DraggingRect[0].bottom=mouse.y+9;
-					}
-					else{
-						RadInfo.DraggingRect[0].right=mouse.x;
-						RadInfo.DraggingRect[0].bottom=mouse.y;
-					}
-					RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
-					pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
-					pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
-					size.cx=rect.right-rect.left;
-					size.cy=rect.bottom-rect.top;
-					MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"HScrollBar","",WS_CHILD|WS_VISIBLE|SBS_HORZ,0,CT_HSCROLLBAR,0,0,1);
-				}
-				else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_IMAGEBOX){
-					//イメージ ボックス作成
-					if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
-						RadInfo.DraggingRect[0].left-=16;
-						RadInfo.DraggingRect[0].right=mouse.x+16;
-						RadInfo.DraggingRect[0].top-=16;
-						RadInfo.DraggingRect[0].bottom=mouse.y+16;
-					}
-					else{
-						RadInfo.DraggingRect[0].right=mouse.x;
-						RadInfo.DraggingRect[0].bottom=mouse.y;
-					}
-					RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
-					pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
-					pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
-					size.cx=rect.right-rect.left;
-					size.cy=rect.bottom-rect.top;
-					MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ImageBox","",WS_CHILD|WS_VISIBLE|SS_BLACKFRAME,0,CT_IMAGEBOX,IMGTYPE_FILE,0,1);
-				}
-				else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_LISTBOX){
-					//リスト ボックス作成
-					if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
-						RadInfo.DraggingRect[0].left-=42;
-						RadInfo.DraggingRect[0].right=mouse.x+42;
-						RadInfo.DraggingRect[0].top-=30;
-						RadInfo.DraggingRect[0].bottom=mouse.y+30;
-					}
-					else{
-						RadInfo.DraggingRect[0].right=mouse.x;
-						RadInfo.DraggingRect[0].bottom=mouse.y;
-					}
-					RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
-					pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
-					pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
-					size.cx=rect.right-rect.left;
-					size.cy=rect.bottom-rect.top;
-					MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ListBox","",WS_CHILD|WS_VISIBLE|WS_VSCROLL|LBS_SORT|LBS_NOTIFY,WS_EX_CLIENTEDGE,CT_LISTBOX,0,0,1);
-				}
-				else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_LISTVIEW){
-					//リスト ビュー作成
-					if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
-						RadInfo.DraggingRect[0].left-=52;
-						RadInfo.DraggingRect[0].right=mouse.x+53;
-						RadInfo.DraggingRect[0].top-=37;
-						RadInfo.DraggingRect[0].bottom=mouse.y+38;
-					}
-					else{
-						RadInfo.DraggingRect[0].right=mouse.x;
-						RadInfo.DraggingRect[0].bottom=mouse.y;
-					}
-					RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
-					pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
-					pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
-					size.cx=rect.right-rect.left;
-					size.cy=rect.bottom-rect.top;
-					MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ListView","",WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,CT_LISTVIEW,0,0,1);
-				}
-				if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_PROGRESSBAR){
-					//プロバレス バー作成
-					if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
-						RadInfo.DraggingRect[0].left-=70;
-						RadInfo.DraggingRect[0].right=mouse.x+70;
-						RadInfo.DraggingRect[0].top-=10;
-						RadInfo.DraggingRect[0].bottom=mouse.y+11;
-					}
-					else{
-						RadInfo.DraggingRect[0].right=mouse.x;
-						RadInfo.DraggingRect[0].bottom=mouse.y;
-					}
-					RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
-					pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
-					pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
-					size.cx=rect.right-rect.left;
-					size.cy=rect.bottom-rect.top;
-					MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ProgressBar","",WS_CHILD|WS_VISIBLE,WS_EX_STATICEDGE,CT_PROGRESSBAR,0,0,1);
-				}
-				if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_RADIOBUTTON){
-					//ラジオ ボタン作成
-					if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
-						RadInfo.DraggingRect[0].left-=31;
-						RadInfo.DraggingRect[0].right=mouse.x+32;
-						RadInfo.DraggingRect[0].top-=7;
-						RadInfo.DraggingRect[0].bottom=mouse.y+8;
-					}
-					else{
-						RadInfo.DraggingRect[0].right=mouse.x;
-						RadInfo.DraggingRect[0].bottom=mouse.y;
-					}
-					RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
-					pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
-					pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
-					size.cx=rect.right-rect.left;
-					size.cy=rect.bottom-rect.top;
-					MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"RadioButton","radio",WS_CHILD|WS_VISIBLE|BS_AUTORADIOBUTTON,0,CT_RADIOBUTTON,0,0,1);
-				}
-				else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_STATIC){
-					//スタティック コントロール作成
-					if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
-						RadInfo.DraggingRect[0].left-=25;
-						RadInfo.DraggingRect[0].right=mouse.x+25;
-						RadInfo.DraggingRect[0].top-=6;
-						RadInfo.DraggingRect[0].bottom=mouse.y+6;
-					}
-					else{
-						RadInfo.DraggingRect[0].right=mouse.x;
-						RadInfo.DraggingRect[0].bottom=mouse.y;
-					}
-					RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
-					pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
-					pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
-					size.cx=rect.right-rect.left;
-					size.cy=rect.bottom-rect.top;
-					MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"Static","Text",WS_CHILD|WS_VISIBLE,0,CT_STATIC,0,0,1);
-				}
-				else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_TRACKBAR){
-					//トラック バー作成
-					if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
-						RadInfo.DraggingRect[0].left-=87;
-						RadInfo.DraggingRect[0].right=mouse.x+88;
-						RadInfo.DraggingRect[0].top-=11;
-						RadInfo.DraggingRect[0].bottom=mouse.y+12;
-					}
-					else{
-						RadInfo.DraggingRect[0].right=mouse.x;
-						RadInfo.DraggingRect[0].bottom=mouse.y;
-					}
-					RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
-					pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
-					pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
-					size.cx=rect.right-rect.left;
-					size.cy=rect.bottom-rect.top;
-					MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"TrackBar","",WS_CHILD|WS_VISIBLE|TBS_BOTH|TBS_NOTICKS,0,CT_TRACKBAR,0,0,1);
-				}
-				else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_TREEVIEW){
-					//ツリー ビュー作成
-					if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
-						RadInfo.DraggingRect[0].left-=52;
-						RadInfo.DraggingRect[0].right=mouse.x+53;
-						RadInfo.DraggingRect[0].top-=37;
-						RadInfo.DraggingRect[0].bottom=mouse.y+38;
-					}
-					else{
-						RadInfo.DraggingRect[0].right=mouse.x;
-						RadInfo.DraggingRect[0].bottom=mouse.y;
-					}
-					RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
-					pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
-					pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
-					size.cx=rect.right-rect.left;
-					size.cy=rect.bottom-rect.top;
-					MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"TreeView","",WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,CT_TREEVIEW,0,0,1);
-				}
-				else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_UPDOWN){
-					//アップ ダウン コントロール作成
-					if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
-						RadInfo.DraggingRect[0].left-=8;
-						RadInfo.DraggingRect[0].right=mouse.x+8;
-						RadInfo.DraggingRect[0].top-=10;
-						RadInfo.DraggingRect[0].bottom=mouse.y+11;
-					}
-					else{
-						RadInfo.DraggingRect[0].right=mouse.x;
-						RadInfo.DraggingRect[0].bottom=mouse.y;
-					}
-					RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
-					pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
-					pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
-					size.cx=rect.right-rect.left;
-					size.cy=rect.bottom-rect.top;
-					MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"UpDown","",WS_CHILD|WS_VISIBLE,0,CT_UPDOWN,0,0,1);
-				}
-				else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_VSCROLLBAR){
-					//垂直スクロールバー作成
-					if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){
-						RadInfo.DraggingRect[0].left-=9;
-						RadInfo.DraggingRect[0].right=mouse.x+9;
-						RadInfo.DraggingRect[0].top-=30;
-						RadInfo.DraggingRect[0].bottom=mouse.y+30;
-					}
-					else{
-						RadInfo.DraggingRect[0].right=mouse.x;
-						RadInfo.DraggingRect[0].bottom=mouse.y;
-					}
-					RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);
-					pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;
-					pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;
-					size.cx=rect.right-rect.left;
-					size.cy=rect.bottom-rect.top;
-					MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"VScrollBar","",WS_CHILD|WS_VISIBLE|SBS_VERT,0,CT_VSCROLLBAR,0,0,1);
-				}
-				SendMessage(GetWindow(MdiInfo[i].MdiRadInfo->hTools,GW_CHILD),WM_COMMAND,IDC_TOOL_MOUSE,0);
-				SendMessage(GetWindow(GetWindow(MdiInfo[i].MdiRadInfo->hTools,GW_CHILD),GW_CHILD),TB_CHECKBUTTON,IDC_TOOL_MOUSE,TRUE);
-				ChangePropertyWindow(i,i2);
-
-				//複数選択を解除
-				MdiInfo[i].MdiRadInfo->SelectingItem[1]=-1;
-			}
-
-			RadInfo.NowDragging=0;
-
-			ResetState_EditMenu();
-			return 0;
 		case WM_MOUSEMOVE:
 			mouse.x=(int)(short)LOWORD(lParam);
@@ -1258,5 +1278,5 @@
 			hParent=GetParent(hwnd);
 			i=GetWndNum(hParent);
-			i2=GetWndInfoNum(MdiInfo[i].path);
+			i2 = GetWndInfoNum(MdiInfo[i].path);
 
 			if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
@@ -1414,56 +1434,87 @@
 			return 0;
 		case WM_LBUTTONDBLCLK:
-			mouse.x=LOWORD(lParam);
-			mouse.y=HIWORD(lParam);
-			CursorPos_LocalToGlobal(hwnd,&mouse.x,&mouse.y);
-
-			hParent=GetParent(hwnd);
-			i=GetWndNum(hParent);
-			i2=GetWndInfoNum(MdiInfo[i].path);
-			if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
-				if(MdiInfo[i].MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW){
-					temp2[0]=0;
-					if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_BUTTON||
-						ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX||
-						ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_IMAGEBOX||
-						ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON||
-						ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC){
-						sprintf(temporary,"%s_%s_Click",ProjectInfo.pWindowInfo[i2].name,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
-					}
-					else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_COMBOBOX)
-						sprintf(temporary,"%s_%s_EditChange",ProjectInfo.pWindowInfo[i2].name,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
-					else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_EDIT)
-						sprintf(temporary,"%s_%s_Change",ProjectInfo.pWindowInfo[i2].name,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
-					else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_LISTBOX)
-						sprintf(temporary,"%s_%s_SelChange",ProjectInfo.pWindowInfo[i2].name,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
-					else temporary[0]=0;
-					if(temporary[0]) SelectProcedureOfMessageCall(i2,temporary,temp2);
+			{
+				mouse.x=LOWORD(lParam);
+				mouse.y=HIWORD(lParam);
+				CursorPos_LocalToGlobal(hwnd,&mouse.x,&mouse.y);
+
+				hParent=GetParent(hwnd);
+				i=GetWndNum(hParent);
+				i2=GetWndInfoNum(MdiInfo[i].path);
+				WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
+				if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
+					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);
+						else temporary[0]=0;
+						if(temporary[0]) SelectProcedureOfMessageCall(i2,temporary,temp2);
+					}
 				}
+				return 0;
 			}
-			return 0;
 		case WM_KEYDOWN:
-			hParent=GetParent(hwnd);
-			i=GetWndNum(hParent);
-			i2=GetWndInfoNum(MdiInfo[i].path);
-			if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
-				if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
-					PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pos;
-					PointAndSize.size=ProjectInfo.pWindowInfo[i2].size;
-					if(GetKeyState(VK_SHIFT)&0x8000){
-						if(wParam==VK_RIGHT||wParam==VK_LEFT||wParam==VK_DOWN||wParam==VK_UP)
-							Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
-
-						if(wParam==VK_RIGHT)
-							ProjectInfo.pWindowInfo[i2].size.cx++;
-						else if(wParam==VK_LEFT)
-							ProjectInfo.pWindowInfo[i2].size.cx--;
-						else if(wParam==VK_DOWN)
-							ProjectInfo.pWindowInfo[i2].size.cy++;
-						else if(wParam==VK_UP)
-							ProjectInfo.pWindowInfo[i2].size.cy--;
-
-						if(wParam==VK_RIGHT||wParam==VK_LEFT||wParam==VK_DOWN||wParam==VK_UP){
-							DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
-
+			{
+				hParent=GetParent(hwnd);
+				i=GetWndNum(hParent);
+				i2=GetWndInfoNum(MdiInfo[i].path);
+				WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
+				if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
+					if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
+						PointAndSize.pos=pWindowInfo->pos;
+						PointAndSize.size=pWindowInfo->size;
+						if(GetKeyState(VK_SHIFT)&0x8000){
+							if(wParam==VK_RIGHT||wParam==VK_LEFT||wParam==VK_DOWN||wParam==VK_UP)
+								Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
+
+							if(wParam==VK_RIGHT)
+								pWindowInfo->size.cx++;
+							else if(wParam==VK_LEFT)
+								pWindowInfo->size.cx--;
+							else if(wParam==VK_DOWN)
+								pWindowInfo->size.cy++;
+							else if(wParam==VK_UP)
+								pWindowInfo->size.cy--;
+
+							if(wParam==VK_RIGHT||wParam==VK_LEFT||wParam==VK_DOWN||wParam==VK_UP){
+								DrawRadWindow(i,pWindowInfo);
+
+								SetStatusText(NULL);
+
+								//サポートダイアログの内容をセット
+								SetSupportDlgData(i,i2);
+							}
+						}
+					}
+					else{
+						PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos;
+						PointAndSize.size=pWindowInfo->pChildInfo[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++;
+							}
+							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;
+									Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
+
+									pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x++;
+								}
+							}
+							DrawRadWindow(i,pWindowInfo);
 							SetStatusText(NULL);
 
@@ -1471,98 +1522,73 @@
 							SetSupportDlgData(i,i2);
 						}
+						else if(wParam==VK_LEFT){
+							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--;
+							}
+							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;
+									Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
+
+									pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x--;
+								}
+							}
+							DrawRadWindow(i,pWindowInfo);
+							SetStatusText(NULL);
+
+							//サポートダイアログの内容をセット
+							SetSupportDlgData(i,i2);
+						}
+						else if(wParam==VK_UP){
+							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--;
+							}
+							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;
+									Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
+
+									pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y--;
+								}
+							}
+							DrawRadWindow(i,pWindowInfo);
+							SetStatusText(NULL);
+
+							//サポートダイアログの内容をセット
+							SetSupportDlgData(i,i2);
+						}
+						else if(wParam==VK_DOWN){
+							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++;
+							}
+							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;
+									Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
+
+									pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y++;
+								}
+							}
+							DrawRadWindow(i,pWindowInfo);
+							SetStatusText(NULL);
+
+							//サポートダイアログの内容をセット
+							SetSupportDlgData(i,i2);
+						}
+						else if(wParam==VK_DELETE)
+							SendMessage(hwnd,WM_COMMAND,IDM_RAD_ITEM_DELETE,0);
 					}
 				}
-				else{
-					PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos;
-					PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[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);
-							ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx++;
-						}
-						else{
-							for(i3=0;;i3++){
-								if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break;
-								PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
-								PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
-								Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
-
-								ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x++;
-							}
-						}
-						DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
-						SetStatusText(NULL);
-
-						//サポートダイアログの内容をセット
-						SetSupportDlgData(i,i2);
-					}
-					else if(wParam==VK_LEFT){
-						if(GetKeyState(VK_SHIFT)&0x8000){
-							Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
-							ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx--;
-						}
-						else{
-							for(i3=0;;i3++){
-								if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break;
-								PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
-								PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
-								Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
-
-								ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x--;
-							}
-						}
-						DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
-						SetStatusText(NULL);
-
-						//サポートダイアログの内容をセット
-						SetSupportDlgData(i,i2);
-					}
-					else if(wParam==VK_UP){
-						if(GetKeyState(VK_SHIFT)&0x8000){
-							Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
-							ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cy--;
-						}
-						else{
-							for(i3=0;;i3++){
-								if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break;
-								PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
-								PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
-								Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
-
-								ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y--;
-							}
-						}
-						DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
-						SetStatusText(NULL);
-
-						//サポートダイアログの内容をセット
-						SetSupportDlgData(i,i2);
-					}
-					else if(wParam==VK_DOWN){
-						if(GetKeyState(VK_SHIFT)&0x8000){
-							Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
-							ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cy++;
-						}
-						else{
-							for(i3=0;;i3++){
-								if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break;
-								PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;
-								PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;
-								Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);
-
-								ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y++;
-							}
-						}
-						DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
-						SetStatusText(NULL);
-
-						//サポートダイアログの内容をセット
-						SetSupportDlgData(i,i2);
-					}
-					else if(wParam==VK_DELETE)
-						SendMessage(hwnd,WM_COMMAND,IDM_RAD_ITEM_DELETE,0);
-				}
+				return 0;
 			}
-			return 0;
 		case WM_SETFOCUS:
 			i=GetWndNum(GetParent(hwnd));
