Index: trunk/ab5.0/abdev/abdev/RadProc.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/RadProc.cpp	(revision 618)
+++ trunk/ab5.0/abdev/abdev/RadProc.cpp	(revision 624)
@@ -4,5 +4,5 @@
 #include "common.h"
 
-void NewRadWindow( const WindowInfo &windowInfo )
+void NewRadWindow( const ActiveBasic::PM::WindowInfo &windowInfo )
 {
 	extern HINSTANCE hInst,hResInst;
@@ -153,5 +153,5 @@
 }
 
-int InsertDlgItem(int WndNum,int WndInfoNum,int ItemNum,POINT *pPos,SIZE *pSize,char *IdName,char *caption,DWORD style_or_WndNum,DWORD ExStyle,int Control,int ImageType,char *ImagePath,DWORD dwInsertType){
+int InsertDlgItem(int WndNum,int WndInfoNum,int ItemNum,POINT *pPos,SIZE *pSize,const char *IdName,const char *caption,DWORD style_or_WndNum,DWORD ExStyle,int Control,ActiveBasic::PM::ImageReferenceType::EnumType ImageType,const char *ImagePath,DWORD dwInsertType){
 	//dwInsertType
 	//0 … 元に戻す、やり直し
@@ -164,7 +164,7 @@
 	char temporary[MAX_PATH];
 
-	WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum];
-
-	CHILDINFO *pChildInfo = new CHILDINFO();
+	ActiveBasic::PM::WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum];
+
+	ActiveBasic::PM::ChildWindowInfo *pChildInfo = new ActiveBasic::PM::ChildWindowInfo();
 
 	if(ItemNum==-1)
