Index: trunk/ab5.0/abdev/abdev/MessageCallOperation.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/MessageCallOperation.cpp	(revision 481)
+++ trunk/ab5.0/abdev/abdev/MessageCallOperation.cpp	(revision 609)
@@ -20,10 +20,12 @@
 	buffer[i]=0;
 	if(lstrcmp(EventName,"MenuClick")==0) return CT_MENU;
-	for(i=0;i<ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows;i++){
-		if(lstrcmp(buffer,ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].IdName)==0) break;
-	}
-	if(i==ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows) return 0;
-
-	return ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].Control;
+
+	WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
+	for(i=0;i<pWindowInfo->NumberOfChildWindows;i++){
+		if(lstrcmp(buffer,pWindowInfo->pChildInfo[i].IdName)==0) break;
+	}
+	if(i==pWindowInfo->NumberOfChildWindows) return 0;
+
+	return pWindowInfo->pChildInfo[i].Control;
 }
 char **GetProcedureNamesOfMessageCall(int WndInfoNum,ITEMEVENTINFO **ppItemEventInfo,int *num,BOOL *pbAlways){
@@ -33,8 +35,10 @@
 	char *buffer,**ppNames,temporary[MAX_PATH],temp2[MAX_PATH];
 
-	NameLen=lstrlen(ProjectInfo.pWindowInfo[WndInfoNum].name);
-	CallBackNameLen=lstrlen(ProjectInfo.pWindowInfo[WndInfoNum].CallBackName);
-
-	sprintf(temporary,"%s%s",ProjectInfo.dir,ProjectInfo.pWindowInfo[WndInfoNum].filepath);
+	WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
+
+	NameLen=lstrlen(pWindowInfo->name);
+	CallBackNameLen=lstrlen(pWindowInfo->CallBackName);
+
+	sprintf(temporary,"%s%s",ProjectInfo.dir,pWindowInfo->filepath);
 	buffer=ReadBuffer(temporary);
 
@@ -72,5 +76,5 @@
 				strncpy(temporary,buffer+i2,NameLen);
 				temporary[NameLen]=0;
-				if(lstrcmp(temporary,ProjectInfo.pWindowInfo[WndInfoNum].name)==0&&buffer[i2+NameLen]=='_'){
+				if(lstrcmp(temporary,pWindowInfo->name)==0&&buffer[i2+NameLen]=='_'){
 					for(i2+=NameLen+1,i3=0;;i2++,i3++){
 						if(!IsVariableChar(buffer[i2])){
@@ -113,5 +117,5 @@
 				i2+=9;
 				while(buffer[i2]==' '||buffer[i2]=='\t') i2++;
-				if(memicmp(buffer+i2,ProjectInfo.pWindowInfo[WndInfoNum].CallBackName,CallBackNameLen)==0&&
+				if(memicmp(buffer+i2,pWindowInfo->CallBackName,CallBackNameLen)==0&&
 					(buffer[i2+CallBackNameLen]==' '||buffer[i2+CallBackNameLen]=='\t'||buffer[i2+CallBackNameLen]=='(')){
 					*pbAlways=1;
@@ -132,5 +136,7 @@
 	POINT pos;
 
-	sprintf(temporary,"%s%s",ProjectInfo.dir,ProjectInfo.pWindowInfo[WndInfoNum].filepath);
+	WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
+
+	sprintf(temporary,"%s%s",ProjectInfo.dir,pWindowInfo->filepath);
 	hChild=OpenFileWithExtension(temporary);
 	if(!hChild) return;
@@ -217,4 +223,6 @@
 	char temporary[MAX_PATH];
 
+	WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
+
 	MaxCount=ListView_GetItemCount(hList);
 	if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
@@ -224,5 +232,5 @@
 					ListView_GetItemText(hList,i,0,temporary,MAX_PATH);
 					sprintf(EventName,"%s_%s",
-						ProjectInfo.pWindowInfo[WndInfoNum].name,
+						pWindowInfo->name,
 						temporary);
 					break;
@@ -263,5 +271,5 @@
 					ListView_GetItemText(hList,i,0,temporary,MAX_PATH);
 					sprintf(EventName,"%s_%s_MenuClick",
-						ProjectInfo.pWindowInfo[WndInfoNum].name,
+						pWindowInfo->name,
 						temporary);
 					break;
@@ -277,5 +285,5 @@
 					ListView_GetItemText(hList,i,0,temporary,MAX_PATH);
 					sprintf(EventName,"%s_%s",
-						ProjectInfo.pWindowInfo[WndInfoNum].name,
+						pWindowInfo->name,
 						temporary);
 					break;
@@ -292,6 +300,6 @@
 				ListView_GetItemText(hList,i,0,temporary,MAX_PATH);
 				sprintf(EventName,"%s_%s_%s",
-					ProjectInfo.pWindowInfo[WndInfoNum].name,
-					ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].IdName,
+					pWindowInfo->name,
+					pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].IdName,
 					temporary);
 				break;
@@ -300,5 +308,5 @@
 		if(i==MaxCount) return 0;
 
-		if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTVIEW){
+		if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTVIEW){
 			//ListView
 			if(i==0) lstrcpy(Parameter,"ByRef nmListView As NMLISTVIEW");
@@ -324,18 +332,18 @@
 			else if(i==20) lstrcpy(Parameter,"ByRef nmLVDispInfo As NMLVDISPINFO");
 		}
-		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){
 			//ProgressBar
 			lstrcpy(Parameter,"ByRef nmHdr As NMHDR");
 		}
-		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){
 			//TrackBar
 			lstrcpy(Parameter,"ByRef nmHdr As NMHDR");
 		}
-		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){
 			//TreeView
 			if(0<=i&&i<=7) lstrcpy(Parameter,"ByRef nmHdr As NMHDR");
 			else lstrcpy(Parameter,"ByRef nmTreeView As NMTREEVIEW");
 		}
-		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){
 			//UpDown
 			if(i==0) lstrcpy(Parameter,"ByRef nmHdr As NMHDR");
@@ -391,5 +399,5 @@
 	extern MDIINFO MdiInfo[MAX_WNDNUM];
 	extern PROJECTINFO ProjectInfo;
-	int i,i2,WndNum,WndInfoNum;
+	int i,i2,WndNum;
 	HWND hList;
 
@@ -399,5 +407,5 @@
 
 	WndNum=GetWndNum(GetWindow(hClient,GW_CHILD));
-	WndInfoNum=GetWndInfoNum(MdiInfo[WndNum].path);
+	WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path);
 	i=0;
 	if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
