Index: trunk/ab5.0/abdev/abdev/RadToolsAndPropertyProc.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/RadToolsAndPropertyProc.cpp	(revision 616)
+++ trunk/ab5.0/abdev/abdev/RadToolsAndPropertyProc.cpp	(revision 617)
@@ -361,13 +361,13 @@
 				i=GetWndNum(GetWindow(hClient,GW_CHILD));
 				WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
-				sprintf(temporary,"h%s",pWindowInfo->name);
-				sprintf(temp2,"%sProc",pWindowInfo->name);
-				if(lstrcmp(temporary,pWindowInfo->HandleName)==0&&
+				sprintf(temporary,"h%s",pWindowInfo->GetName().c_str());
+				sprintf(temp2,"%sProc",pWindowInfo->GetName().c_str());
+				if( pWindowInfo->GetHandleName() == temporary &&
 					lstrcmp(temp2,pWindowInfo->CallBackName)==0){
 					SendDlgItemMessage(hwnd,IDC_AUTOSET,BM_SETCHECK,BST_CHECKED,0);
 					SendMessage(hwnd,WM_COMMAND,IDC_AUTOSET,0);
 				}
-				SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->name);
-				SetDlgItemText(hwnd,IDC_WINDOWHANDLE,pWindowInfo->HandleName);
+				SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->GetName().c_str());
+				SetDlgItemText(hwnd,IDC_WINDOWHANDLE,pWindowInfo->GetHandleName().c_str());
 				SetDlgItemText(hwnd,IDC_WINDOWPROC,pWindowInfo->CallBackName);
 				break;
@@ -397,11 +397,12 @@
 
 						RAD_UNDOSTATE_NAME names,NoticeNames;
+
 						i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWNAME))+1;
-						names.name=(char *)HeapAlloc(hHeap,0,i3);
-						GetDlgItemText(hwnd,IDC_WINDOWNAME,names.name,i3);
+						GetDlgItemText(hwnd,IDC_WINDOWNAME,temporary,i3);
+						names.name = temporary;
 
 						i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWHANDLE))+1;
-						names.HandleName=(char *)HeapAlloc(hHeap,0,i3);
-						GetDlgItemText(hwnd,IDC_WINDOWHANDLE,names.HandleName,i3);
+						GetDlgItemText(hwnd,IDC_WINDOWHANDLE,temporary,i3);
+						names.HandleName = temporary;
 
 						i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWPROC))+1;
@@ -409,9 +410,7 @@
 						GetDlgItemText(hwnd,IDC_WINDOWPROC,names.CallBackName,i3);
 
-						if(lstrcmp(names.name,pWindowInfo->name)==0&&
-							lstrcmp(names.HandleName,pWindowInfo->HandleName)==0&&
+						if( names.name == pWindowInfo->GetName() &&
+							pWindowInfo->GetHandleName() == names.HandleName &&
 							lstrcmp(names.CallBackName,pWindowInfo->CallBackName)==0){
-							HeapDefaultFree(names.name);
-							HeapDefaultFree(names.HandleName);
 							HeapDefaultFree(names.CallBackName);
 							SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
@@ -423,17 +422,15 @@
 
 						//変更情報を更新
-						NoticeNames.name=pWindowInfo->name;
-						NoticeNames.HandleName=pWindowInfo->HandleName;
+						NoticeNames.name=pWindowInfo->GetName();
+						NoticeNames.HandleName=pWindowInfo->GetHandleName();
 						NoticeNames.CallBackName=pWindowInfo->CallBackName;
 						Rad_NoticeChanging(i,RAD_UNDO_NAME,SELECT_WINDOW,(DWORD)&NoticeNames);
 
-						HeapDefaultFree(pWindowInfo->name);
-						pWindowInfo->name=names.name;
+						pWindowInfo->SetName( names.name );
 						GlobalFree(MdiInfo[i].path);
-						MdiInfo[i].path=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(names.name));
-						lstrcpy(MdiInfo[i].path,names.name);
-
-						HeapDefaultFree(pWindowInfo->HandleName);
-						pWindowInfo->HandleName=names.HandleName;
+						MdiInfo[i].path=(char *)GlobalAlloc(GMEM_FIXED,names.name.size()+1);
+						lstrcpy(MdiInfo[i].path,names.name.c_str());
+
+						pWindowInfo->SetHandleName( names.HandleName );
 
 						HeapDefaultFree(pWindowInfo->CallBackName);
@@ -558,6 +555,6 @@
 				WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
 
-				SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->name);
-				SetDlgItemText(hwnd,IDC_HANDLE,pWindowInfo->HandleName);
+				SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->GetName().c_str());
+				SetDlgItemText(hwnd,IDC_HANDLE,pWindowInfo->GetHandleName().c_str());
 				SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->caption);
 
@@ -705,6 +702,6 @@
 						i=GetWndNum(GetParent(GetParent(hwnd)));
 						WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);
-						SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->name);
-						SetDlgItemText(hwnd,IDC_HANDLE,pWindowInfo->HandleName);
+						SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->GetName().c_str());
+						SetDlgItemText(hwnd,IDC_HANDLE,pWindowInfo->GetHandleName().c_str());
 						return 1;
 					}
