Index: trunk/ab5.0/abdev/abdev/DrawWindow.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/DrawWindow.cpp	(revision 623)
+++ trunk/ab5.0/abdev/abdev/DrawWindow.cpp	(revision 624)
@@ -687,5 +687,5 @@
 	DeleteObject(hBmp);
 }
-void DesigningWindow(int WndNum,HDC hdc,POINT *pBasePos,const WindowInfo *pWindowInfo){
+void DesigningWindow(int WndNum,HDC hdc,POINT *pBasePos,const ActiveBasic::PM::WindowInfo *pWindowInfo){
 	extern MDIINFO MdiInfo[MAX_WNDNUM];
 	int i,i2,i3,i4;
@@ -713,5 +713,5 @@
 	InsideRect.bottom=InsideRect.top+pWindowInfo->size.cy;
 
-	if(pWindowInfo->style&(WS_BORDER|WS_THICKFRAME)){
+	if(pWindowInfo->GetStyle()&(WS_BORDER|WS_THICKFRAME)){
 		DrawEdge(hdc,&InsideRect,EDGE_RAISED,BF_RECT);
 
@@ -725,5 +725,5 @@
 	////////////
 	//枠を描画
-	if(pWindowInfo->style&(WS_BORDER|WS_THICKFRAME)){
+	if(pWindowInfo->GetStyle()&(WS_BORDER|WS_THICKFRAME)){
 		//細枠
 		hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_ACTIVEBORDER));
@@ -739,5 +739,5 @@
 
 		//サイズ変更枠
-		if(pWindowInfo->style&WS_THICKFRAME){
+		if(pWindowInfo->GetStyle()&WS_THICKFRAME){
 			Rectangle(hdc,InsideRect.left,InsideRect.top,InsideRect.right,InsideRect.bottom);
 
@@ -758,5 +758,5 @@
 	MdiInfo[WndNum].MdiRadInfo->ClientPos.y=0;
 
-	if(pWindowInfo->style&(WS_CAPTION&(~WS_BORDER))){
+	if(pWindowInfo->GetStyle()&(WS_CAPTION&(~WS_BORDER))){
 		//////////////////////
 		//タイトルバーを描画
@@ -773,5 +773,5 @@
 		}
 		else i2=i;
-		if(pWindowInfo->ExStyle&WS_EX_TOOLWINDOW)
+		if(pWindowInfo->GetExStyle()&WS_EX_TOOLWINDOW)
 			i3=GetSystemMetrics(SM_CYSMCAPTION);
 		else i3=GetSystemMetrics(SM_CYCAPTION);
@@ -805,10 +805,10 @@
 		rect.right=InsideRect.right;
 		rect.bottom=InsideRect.top+i3;
-		DrawText(hdc,pWindowInfo->caption,lstrlen(pWindowInfo->caption),&rect,DT_SINGLELINE|DT_VCENTER|DT_NOPREFIX);
+		DrawText(hdc,pWindowInfo->GetCaption().c_str(),pWindowInfo->GetCaption().size(),&rect,DT_SINGLELINE|DT_VCENTER|DT_NOPREFIX);
 		SelectObject(hdc,hOldFont);
 		DeleteObject(hFont);
 
 		//ボタン
-		if(pWindowInfo->style&WS_SYSMENU){
+		if(pWindowInfo->GetStyle()&WS_SYSMENU){
 			//終了ボタン
 			size.cx=GetSystemMetrics(SM_CXSIZE)-2;
@@ -857,5 +857,5 @@
 			GlobalFree(pByte2);
 
-			if(pWindowInfo->style&WS_MAXIMIZEBOX||pWindowInfo->style&WS_MINIMIZEBOX){
+			if(pWindowInfo->GetStyle()&WS_MAXIMIZEBOX||pWindowInfo->GetStyle()&WS_MINIMIZEBOX){
 				//最大化ボタン
 				size.cx=GetSystemMetrics(SM_CXSIZE)-2;
@@ -864,5 +864,5 @@
 				pos.y=InsideRect.top+2;
 				DrawButtonEdge(WndNum,&pos,&size);
-				if(!(pWindowInfo->style&WS_MAXIMIZEBOX)){
+				if(!(pWindowInfo->GetStyle()&WS_MAXIMIZEBOX)){
 					pos.x++;
 					pos.y++;
@@ -897,5 +897,5 @@
 				pos.y=InsideRect.top+2;
 				DrawButtonEdge(WndNum,&pos,&size);
-				if(!(pWindowInfo->style&WS_MINIMIZEBOX)){
+				if(!(pWindowInfo->GetStyle()&WS_MINIMIZEBOX)){
 					pos.x++;
 					pos.y++;
@@ -927,5 +927,6 @@
 	}
 
-	if(pWindowInfo->MenuID){
+	if( pWindowInfo->HasMenu() )
+	{
 		//メニューラインを3DFACEで描画
 		rgb=GetSysColor(COLOR_3DFACE);
@@ -954,8 +955,8 @@
 	size.cx=InsideRect.right-InsideRect.left;
 	size.cy=InsideRect.bottom-InsideRect.top;
-	DrawItemEdgeByExStyle(WndNum,pWindowInfo->ExStyle,&pos,&size);
+	DrawItemEdgeByExStyle(WndNum,pWindowInfo->GetExStyle(),&pos,&size);
 
 	//スクロールバーを描画
-	DrawWindowScrollBar(WndNum,pWindowInfo->style,&pos,&size);
+	DrawWindowScrollBar(WndNum,pWindowInfo->GetStyle(),&pos,&size);
 
 	//クライアント領域のサイズを設定
@@ -965,5 +966,5 @@
 	//////////////
 	//背景を描画
-	if(pWindowInfo->bgColor==COLOR_3DFACE){
+	if(pWindowInfo->GetBackgroundColor()==COLOR_3DFACE){
 		//3DFACE
 		hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DFACE));
@@ -977,8 +978,8 @@
 		DeleteObject(hBrush);
 	}
-	else if(pWindowInfo->bgColor<=0){
+	else if(pWindowInfo->GetBackgroundColor()<=0){
 		//色指定
-		hPen=CreatePen(PS_SOLID,0,-pWindowInfo->bgColor);
-		hBrush=CreateSolidBrush(-pWindowInfo->bgColor);
+		hPen=CreatePen(PS_SOLID,0,-pWindowInfo->GetBackgroundColor());
+		hBrush=CreateSolidBrush(-pWindowInfo->GetBackgroundColor());
 		hOldPen=(HPEN)SelectObject(hdc,hPen);
 		hOldBrush=(HBRUSH)SelectObject(hdc,hBrush);
@@ -989,27 +990,27 @@
 		DeleteObject(hBrush);
 	}
-	else if(pWindowInfo->bgColor>=0x1000){
+	else if(pWindowInfo->GetBackgroundColor()>=0x1000){
 		//ビットマップ
-		for(i2=0;i2<projectInfo.resourceManager.bitmapResources.size();i2++){
-			if( projectInfo.resourceManager.bitmapResources[pWindowInfo->bgColor-0x1000].idName == projectInfo.resourceManager.bitmapResources[i2].idName )
+		BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, projectInfo.resourceManager.bitmapResources )
+		{
+			if( projectInfo.resourceManager.bitmapResources[pWindowInfo->GetBackgroundColor()-0x1000].idName == resourceItem.idName )
 			{
+				lstrcpy(temporary,resourceItem.filepath.c_str());
+				lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
+				hImage=LoadImage(NULL,temporary,IMAGE_BITMAP,0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE);
+
+				hBrush=CreatePatternBrush((HBITMAP)hImage);
+				hOldBrush=(HBRUSH)SelectObject(hdc,hBrush);
+				SetBrushOrgEx(hdc,InsideRect.left,InsideRect.top,&pos);
+				PatBlt(hdc,
+					InsideRect.left, InsideRect.top,
+					InsideRect.right-InsideRect.left, InsideRect.bottom-InsideRect.top,PATCOPY);
+				SetBrushOrgEx(hdc,pos.x,pos.y,0);
+				SelectObject(hdc,hOldBrush);
+				DeleteObject(hBrush);
+				DeleteObject(hImage);
+
 				break;
 			}
-		}
-		if(i2!=projectInfo.resourceManager.bitmapResources.size()){
-			lstrcpy(temporary,projectInfo.resourceManager.bitmapResources[i2].filepath.c_str());
-			lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
-			hImage=LoadImage(NULL,temporary,IMAGE_BITMAP,0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE);
-
-			hBrush=CreatePatternBrush((HBITMAP)hImage);
-			hOldBrush=(HBRUSH)SelectObject(hdc,hBrush);
-			SetBrushOrgEx(hdc,InsideRect.left,InsideRect.top,&pos);
-			PatBlt(hdc,
-				InsideRect.left, InsideRect.top,
-				InsideRect.right-InsideRect.left, InsideRect.bottom-InsideRect.top,PATCOPY);
-			SetBrushOrgEx(hdc,pos.x,pos.y,0);
-			SelectObject(hdc,hOldBrush);
-			DeleteObject(hBrush);
-			DeleteObject(hImage);
 		}
 	}
@@ -1019,5 +1020,5 @@
 	//子ウィンドウ（ダイアログアイテム）を描画
 	hFont=CreateFontIndirect(&pWindowInfo->LogFont);
-	BOOST_FOREACH( CHILDINFO *pChildInfo, pWindowInfo->childWindowInfos )
+	BOOST_FOREACH( ActiveBasic::PM::ChildWindowInfo *pChildInfo, pWindowInfo->childWindowInfos )
 	{
 		pos=pChildInfo->pos;
@@ -1025,5 +1026,5 @@
 
 		//ExStyleによる縁を描画
-		DrawItemEdgeByExStyle(WndNum,pChildInfo->ExStyle,&pos,&size);
+		DrawItemEdgeByExStyle(WndNum,pChildInfo->GetExStyle(),&pos,&size);
 
 		if(pChildInfo->Control==CT_BUTTON){
@@ -1031,5 +1032,5 @@
 			// Button コントロール
 
-			if((pChildInfo->style&0x0000000F)==BS_DEFPUSHBUTTON){
+			if((pChildInfo->GetStyle()&0x0000000F)==BS_DEFPUSHBUTTON){
 				//標準のボタンの場合（黒枠描画）
 				DrawRectangleInClient(WndNum,
@@ -1046,5 +1047,5 @@
 			DrawButtonEdge(WndNum,&pos,&size);
 
-			if(!(pChildInfo->style&(BS_ICON|BS_BITMAP))){
+			if(!(pChildInfo->GetStyle()&(BS_ICON|BS_BITMAP))){
 				//キャプション テキスト
 
@@ -1054,21 +1055,21 @@
 				rect.bottom=pos.y+size.cy-2+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
 
-				if(pChildInfo->style&BS_MULTILINE) i4=0;
+				if(pChildInfo->GetStyle()&BS_MULTILINE) i4=0;
 				else i4=DT_SINGLELINE;
 
 				//ビットを考慮してBS_CENTERを最初に比較する
-				if((pChildInfo->style&BS_CENTER)==BS_CENTER) i2=DT_CENTER;
-				else if(pChildInfo->style&BS_LEFT) i2=DT_LEFT;
-				else if(pChildInfo->style&BS_RIGHT) i2=DT_RIGHT;
+				if((pChildInfo->GetStyle()&BS_CENTER)==BS_CENTER) i2=DT_CENTER;
+				else if(pChildInfo->GetStyle()&BS_LEFT) i2=DT_LEFT;
+				else if(pChildInfo->GetStyle()&BS_RIGHT) i2=DT_RIGHT;
 				else i2=DT_CENTER;
 
 				//ビットを考慮してBS_VCENTERを最初に比較する
-				if((pChildInfo->style&BS_VCENTER)==BS_VCENTER) i3=DT_VCENTER;
-				else if(pChildInfo->style&BS_TOP) i3=DT_TOP;
-				else if(pChildInfo->style&BS_BOTTOM) i3=DT_BOTTOM;
+				if((pChildInfo->GetStyle()&BS_VCENTER)==BS_VCENTER) i3=DT_VCENTER;
+				else if(pChildInfo->GetStyle()&BS_TOP) i3=DT_TOP;
+				else if(pChildInfo->GetStyle()&BS_BOTTOM) i3=DT_BOTTOM;
 				else i3=DT_VCENTER;
 
 				hOldFont=(HFONT)SelectObject(hdc,hFont);
-				if(pChildInfo->style&WS_DISABLED){
+				if(pChildInfo->GetStyle()&WS_DISABLED){
 					SetTextColor(hdc,RGB(255,255,255));
 					rc2.left=rect.left+1;
@@ -1076,10 +1077,10 @@
 					rc2.right=rect.right+1;
 					rc2.bottom=rect.bottom+1;
-					DrawText(hdc,pChildInfo->caption,-1,&rc2,i4|i2|i3);
+					DrawText(hdc,pChildInfo->GetCaption().c_str(),-1,&rc2,i4|i2|i3);
 					SetTextColor(hdc,GetSysColor(COLOR_GRAYTEXT));
 				}
 				else SetTextColor(hdc,GetSysColor(COLOR_BTNTEXT));
 
-				DrawText(hdc,pChildInfo->caption,-1,&rect,i4|i2|i3);
+				DrawText(hdc,pChildInfo->GetCaption().c_str(),-1,&rect,i4|i2|i3);
 				SelectObject(hdc,hOldFont);
 			}
@@ -1089,5 +1090,5 @@
 			// CheckBox コントロール
 
-			if(pChildInfo->style&BS_PUSHLIKE){
+			if(pChildInfo->GetStyle()&BS_PUSHLIKE){
 				//ボタンの縁を描画
 				DrawButtonEdge(WndNum,&pos,&size);
@@ -1097,17 +1098,17 @@
 				size2.cx=13;
 				size2.cy=13;
-				if(pChildInfo->style&BS_LEFTTEXT)
+				if(pChildInfo->GetStyle()&BS_LEFTTEXT)
 					pos2.x=pos.x+size.cx-size2.cx;
 				else pos2.x=pos.x;
-				if((pChildInfo->style&BS_VCENTER)==BS_VCENTER||
-					(pChildInfo->style&BS_VCENTER)==0)
+				if((pChildInfo->GetStyle()&BS_VCENTER)==BS_VCENTER||
+					(pChildInfo->GetStyle()&BS_VCENTER)==0)
 					pos2.y=pos.y+(size.cy/2)-(size2.cy/2);
-				else if(pChildInfo->style&BS_TOP)
+				else if(pChildInfo->GetStyle()&BS_TOP)
 					pos2.y=pos.y+1;
-				else if(pChildInfo->style&BS_BOTTOM)
+				else if(pChildInfo->GetStyle()&BS_BOTTOM)
 					pos2.y=pos.y+size.cy-size2.cy-1;
 				DrawItemEdgeByExStyle(WndNum,WS_EX_CLIENTEDGE,&pos2,&size2);
 
-				if(pChildInfo->style&WS_DISABLED)
+				if(pChildInfo->GetStyle()&WS_DISABLED)
 					rgb=GetSysColor(COLOR_3DFACE);
 				else rgb=GetSysColor(COLOR_WINDOW);
@@ -1115,10 +1116,10 @@
 					pos2.x+size2.cx, pos2.y+size2.cy,
 					rgb,rgb,1);
-				if(!(pChildInfo->style&BS_LEFTTEXT)) pos.x+=17;
+				if(!(pChildInfo->GetStyle()&BS_LEFTTEXT)) pos.x+=17;
 				else pos.x++;
 				size.cx-=17;
 			}
 
-			if(!(pChildInfo->style&(BS_ICON|BS_BITMAP))){
+			if(!(pChildInfo->GetStyle()&(BS_ICON|BS_BITMAP))){
 				//キャプション テキスト
 				rect.left=pos.x+1+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
@@ -1127,21 +1128,21 @@
 				rect.bottom=pos.y+size.cy-2+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
 
-				if(pChildInfo->style&BS_MULTILINE) i4=0;
+				if(pChildInfo->GetStyle()&BS_MULTILINE) i4=0;
 				else i4=DT_SINGLELINE;
 
 				//ビットを考慮してBS_CENTERを最初に比較する
-				if((pChildInfo->style&BS_CENTER)==BS_CENTER) i2=DT_CENTER;
-				else if(pChildInfo->style&BS_LEFT) i2=DT_LEFT;
-				else if(pChildInfo->style&BS_RIGHT) i2=DT_RIGHT;
+				if((pChildInfo->GetStyle()&BS_CENTER)==BS_CENTER) i2=DT_CENTER;
+				else if(pChildInfo->GetStyle()&BS_LEFT) i2=DT_LEFT;
+				else if(pChildInfo->GetStyle()&BS_RIGHT) i2=DT_RIGHT;
 				else i2=DT_LEFT;
 
 				//ビットを考慮してBS_VCENTERを最初に比較する
-				if((pChildInfo->style&BS_VCENTER)==BS_VCENTER) i3=DT_VCENTER;
-				else if(pChildInfo->style&BS_TOP) i3=DT_TOP;
-				else if(pChildInfo->style&BS_BOTTOM) i3=DT_BOTTOM;
+				if((pChildInfo->GetStyle()&BS_VCENTER)==BS_VCENTER) i3=DT_VCENTER;
+				else if(pChildInfo->GetStyle()&BS_TOP) i3=DT_TOP;
+				else if(pChildInfo->GetStyle()&BS_BOTTOM) i3=DT_BOTTOM;
 				else i3=DT_VCENTER;
 
 				hOldFont=(HFONT)SelectObject(hdc,hFont);
-				if(pChildInfo->style&WS_DISABLED){
+				if(pChildInfo->GetStyle()&WS_DISABLED){
 					SetTextColor(hdc,RGB(255,255,255));
 					rc2.left=rect.left+1;
@@ -1149,10 +1150,10 @@
 					rc2.right=rect.right+1;
 					rc2.bottom=rect.bottom+1;
-					DrawText(hdc,pChildInfo->caption,-1,&rc2,i4|i2|i3);
+					DrawText(hdc,pChildInfo->GetCaption().c_str(),-1,&rc2,i4|i2|i3);
 					SetTextColor(hdc,GetSysColor(COLOR_GRAYTEXT));
 				}
 				else SetTextColor(hdc,GetSysColor(COLOR_BTNTEXT));
 
-				DrawText(hdc,pChildInfo->caption,-1,&rect,i4|i2|i3);
+				DrawText(hdc,pChildInfo->GetCaption().c_str(),-1,&rect,i4|i2|i3);
 				SelectObject(hdc,hOldFont);
 			}
@@ -1168,5 +1169,5 @@
 
 			//内部
-			if(pChildInfo->style&WS_DISABLED)
+			if(pChildInfo->GetStyle()&WS_DISABLED)
 				rgb=GetSysColor(COLOR_3DFACE);
 			else rgb=GetSysColor(COLOR_WINDOW);
@@ -1176,5 +1177,5 @@
 				rgb,rgb,1);
 
-			if((pChildInfo->style&0x000F)==CBS_SIMPLE){
+			if((pChildInfo->GetStyle()&0x000F)==CBS_SIMPLE){
 				pos.y+=20;
 				size.cy-=20;
@@ -1202,5 +1203,5 @@
 
 				pos2.x--;
-				if(pChildInfo->style&WS_DISABLED){
+				if(pChildInfo->GetStyle()&WS_DISABLED){
 					hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT));
 					hOldPen=(HPEN)SelectObject(hdc,hPen);
@@ -1233,5 +1234,5 @@
 
 			//内部
-			if(pChildInfo->style&WS_DISABLED||pChildInfo->style&ES_READONLY)
+			if(pChildInfo->GetStyle()&WS_DISABLED||pChildInfo->GetStyle()&ES_READONLY)
 				rgb=GetSysColor(COLOR_3DFACE);
 			else rgb=GetSysColor(COLOR_WINDOW);
@@ -1247,14 +1248,14 @@
 			rect.bottom=pos.y+size.cy-1+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
 
-			if(pChildInfo->style&ES_MULTILINE) i4=0;
+			if(pChildInfo->GetStyle()&ES_MULTILINE) i4=0;
 			else i4=DT_SINGLELINE;
 
 			//ビットを考慮してES_LEFTを最後に検討する
-			if(pChildInfo->style&ES_CENTER) i2=DT_CENTER;
-			else if(pChildInfo->style&ES_RIGHT) i2=DT_RIGHT;
+			if(pChildInfo->GetStyle()&ES_CENTER) i2=DT_CENTER;
+			else if(pChildInfo->GetStyle()&ES_RIGHT) i2=DT_RIGHT;
 			else i2=DT_LEFT;
 
 			//文字色を設定
-			if(pChildInfo->style&WS_DISABLED)
+			if(pChildInfo->GetStyle()&WS_DISABLED)
 				SetTextColor(hdc,GetSysColor(COLOR_GRAYTEXT));
 			else
@@ -1262,5 +1263,5 @@
 
 			hOldFont=(HFONT)SelectObject(hdc,hFont);
-			DrawText(hdc,pChildInfo->caption,-1,&rect,i4|i2);
+			DrawText(hdc,pChildInfo->GetCaption().c_str(),-1,&rect,i4|i2);
 			SelectObject(hdc,hOldFont);
 		}
@@ -1271,5 +1272,5 @@
 
 			hOldFont=(HFONT)SelectObject(hdc,hFont);
-			GetTextExtentPoint32(hdc,pChildInfo->caption,lstrlen(pChildInfo->caption),&size2);
+			GetTextExtentPoint32(hdc,pChildInfo->GetCaption().c_str(),pChildInfo->GetCaption().size(),&size2);
 
 			//枠を描画
@@ -1281,9 +1282,9 @@
 
 			//ビットを考慮してBS_CENTERを最初に検討する
-			if((pChildInfo->style&BS_CENTER)==BS_CENTER){
+			if((pChildInfo->GetStyle()&BS_CENTER)==BS_CENTER){
 				rect.left=pos.x+(size.cx/2)-(size2.cx/2)-3;
 				rect.right=rect.left+size2.cx+4;
 			}
-			else if(pChildInfo->style&BS_RIGHT){
+			else if(pChildInfo->GetStyle()&BS_RIGHT){
 				rect.right=pos.x+size.cx-7;
 				rect.left=rect.right-size2.cx-4;
@@ -1296,9 +1297,9 @@
 			rect.bottom=pos.y+size2.cy;
 
-			if(pWindowInfo->bgColor==COLOR_3DFACE) rgb=GetSysColor(COLOR_3DFACE);
-			else rgb=-pWindowInfo->bgColor;
+			if(pWindowInfo->GetBackgroundColor()==COLOR_3DFACE) rgb=GetSysColor(COLOR_3DFACE);
+			else rgb=-pWindowInfo->GetBackgroundColor();
 			DrawRectangleInClient(WndNum,rect.left,rect.top,rect.right,rect.bottom,rgb,rgb,1);
 
-			if(!((pChildInfo->style&BS_ICON)||(pChildInfo->style&BS_BITMAP))){
+			if(!((pChildInfo->GetStyle()&BS_ICON)||(pChildInfo->GetStyle()&BS_BITMAP))){
 				rect.left+=MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
 				rect.top+=MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
@@ -1309,5 +1310,5 @@
 
 				//テキストを描画
-				if(pChildInfo->style&WS_DISABLED){
+				if(pChildInfo->GetStyle()&WS_DISABLED){
 					SetTextColor(hdc,RGB(255,255,255));
 					rc2.left=rect.left+1;
@@ -1315,5 +1316,5 @@
 					rc2.right=rect.right+1;
 					rc2.bottom=rect.bottom+1;
-					DrawText(hdc,pChildInfo->caption,-1,&rc2,DT_SINGLELINE);
+					DrawText(hdc,pChildInfo->GetCaption().c_str(),-1,&rc2,DT_SINGLELINE);
 					SetTextColor(hdc,GetSysColor(COLOR_GRAYTEXT));
 				}
@@ -1321,5 +1322,5 @@
 					SetTextColor(hdc,GetSysColor(COLOR_BTNTEXT));
 
-				DrawText(hdc,pChildInfo->caption,-1,&rect,DT_SINGLELINE);
+				DrawText(hdc,pChildInfo->GetCaption().c_str(),-1,&rect,DT_SINGLELINE);
 			}
 			SelectObject(hdc,hOldFont);
@@ -1329,5 +1330,5 @@
 			////////////////////////////////////
 			// 水平スクロールバー コントロール
-			DrawScrollBar(WndNum,pChildInfo->style,0,&pos,&size);
+			DrawScrollBar(WndNum,pChildInfo->GetStyle(),0,&pos,&size);
 		}
 
@@ -1337,11 +1338,11 @@
 			HDC memdc;
 
-			if((pChildInfo->style&0x0000000F)==SS_BLACKFRAME)
+			if((pChildInfo->GetStyle()&0x0000000F)==SS_BLACKFRAME)
 				DrawRectangleInClient(WndNum,pos.x,pos.y,pos.x+size.cx,pos.y+size.cy,RGB(0,0,0),0,0);
-			else if((pChildInfo->style&0x0000000F)==SS_GRAYFRAME)
+			else if((pChildInfo->GetStyle()&0x0000000F)==SS_GRAYFRAME)
 				DrawRectangleInClient(WndNum,pos.x,pos.y,pos.x+size.cx,pos.y+size.cy,GetSysColor(COLOR_3DSHADOW),0,0);
-			else if((pChildInfo->style&0x0000000F)==SS_WHITEFRAME)
+			else if((pChildInfo->GetStyle()&0x0000000F)==SS_WHITEFRAME)
 				DrawRectangleInClient(WndNum,pos.x,pos.y,pos.x+size.cx,pos.y+size.cy,RGB(255,255,255),0,0);
-			else if((pChildInfo->style&0x0000001F)==SS_ETCHEDFRAME){
+			else if((pChildInfo->GetStyle()&0x0000001F)==SS_ETCHEDFRAME){
 				rect.left=pos.x+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
 				rect.top=pos.y+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
@@ -1350,24 +1351,32 @@
 				DrawEdge(hdc,&rect,EDGE_ETCHED,BF_RECT);
 			}
-			else if((pChildInfo->style&0x0000000F)==SS_BLACKRECT)
+			else if((pChildInfo->GetStyle()&0x0000000F)==SS_BLACKRECT)
 				DrawRectangleInClient(WndNum,pos.x,pos.y,pos.x+size.cx,pos.y+size.cy,GetSysColor(COLOR_3DDKSHADOW),GetSysColor(COLOR_3DDKSHADOW),1);
-			else if((pChildInfo->style&0x0000000F)==SS_GRAYRECT)
+			else if((pChildInfo->GetStyle()&0x0000000F)==SS_GRAYRECT)
 				DrawRectangleInClient(WndNum,pos.x,pos.y,pos.x+size.cx,pos.y+size.cy,GetSysColor(COLOR_3DSHADOW),GetSysColor(COLOR_3DSHADOW),1);
-			else if((pChildInfo->style&0x0000000F)==SS_WHITERECT)
+			else if((pChildInfo->GetStyle()&0x0000000F)==SS_WHITERECT)
 				DrawRectangleInClient(WndNum,pos.x,pos.y,pos.x+size.cx,pos.y+size.cy,RGB(255,255,255),RGB(255,255,255),1);
-			else if((pChildInfo->style&0x0000000F)==SS_ICON){
-				if(pChildInfo->ImageCtrlInfo.type==IMGTYPE_FILE)
-					lstrcpy(temporary,pChildInfo->ImageCtrlInfo.path);
-				else{
-					for(i2=0;i2<projectInfo.resourceManager.iconResources.size();i2++)
+			else if((pChildInfo->GetStyle()&0x0000000F)==SS_ICON)
+			{
+				if(pChildInfo->image.IsFile())
+				{
+					lstrcpy(temporary,pChildInfo->image.path.c_str());
+				}
+				else
+				{
+					bool isMatch = false;
+					BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, projectInfo.resourceManager.iconResources )
 					{
-						if( projectInfo.resourceManager.iconResources[i2].idName == pChildInfo->ImageCtrlInfo.path )
+						if( resourceItem.idName == pChildInfo->image.path )
 						{
+							isMatch = true;
+							lstrcpy(temporary,resourceItem.filepath.c_str());
 							break;
 						}
 					}
-					if(i2==projectInfo.resourceManager.iconResources.size()) goto NonIconImage;
-
-					lstrcpy(temporary,projectInfo.resourceManager.iconResources[i2].filepath.c_str());
+					if( !isMatch )
+					{
+						goto NonIconImage;
+					}
 				}
 				lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
@@ -1380,5 +1389,5 @@
 
 					//ExStyleによる縁を再描画
-					DrawItemEdgeByExStyle(WndNum,pChildInfo->ExStyle,&pos,&size);
+					DrawItemEdgeByExStyle(WndNum,pChildInfo->GetExStyle(),&pos,&size);
 
 					DrawIcon(hdc,
@@ -1401,19 +1410,26 @@
 				}
 			}
-			else if((pChildInfo->style&0x0000000F)==SS_BITMAP){
+			else if((pChildInfo->GetStyle()&0x0000000F)==SS_BITMAP){
 				BITMAP Bitmap;
 
-				if(pChildInfo->ImageCtrlInfo.type==IMGTYPE_FILE)
-					lstrcpy(temporary,pChildInfo->ImageCtrlInfo.path);
+				if(pChildInfo->image.IsFile())
+				{
+					lstrcpy(temporary,pChildInfo->image.path.c_str());
+				}
 				else{
-					for(i2=0;i2<projectInfo.resourceManager.bitmapResources.size();i2++){
-						if( projectInfo.resourceManager.bitmapResources[i2].idName == pChildInfo->ImageCtrlInfo.path )
+					bool isMatch = false;
+					BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, projectInfo.resourceManager.bitmapResources )
+					{
+						if( resourceItem.idName == pChildInfo->image.path )
 						{
+							lstrcpy(temporary,resourceItem.filepath.c_str());
+							isMatch = true;
 							break;
 						}
 					}
-					if(i2==projectInfo.resourceManager.bitmapResources.size()) goto NonBitmapImage;
-
-					lstrcpy(temporary,projectInfo.resourceManager.bitmapResources[i2].filepath.c_str());
+					if( !isMatch )
+					{
+						goto NonBitmapImage;
+					}
 				}
 				lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() );
@@ -1428,5 +1444,5 @@
 
 					//ExStyleによる縁を再描画
-					DrawItemEdgeByExStyle(WndNum,pChildInfo->ExStyle,&pos,&size);
+					DrawItemEdgeByExStyle(WndNum,pChildInfo->GetExStyle(),&pos,&size);
 
 					memdc=CreateCompatibleDC(hdc);
@@ -1461,5 +1477,5 @@
 
 			//内部
-			if(pChildInfo->style&WS_DISABLED)
+			if(pChildInfo->GetStyle()&WS_DISABLED)
 				rgb=GetSysColor(COLOR_3DFACE);
 			else rgb=GetSysColor(COLOR_WINDOW);
@@ -1469,6 +1485,6 @@
 				rgb,rgb,1);
 
-			if(pChildInfo->style&LBS_DISABLENOSCROLL)
-				DrawWindowScrollBar(WndNum,pChildInfo->style|WS_DISABLED,&pos,&size);
+			if(pChildInfo->GetStyle()&LBS_DISABLENOSCROLL)
+				DrawWindowScrollBar(WndNum,pChildInfo->GetStyle()|WS_DISABLED,&pos,&size);
 		}
 
@@ -1478,5 +1494,5 @@
 
 			//内部
-			if(pChildInfo->style&WS_DISABLED)
+			if(pChildInfo->GetStyle()&WS_DISABLED)
 				rgb=GetSysColor(COLOR_3DFACE);
 			else rgb=GetSysColor(COLOR_WINDOW);
@@ -1486,6 +1502,6 @@
 				rgb,rgb,1);
 
-			if((pChildInfo->style&LVS_REPORT)&&
-				(!((pChildInfo->style&LVS_LIST)==LVS_LIST))){
+			if((pChildInfo->GetStyle()&LVS_REPORT)&&
+				(!((pChildInfo->GetStyle()&LVS_LIST)==LVS_LIST))){
 				//レポート ビュー
 				size.cy=16;
@@ -1504,6 +1520,6 @@
 			size.cy-=2;
 			rgb=GetSysColor(COLOR_ACTIVECAPTION);
-			if(pChildInfo->style&PBS_SMOOTH){
-				if(pChildInfo->style&PBS_VERTICAL){
+			if(pChildInfo->GetStyle()&PBS_SMOOTH){
+				if(pChildInfo->GetStyle()&PBS_VERTICAL){
 					pos.y+=(long)((double)size.cy*0.3);
 					DrawRectangleInClient(WndNum,
@@ -1520,5 +1536,5 @@
 			}
 			else{
-				if(pChildInfo->style&PBS_VERTICAL){
+				if(pChildInfo->GetStyle()&PBS_VERTICAL){
 					pos.y+=(long)((double)size.cy*0.3);
 					i3=(size.cx*2)/3;
@@ -1548,5 +1564,5 @@
 			// RadioButton コントロール
 
-			if(pChildInfo->style&BS_PUSHLIKE){
+			if(pChildInfo->GetStyle()&BS_PUSHLIKE){
 				//ボタンの縁を描画
 				DrawButtonEdge(WndNum,&pos,&size);
@@ -1556,13 +1572,13 @@
 				size2.cx=12;
 				size2.cy=12;
-				if(pChildInfo->style&BS_LEFTTEXT)
+				if(pChildInfo->GetStyle()&BS_LEFTTEXT)
 					pos2.x=pos.x+size.cx-size2.cx;
 				else pos2.x=pos.x+1;
-				if((pChildInfo->style&BS_VCENTER)==BS_VCENTER||
-					(pChildInfo->style&BS_VCENTER)==0)
+				if((pChildInfo->GetStyle()&BS_VCENTER)==BS_VCENTER||
+					(pChildInfo->GetStyle()&BS_VCENTER)==0)
 					pos2.y=pos.y+(size.cy/2)-(size2.cy/2);
-				else if(pChildInfo->style&BS_TOP)
+				else if(pChildInfo->GetStyle()&BS_TOP)
 					pos2.y=pos.y+1;
-				else if(pChildInfo->style&BS_BOTTOM)
+				else if(pChildInfo->GetStyle()&BS_BOTTOM)
 					pos2.y=pos.y+size.cy-size2.cy-1;
 
@@ -1575,6 +1591,6 @@
 
 					if(rgb==RGB(255,255,0)){
-						if(pWindowInfo->bgColor==COLOR_3DFACE) rgb=GetSysColor(COLOR_3DFACE);
-						else rgb=-pWindowInfo->bgColor;
+						if(pWindowInfo->GetBackgroundColor()==COLOR_3DFACE) rgb=GetSysColor(COLOR_3DFACE);
+						else rgb=-pWindowInfo->GetBackgroundColor();
 					}
 
@@ -1589,5 +1605,5 @@
 					//内部
 					else if(rgb==RGB(255,255,255)){
-						if(pChildInfo->style&WS_DISABLED) rgb=GetSysColor(COLOR_3DFACE);
+						if(pChildInfo->GetStyle()&WS_DISABLED) rgb=GetSysColor(COLOR_3DFACE);
 					}
 
@@ -1607,10 +1623,10 @@
 				GlobalFree(pByte2);
 
-				if(!(pChildInfo->style&BS_LEFTTEXT)) pos.x+=17;
+				if(!(pChildInfo->GetStyle()&BS_LEFTTEXT)) pos.x+=17;
 				else pos.x++;
 				size.cx-=17;
 			}
 
-			if(!(pChildInfo->style&(BS_ICON|BS_BITMAP))){
+			if(!(pChildInfo->GetStyle()&(BS_ICON|BS_BITMAP))){
 				//キャプション テキスト
 				rect.left=pos.x+1+MdiInfo[WndNum].MdiRadInfo->ClientPos.x;
@@ -1619,21 +1635,21 @@
 				rect.bottom=pos.y+size.cy-2+MdiInfo[WndNum].MdiRadInfo->ClientPos.y;
 
-				if(pChildInfo->style&BS_MULTILINE) i4=0;
+				if(pChildInfo->GetStyle()&BS_MULTILINE) i4=0;
 				else i4=DT_SINGLELINE;
 
 				//ビットを考慮してBS_CENTERを最初に比較する
-				if((pChildInfo->style&BS_CENTER)==BS_CENTER) i2=DT_CENTER;
-				else if(pChildInfo->style&BS_LEFT) i2=DT_LEFT;
-				else if(pChildInfo->style&BS_RIGHT) i2=DT_RIGHT;
+				if((pChildInfo->GetStyle()&BS_CENTER)==BS_CENTER) i2=DT_CENTER;
+				else if(pChildInfo->GetStyle()&BS_LEFT) i2=DT_LEFT;
+				else if(pChildInfo->GetStyle()&BS_RIGHT) i2=DT_RIGHT;
 				else i2=DT_LEFT;
 
 				//ビットを考慮してBS_VCENTERを最初に比較する
-				if((pChildInfo->style&BS_VCENTER)==BS_VCENTER) i3=DT_VCENTER;
-				else if(pChildInfo->style&BS_TOP) i3=DT_TOP;
-				else if(pChildInfo->style&BS_BOTTOM) i3=DT_BOTTOM;
+				if((pChildInfo->GetStyle()&BS_VCENTER)==BS_VCENTER) i3=DT_VCENTER;
+				else if(pChildInfo->GetStyle()&BS_TOP) i3=DT_TOP;
+				else if(pChildInfo->GetStyle()&BS_BOTTOM) i3=DT_BOTTOM;
 				else i3=DT_VCENTER;
 
 				hOldFont=(HFONT)SelectObject(hdc,hFont);
-				if(pChildInfo->style&WS_DISABLED){
+				if(pChildInfo->GetStyle()&WS_DISABLED){
 					SetTextColor(hdc,RGB(255,255,255));
 					rc2.left=rect.left+1;
@@ -1641,10 +1657,10 @@
 					rc2.right=rect.right+1;
 					rc2.bottom=rect.bottom+1;
-					DrawText(hdc,pChildInfo->caption,-1,&rc2,i4|i2|i3);
+					DrawText(hdc,pChildInfo->GetCaption().c_str(),-1,&rc2,i4|i2|i3);
 					SetTextColor(hdc,GetSysColor(COLOR_GRAYTEXT));
 				}
 				else SetTextColor(hdc,GetSysColor(COLOR_BTNTEXT));
 
-				DrawText(hdc,pChildInfo->caption,-1,&rect,i4|i2|i3);
+				DrawText(hdc,pChildInfo->GetCaption().c_str(),-1,&rect,i4|i2|i3);
 				SelectObject(hdc,hOldFont);
 			}
@@ -1662,10 +1678,10 @@
 
 			//ビットを考慮してSS_LEFTを最後に検討する
-			if(pChildInfo->style&SS_CENTER) i2=DT_CENTER;
-			else if(pChildInfo->style&SS_RIGHT) i2=DT_RIGHT;
+			if(pChildInfo->GetStyle()&SS_CENTER) i2=DT_CENTER;
+			else if(pChildInfo->GetStyle()&SS_RIGHT) i2=DT_RIGHT;
 			else i2=DT_LEFT;
 
 			hOldFont=(HFONT)SelectObject(hdc,hFont);
-			if(pChildInfo->style&WS_DISABLED){
+			if(pChildInfo->GetStyle()&WS_DISABLED){
 				SetTextColor(hdc,RGB(255,255,255));
 				rc2.left=rect.left+1;
@@ -1673,5 +1689,5 @@
 				rc2.right=rect.right+1;
 				rc2.bottom=rect.bottom+1;
-				DrawText(hdc,pChildInfo->caption,-1,&rc2,i2);
+				DrawText(hdc,pChildInfo->GetCaption().c_str(),-1,&rc2,i2);
 				SetTextColor(hdc,GetSysColor(COLOR_GRAYTEXT));
 			}
@@ -1680,9 +1696,9 @@
 
 			//折り返すかどうか
-			if(!(pChildInfo->style&SS_LEFTNOWORDWRAP)){
+			if(!(pChildInfo->GetStyle()&SS_LEFTNOWORDWRAP)){
 				i2|=DT_WORDBREAK;
 			}
 
-			DrawText(hdc,pChildInfo->caption,-1,&rect,i2);
+			DrawText(hdc,pChildInfo->GetCaption().c_str(),-1,&rect,i2);
 			SelectObject(hdc,hOldFont);
 		}
@@ -1692,5 +1708,5 @@
 			// TrackBar コントロール
 
-			if(pChildInfo->style&TBS_VERT){
+			if(pChildInfo->GetStyle()&TBS_VERT){
 				pos.x+=2;
 				size.cx-=2;
@@ -1731,5 +1747,5 @@
 
 			//内部
-			if(pChildInfo->style&WS_DISABLED)
+			if(pChildInfo->GetStyle()&WS_DISABLED)
 				rgb=GetSysColor(COLOR_3DFACE);
 			else rgb=GetSysColor(COLOR_WINDOW);
@@ -1743,7 +1759,7 @@
 			///////////////////////////////
 			// アップ ダウン コントロール
-			if(pChildInfo->style&UDS_HORZ)
-				DrawUpDownControl(WndNum,pChildInfo->style,0,&pos,&size);
-			else DrawUpDownControl(WndNum,pChildInfo->style,1,&pos,&size);
+			if(pChildInfo->GetStyle()&UDS_HORZ)
+				DrawUpDownControl(WndNum,pChildInfo->GetStyle(),0,&pos,&size);
+			else DrawUpDownControl(WndNum,pChildInfo->GetStyle(),1,&pos,&size);
 		}
 
@@ -1751,10 +1767,10 @@
 			////////////////////////////////////
 			// 垂直スクロールバー コントロール
-			DrawScrollBar(WndNum,pChildInfo->style,1,&pos,&size);
+			DrawScrollBar(WndNum,pChildInfo->GetStyle(),1,&pos,&size);
 		}
 	}
 	DeleteObject(hFont);
 }
-void DrawRadWindow(int WndNum,const WindowInfo *pWindowInfo){
+void DrawRadWindow(int WndNum,const ActiveBasic::PM::WindowInfo *pWindowInfo){
 	extern MDIINFO MdiInfo[MAX_WNDNUM];
 	HBRUSH hOldBrush;