@@ -175,5 +175,5 @@
 	else
 	{
-		std::vector<CHILDINFO *>::iterator it = pWindowInfo->childWindowInfos.begin();
+		ActiveBasic::PM::ChildWindowInfos::iterator it = pWindowInfo->childWindowInfos.begin();
 		for( int i=0; i<ItemNum; i++ )
 		{
@@ -187,13 +187,15 @@
 	//ID
 	if(ItemNum==-1){
-		for(i=lstrlen(IdName)-1;i>=0;i--){
-			if(!('0'<=IdName[i]&&IdName[i]<='9')) break;
+		char temp2[1024];
+		lstrcpy( temp2, IdName );
+		for(i=lstrlen(temp2)-1;i>=0;i--){
+			if(!('0'<=temp2[i]&&temp2[i]<='9')) break;
 		}
 		i++;
 
-		if(IdName[i]!='\0'){
-			i2=atoi(IdName+i)+1;
+		if(temp2[i]!='\0'){
+			i2=atoi(temp2+i)+1;
 			if(dwInsertType==2) i2--;
-			IdName[i]=0;
+			temp2[i]=0;
 		}
 		else{
@@ -202,12 +204,15 @@
 		}
 
-		if(i2==0) lstrcpy(temporary,IdName);
-		else sprintf(temporary,"%s%d",IdName,i2);
+		if(i2==0) lstrcpy(temporary,temp2);
+		else sprintf(temporary,"%s%d",temp2,i2);
 SearchStart:
-		for(i=0;i<pWindowInfo->childWindowInfos.size();i++){
-			if(i!=NewItemNum){
-				if(lstrcmp(pWindowInfo->childWindowInfos[i]->IdName,temporary)==0){
+		for( i=0; i<static_cast<int>(pWindowInfo->childWindowInfos.size()); i++ )
+		{
+			if( i != NewItemNum )
+			{
+				if( pWindowInfo->childWindowInfos[i]->GetName() == temporary )
+				{
 					i2++;
-					sprintf(temporary,"%s%d",IdName,i2);
+					sprintf(temporary,"%s%d",temp2,i2);
 					goto SearchStart;
 				}
@@ -216,6 +221,5 @@
 	}
 	else lstrcpy(temporary,IdName);
-	pChildInfo->IdName=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1);
-	lstrcpy(pChildInfo->IdName,temporary);
+	pChildInfo->SetName( temporary );
 
 	//位置
@@ -235,12 +239,11 @@
 	}
 	else lstrcpy(temporary,caption);
-	pChildInfo->caption=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1);
-	lstrcpy(pChildInfo->caption,temporary);
+	pChildInfo->SetCaption( temporary );
 
 	//スタイル
-	pChildInfo->style=style_or_WndNum;
+	pChildInfo->SetStyle( style_or_WndNum );
 
 	//拡張スタイル
-	pChildInfo->ExStyle=ExStyle;
+	pChildInfo->SetExStyle( ExStyle );
 
 	//クラス名
@@ -249,10 +252,11 @@
 	if(Control==CT_IMAGEBOX){
 		//イメージ ボックスの場合
-		pChildInfo->ImageCtrlInfo.type=ImageType;
+		pChildInfo->image.type = ImageType;
 		if(!ImagePath)
-			pChildInfo->ImageCtrlInfo.path=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,1);
+		{
+			pChildInfo->image.path = "";
+		}
 		else{
-			pChildInfo->ImageCtrlInfo.path=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,lstrlen(ImagePath)+1);
-			lstrcpy(pChildInfo->ImageCtrlInfo.path,ImagePath);
+			pChildInfo->image.path = ImagePath;
 		}
 	}
@@ -269,5 +273,5 @@
 	extern MDIINFO MdiInfo[MAX_WNDNUM];
 
-	WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum];
+	ActiveBasic::PM::WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum];
 
 	//変更情報
@@ -276,13 +280,7 @@
 
 	//子ウィンドウのメモリを解放
-	HeapDefaultFree(pWindowInfo->childWindowInfos[ItemNum]->IdName);
-	HeapDefaultFree(pWindowInfo->childWindowInfos[ItemNum]->caption);
-	if(pWindowInfo->childWindowInfos[ItemNum]->Control==CT_IMAGEBOX){
-		//イメージ ボックスの場合
-		HeapDefaultFree(pWindowInfo->childWindowInfos[ItemNum]->ImageCtrlInfo.path);
-	}
 	delete pWindowInfo->childWindowInfos[ItemNum];
 
-	std::vector<CHILDINFO *>::iterator it = pWindowInfo->childWindowInfos.begin();
+	ActiveBasic::PM::ChildWindowInfos::iterator it = pWindowInfo->childWindowInfos.begin();
 	for( int i=0; i<ItemNum; i++ )
 	{
@@ -346,5 +344,5 @@
 	RECT rect;
 
-	WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum];
+	ActiveBasic::PM::WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum];
 
 	hdc=GetDC(hwnd);
@@ -352,6 +350,7 @@
 	sw=0;
 	if(pobj_nv->bLineAdjust&&bLA){
-		for(i=0;i<pWindowInfo->childWindowInfos.size();i++){
-			const CHILDINFO *pChildInfo = pWindowInfo->childWindowInfos[i];
+		for( i=0; i<static_cast<int>(pWindowInfo->childWindowInfos.size()); i++ )
+		{
+			const ActiveBasic::PM::ChildWindowInfo *pChildInfo = pWindowInfo->childWindowInfos[i];
 			if(i==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) continue;
 			if(pChildInfo->Control !=
@@ -449,5 +448,5 @@
 	extern MDIINFO MdiInfo[MAX_WNDNUM];
 
-	WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum];
+	ActiveBasic::PM::WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum];
 
 	if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]==SELECT_WINDOW){
@@ -546,5 +545,5 @@
 	SCROLLINFO ScrollInfo;
 
-	WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum];
+	ActiveBasic::PM::WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum];
 
 	DestroyWindow(MdiInfo[WndNum].MdiRadInfo->hProp_Dlg);
@@ -607,9 +606,9 @@
 	int i;
 
-	WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum];
+	ActiveBasic::PM::WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum];
 
 	for(i=pWindowInfo->childWindowInfos.size()-1;i>=0;i--){
 		if(pWindowInfo->childWindowInfos[i]->Control==CT_COMBOBOX&&
-			(pWindowInfo->childWindowInfos[i]->style&0x000F)!=CBS_SIMPLE){
+			(pWindowInfo->childWindowInfos[i]->GetStyle()&0x000F)!=CBS_SIMPLE){
 			//コンボ ボックスの場合は表示部分をターゲットに選択する（高さ20pixel）
 			if(x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x&&
@@ -676,5 +675,5 @@
 	RECT rect;
 
-	WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum];
+	ActiveBasic::PM::WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum];
 
 	for(i=1;i<MAX_RAD_SELITEM;i++) MdiInfo[WndNum].MdiRadInfo->SelectingItem[i]=-1;
@@ -701,5 +700,5 @@
 	RECT rect;
 
-	WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum];
+	ActiveBasic::PM::WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum];
 
 	if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[1]!=-1){
@@ -762,5 +761,5 @@
 	SIZE NeedSize;
 
-	WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path);
+	ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path);
 
 	//必要な幅、高さを共に100ピクセル余裕を持たせる
@@ -817,5 +816,5 @@
 				i=GetWndNum(GetParent(hwnd));
 				i2 = GetWndInfoNum(MdiInfo[i].path);
-				WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
+				ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
 
 				if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
@@ -897,5 +896,5 @@
 				i=GetWndNum(hParent);
 				i2 = GetWndInfoNum(MdiInfo[i].path);