@@ -437,7 +445,7 @@
 			//メニュー イベント
 			SendDlgItemMessage(hDlg,IDC_MENU,BM_SETCHECK,BST_CHECKED,0);
-			if(ProjectInfo.pWindowInfo[WndInfoNum].MenuID){
+			if(pWindowInfo->MenuID){
 				int MenuInfoNum;
-				MenuInfoNum=GetMenuInfoNum(ProjectInfo.pWindowInfo[WndInfoNum].MenuID);
+				MenuInfoNum=GetMenuInfoNum(pWindowInfo->MenuID);
 				i=0;
 				i2=0;
@@ -456,15 +464,15 @@
 		EnableWindow(GetDlgItem(hDlg,IDC_MMSYS),0);
 		SendDlgItemMessage(hDlg,IDC_DEFAULT,BM_SETCHECK,BST_CHECKED,0);
-		if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_BUTTON){
+		if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_BUTTON){
 			//Button
 			InsertEventToList(hList,i++,"Click","BN_CLICKED","ﾎﾞﾀﾝがｸﾘｯｸされた時");
 			InsertEventToList(hList,i++,"DblClick","BN_DBLCLK","ﾎﾞﾀﾝがﾀﾞﾌﾞﾙ ｸﾘｯｸされた時");
 		}
-		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){
 			//CheckBox
 			InsertEventToList(hList,i++,"Click","BN_CLICKED","ﾁｪｯｸ ﾎﾞｯｸｽがｸﾘｯｸされた時");
 			InsertEventToList(hList,i++,"DblClick","BN_DBLCLK","ﾁｪｯｸ ﾎﾞｯｸｽがﾀﾞﾌﾞﾙ ｸﾘｯｸされた時");
 		}