-				WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
+				ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
 
 				if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
@@ -966,5 +965,17 @@
 						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);
+						MdiInfo[i].MdiRadInfo->SelectingItem[0] = InsertDlgItem(
+							i,
+							i2,
+							-1,
+							&pos,
+							&size,
+							"CommandButton",
+							"Button",
+							WS_CHILD|WS_VISIBLE,0,CT_BUTTON,
+							ActiveBasic::PM::ImageReferenceType::File,
+							0,
+							1
+						);
 					}
 					if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_CHECKBOX){
@@ -985,5 +996,19 @@
 						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);
+						MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(
+							i,
+							i2,
+							-1,
+							&pos,
+							&size,
+							"CheckBox",
+							"Check",
+							WS_CHILD|WS_VISIBLE|BS_AUTOCHECKBOX,
+							0,
+							CT_CHECKBOX,
+							ActiveBasic::PM::ImageReferenceType::File,
+							0,
+							1
+						);
 					}
 					if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_COMBOBOX){
@@ -1004,5 +1029,19 @@
 						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);
+						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,
+							ActiveBasic::PM::ImageReferenceType::File,
+							0,
+							1
+						);
 					}
 					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_EDIT){
@@ -1023,5 +1062,18 @@
 						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);
+						MdiInfo[i].MdiRadInfo->SelectingItem[0] = InsertDlgItem(
+							i,
+							i2,
+							-1,
+							&pos,
+							&size,
+							"EditBox",
+							"",
+							WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,
+							CT_EDIT,
+							ActiveBasic::PM::ImageReferenceType::File,
+							0,
+							1
+						);
 					}
 					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_GROUPBOX){
@@ -1042,5 +1094,19 @@
 						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);
+						MdiInfo[i].MdiRadInfo->SelectingItem[0] = InsertDlgItem(
+							i,
+							i2,
+							-1,
+							&pos,
+							&size,
+							"GroupBox",
+							"Group",
+							WS_CHILD|WS_VISIBLE|BS_GROUPBOX,
+							0,
+							CT_GROUPBOX,
+							ActiveBasic::PM::ImageReferenceType::File,
+							0,
+							1
+						);
 					}
 					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_HSCROLLBAR){
@@ -1061,5 +1127,19 @@
 						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);
+						MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(
+							i,
+							i2,
+							-1,
+							&pos,
+							&size,
+							"HScrollBar",
+							"",
+							WS_CHILD|WS_VISIBLE|SBS_HORZ,
+							0,
+							CT_HSCROLLBAR,
+							ActiveBasic::PM::ImageReferenceType::File,
+							0,
+							1
+						);
 					}
 					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_IMAGEBOX){
@@ -1080,5 +1160,17 @@
 						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);
+						MdiInfo[i].MdiRadInfo->SelectingItem[0] = InsertDlgItem(
+							i,
+							i2,
+							-1,
+							&pos,
+							&size,
+							"ImageBox",
+							"",
+							WS_CHILD|WS_VISIBLE|SS_BLACKFRAME,0,CT_IMAGEBOX,
+							ActiveBasic::PM::ImageReferenceType::File,
+							0,
+							1
+						);
 					}
 					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_LISTBOX){
@@ -1099,5 +1191,18 @@
 						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);
+						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,
+							ActiveBasic::PM::ImageReferenceType::File,
+							0,
+							1
+						);
 					}
 					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_LISTVIEW){
@@ -1118,5 +1223,18 @@
 						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);
+						MdiInfo[i].MdiRadInfo->SelectingItem[0] = InsertDlgItem(
+							i,
+							i2,
+							-1,
+							&pos,
+							&size,
+							"ListView",
+							"",
+							WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,
+							CT_LISTVIEW,
+							ActiveBasic::PM::ImageReferenceType::File,
+							0,
+							1
+						);
 					}
 					if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_PROGRESSBAR){
@@ -1137,5 +1255,18 @@
 						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);
+						MdiInfo[i].MdiRadInfo->SelectingItem[0] = InsertDlgItem(
+							i,
+							i2,
+							-1,
+							&pos,
+							&size,
+							"ProgressBar",
+							"",
+							WS_CHILD|WS_VISIBLE,WS_EX_STATICEDGE,
+							CT_PROGRESSBAR,
+							ActiveBasic::PM::ImageReferenceType::File,
+							0,
+							1
+						);
 					}
 					if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_RADIOBUTTON){
@@ -1156,5 +1287,19 @@
 						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);
+						MdiInfo[i].MdiRadInfo->SelectingItem[0] = InsertDlgItem(
+							i,
+							i2,
+							-1,
+							&pos,
+							&size,
+							"RadioButton",
+							"radio",
+							WS_CHILD|WS_VISIBLE|BS_AUTORADIOBUTTON,
+							0,
+							CT_RADIOBUTTON,
+							ActiveBasic::PM::ImageReferenceType::File,
+							0,
+							1
+						);
 					}
 					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_STATIC){
@@ -1175,5 +1320,19 @@
 						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);
+						MdiInfo[i].MdiRadInfo->SelectingItem[0] = InsertDlgItem(
+							i,
+							i2,
+							-1,
+							&pos,
+							&size,
+							"Static",
+							"Text",
+							WS_CHILD|WS_VISIBLE,
+							0,
+							CT_STATIC,
+							ActiveBasic::PM::ImageReferenceType::File,
+							0,
+							1
+						);
 					}
 					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_TRACKBAR){
@@ -1194,5 +1353,19 @@
 						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);
+						MdiInfo[i].MdiRadInfo->SelectingItem[0] = InsertDlgItem(
+							i,
+							i2,
+							-1,
+							&pos,
+							&size,
+							"TrackBar",
+							"",
+							WS_CHILD|WS_VISIBLE|TBS_BOTH|TBS_NOTICKS,
+							0,
+							CT_TRACKBAR,
+							ActiveBasic::PM::ImageReferenceType::File,
+							0,
+							1
+						);
 					}
 					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_TREEVIEW){
@@ -1213,5 +1386,19 @@
 						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);
+						MdiInfo[i].MdiRadInfo->SelectingItem[0] = InsertDlgItem(
+							i,
+							i2,
+							-1,
+							&pos,
+							&size,
+							"TreeView",
+							"",
+							WS_CHILD|WS_VISIBLE,
+							WS_EX_CLIENTEDGE,
+							CT_TREEVIEW,
+							ActiveBasic::PM::ImageReferenceType::File,
+							0,
+							1
+						);
 					}
 					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_UPDOWN){
@@ -1232,5 +1419,19 @@
 						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);
+						MdiInfo[i].MdiRadInfo->SelectingItem[0] = InsertDlgItem(
+							i,
+							i2,
+							-1,
+							&pos,
+							&size,
+							"UpDown",
+							"",
+							WS_CHILD|WS_VISIBLE,
+							0,
+							CT_UPDOWN,
+							ActiveBasic::PM::ImageReferenceType::File,
+							0,
+							1
+						);
 					}
 					else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_VSCROLLBAR){
@@ -1251,5 +1452,19 @@
 						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);
+						MdiInfo[i].MdiRadInfo->SelectingItem[0] = InsertDlgItem(
+							i,
+							i2,
+							-1,
+							&pos,
+							&size,
+							"VScrollBar",
+							"",
+							WS_CHILD|WS_VISIBLE|SBS_VERT,
+							0,
+							CT_VSCROLLBAR,
+							ActiveBasic::PM::ImageReferenceType::File,
+							0,
+							1
+						);
 					}
 					SendMessage(GetWindow(MdiInfo[i].MdiRadInfo->hTools,GW_CHILD),WM_COMMAND,IDC_TOOL_MOUSE,0);
@@ -1275,5 +1490,5 @@
 				i=GetWndNum(hParent);
 				i2 = GetWndInfoNum(MdiInfo[i].path);
-				WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
+				ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
 
 				if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
@@ -1440,5 +1655,5 @@
 				i=GetWndNum(hParent);
 				i2=GetWndInfoNum(MdiInfo[i].path);
-				WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
+				ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
 				if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
 					if(MdiInfo[i].MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW){
@@ -1452,5 +1667,5 @@
 							sprintf(temporary,"%s_%s_Click",
 								pWindowInfo->GetName().c_str(),
-								pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName
+								pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->GetName().c_str()
 							);
 						}
@@ -1459,5 +1674,5 @@
 							sprintf(temporary,"%s_%s_EditChange",
 								pWindowInfo->GetName().c_str(),
-								pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
+								pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->GetName().c_str());
 						}
 						else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_EDIT)
@@ -1465,5 +1680,5 @@
 							sprintf(temporary,"%s_%s_Change",
 								pWindowInfo->GetName().c_str(),
-								pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
+								pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->GetName().c_str());
 						}
 						else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_LISTBOX)
@@ -1471,5 +1686,5 @@
 							sprintf(temporary,"%s_%s_SelChange",
 								pWindowInfo->GetName().c_str(),
-								pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName);
+								pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->GetName().c_str());
 						}
 						else temporary[0]=0;
@@ -1483,5 +1698,5 @@
 				hParent=GetParent(hwnd);
 				i=GetWndNum(hParent);
-				WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
+				ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
 				if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){
 					if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