-		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){
 			//ComboBox
 			InsertEventToList(hList,i++,"CloseUp","CBN_CLOSEUP","ﾘｽﾄ ﾎﾞｯｸｽが非表示になる時");
@@ -480,5 +488,5 @@
 			InsertEventToList(hList,i++,"SetFocus","CBN_SETFOCUS","入力ﾌｫｰｶｽを取得した時");
 		}
-		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){
 			//Edit
 			InsertEventToList(hList,i++,"Change","EN_CHANGE","ｴﾃﾞｨｯﾄ ﾎﾞｯｸｽの内容が変更された時（後処理）");
@@ -491,10 +499,10 @@
 			InsertEventToList(hList,i++,"VScroll","EN_VSCROLL","垂直ｽｸﾛｰﾙを行った時");
 		}
-		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){
 			//ImageBox
 			InsertEventToList(hList,i++,"Click","STN_CLICKED","ｲﾒｰｼﾞ ﾎﾞｯｸｽがｸﾘｯｸされた時");
 			InsertEventToList(hList,i++,"DblClick","STN_DBLCLK","ｲﾒｰｼﾞ ﾎﾞｯｸｽがﾀﾞﾌﾞﾙ ｸﾘｯｸされた時");
 		}
-		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){
 			//ListBox
 			InsertEventToList(hList,i++,"SelChange","LBN_SELCHANGE","ﾘｽﾄ内の選択が変更された時");
@@ -505,23 +513,23 @@
 			InsertEventToList(hList,i++,"SetFocus","LBN_SETFOCUS","入力ﾌｫｰｶｽを取得した時");
 		}
-		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){
 			//ListView
 			i=SetDefaultNotifyMessagesInList(hList,CT_LISTVIEW);
 		}
-		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){
 			//ProgressBar
 			InsertEventToList(hList,i++,"OutOfMemory","NM_OUTOFMEMORY","ﾒﾓﾘ不足でｺﾝﾄﾛｰﾙの動作が完了できない時");
 		}
-		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){
 			//RadioButton
 			InsertEventToList(hList,i++,"Click","BN_CLICKED","ﾗｼﾞｵ ﾎﾞﾀﾝがｸﾘｯｸされた時");
 			InsertEventToList(hList,i++,"DblClick","BN_DBLCLK","ﾗｼﾞｵ ﾎﾞﾀﾝがﾀﾞﾌﾞﾙ ｸﾘｯｸされた時");
 		}
-		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){
 			//Static
 			InsertEventToList(hList,i++,"Click","STN_CLICKED","ｽﾀﾃｨｯｸ ﾃｷｽﾄがｸﾘｯｸされた時");
 			InsertEventToList(hList,i++,"DblClick","STN_DBLCLK","ｽﾀﾃｨｯｸ ﾃｷｽﾄがﾀﾞﾌﾞﾙ ｸﾘｯｸされた時");
 		}
-		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){
 			//TrackBar
 			InsertEventToList(hList,i++,"OutOfMemory","NM_OUTOFMEMORY","ﾒﾓﾘ不足でｺﾝﾄﾛｰﾙの動作が完了できない時");
@@ -529,9 +537,9 @@
 			InsertEventToList(hList,i++,"CustomDraw","NM_CUSTOMDRAW ","ｶｽﾀﾑ描画操作の通知");
 		}
-		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){
 			//TreeView
 			i=SetDefaultNotifyMessagesInList(hList,CT_TREEVIEW);
 		}
-		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){
 			//UpDown
 			InsertEventToList(hList,i++,"OutOfMemory","NM_OUTOFMEMORY","ﾒﾓﾘ不足でｺﾝﾄﾛｰﾙの動作が完了できない時");
@@ -643,7 +651,9 @@
 			SetWindowLongPtr(GetDlgItem(hwnd,IDC_EVENTLIST),GWLP_WNDPROC,(long)EventListViewProc);
 
-			WndNum=GetWndNum(GetWindow(hClient,GW_CHILD));
-			WndInfoNum=GetWndInfoNum(MdiInfo[WndNum].path);
-			NowMenuNum=GetMenuInfoNum(ProjectInfo.pWindowInfo[WndInfoNum].MenuID);
+			{
+				WndNum=GetWndNum(GetWindow(hClient,GW_CHILD));
+				WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path);
+				NowMenuNum=GetMenuInfoNum(pWindowInfo->MenuID);
+			}
 			break;
 		case WM_COMMAND:
