Changeset 617 in dev
- Timestamp:
- May 19, 2008, 4:31:37 PM (17 years ago)
- Location:
- trunk/ab5.0/abdev/abdev
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/abdev/Common.h
r615 r617 257 257 258 258 struct RAD_UNDOSTATE_NAME{ 259 char *name;260 char *HandleName;259 std::string name; 260 std::string HandleName; 261 261 char *CallBackName; 262 262 }; -
trunk/ab5.0/abdev/abdev/MessageCallOperation.cpp
r616 r617 38 38 WindowInfo *pWindowInfo = ProjectInfo.windowInfos[WndInfoNum]; 39 39 40 NameLen= lstrlen(pWindowInfo->name);40 NameLen=pWindowInfo->GetName().size(); 41 41 CallBackNameLen=lstrlen(pWindowInfo->CallBackName); 42 42 … … 77 77 strncpy(temporary,buffer+i2,NameLen); 78 78 temporary[NameLen]=0; 79 if( lstrcmp(temporary,pWindowInfo->name)==0&&buffer[i2+NameLen]=='_'){79 if( pWindowInfo->GetName() == temporary && buffer[i2+NameLen] == '_' ){ 80 80 for(i2+=NameLen+1,i3=0;;i2++,i3++){ 81 81 if(!IsVariableChar(buffer[i2])){ … … 231 231 ListView_GetItemText(hList,i,0,temporary,MAX_PATH); 232 232 sprintf(EventName,"%s_%s", 233 pWindowInfo-> name,233 pWindowInfo->GetName().c_str(), 234 234 temporary); 235 235 break; … … 270 270 ListView_GetItemText(hList,i,0,temporary,MAX_PATH); 271 271 sprintf(EventName,"%s_%s_MenuClick", 272 pWindowInfo-> name,272 pWindowInfo->GetName().c_str(), 273 273 temporary); 274 274 break; … … 284 284 ListView_GetItemText(hList,i,0,temporary,MAX_PATH); 285 285 sprintf(EventName,"%s_%s", 286 pWindowInfo-> name,286 pWindowInfo->GetName().c_str(), 287 287 temporary); 288 288 break; … … 299 299 ListView_GetItemText(hList,i,0,temporary,MAX_PATH); 300 300 sprintf(EventName,"%s_%s_%s", 301 pWindowInfo-> name,301 pWindowInfo->GetName().c_str(), 302 302 pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]]->IdName, 303 303 temporary); -
trunk/ab5.0/abdev/abdev/ProjectControl.cpp
r616 r617 250 250 251 251 //"%s ウィンドウをプロジェクトから削除します。よろしいですか?" 252 sprintf(str,STRING_PJ_CHECK_DELETEWINDOW,ProjectInfo.windowInfos[i]-> name);252 sprintf(str,STRING_PJ_CHECK_DELETEWINDOW,ProjectInfo.windowInfos[i]->GetName().c_str()); 253 253 if(IDCANCEL==MessageBox(hOwner,str,APPLICATION_NAME,MB_OKCANCEL|MB_ICONEXCLAMATION)) break; 254 254 … … 1055 1055 WindowInfos windowInfos; 1056 1056 windowInfos.push_back( new WindowInfo() ); 1057 windowInfos.back()-> name="MainWnd";1058 windowInfos.back()-> HandleName="hMainWnd";1057 windowInfos.back()->SetName( "MainWnd" ); 1058 windowInfos.back()->SetHandleName( "hMainWnd" ); 1059 1059 windowInfos.back()->pos.x=CW_USEDEFAULT; 1060 1060 windowInfos.back()->pos.y=CW_USEDEFAULT; … … 1080 1080 ProjectInfo.NumberOfMenu=0; 1081 1081 SaveWindowFile( temporary, windowInfos ); 1082 1083 windowInfos.Clear(); 1082 1084 } 1083 1085 … … 1207 1209 tv.item.iImage=2; 1208 1210 tv.item.iSelectedImage=2; 1209 tv.item.pszText = pWindowInfo->name; 1211 char temporary[1024]; 1212 lstrcpy( temporary, pWindowInfo->GetName().c_str() ); 1213 tv.item.pszText = temporary; 1210 1214 pWindowInfo->hTreeItem=TreeView_InsertItem(hMaterialTreeView,&tv); 1211 1215 } … … 1581 1585 else if(lstrcmpi(temporary,"rad")==0){ 1582 1586 for(i3=0;i3<static_cast<int>(ProjectInfo.windowInfos.size());i3++){ 1583 if(lstrcmpi(ProjectInfo.windowInfos[i3]-> name,temp2)==0){1587 if(lstrcmpi(ProjectInfo.windowInfos[i3]->GetName().c_str(),temp2)==0){ 1584 1588 NewRadWindow( *ProjectInfo.windowInfos[i3] ); 1585 1589 break; … … 1703 1707 else if(lstrcmpi(temporary,"rad")==0){ 1704 1708 for(i3=0;i3<static_cast<int>(ProjectInfo.windowInfos.size());i3++){ 1705 if(lstrcmpi(ProjectInfo.windowInfos[i3]-> name,temp2)==0){1709 if(lstrcmpi(ProjectInfo.windowInfos[i3]->GetName().c_str(),temp2)==0){ 1706 1710 NewRadWindow( *ProjectInfo.windowInfos[i3] ); 1707 1711 break; … … 1896 1900 BOOST_FOREACH( const WindowInfo *pWindowInfo, ProjectInfo.windowInfos ) 1897 1901 { 1898 if( lstrcmp(MdiInfo[WndNum].path, pWindowInfo->name)==0){1902 if( pWindowInfo->GetName() == MdiInfo[WndNum].path ){ 1899 1903 SendMessage(hCloseChild,WM_CLOSE,0,0); 1900 1904 break; … … 1931 1935 BOOST_FOREACH( WindowInfo *pWindowInfo, ProjectInfo.windowInfos ) 1932 1936 { 1933 HeapDefaultFree(pWindowInfo->name);1934 HeapDefaultFree(pWindowInfo->HandleName);1935 1937 HeapDefaultFree(pWindowInfo->caption); 1936 1938 HeapDefaultFree(pWindowInfo->ClassName); … … 2043 2045 BOOST_FOREACH( WindowInfo *pWindowInfo, ProjectInfo.windowInfos ) 2044 2046 { 2045 if(lstrcmpi(MdiInfo[WndNum].path,pWindowInfo-> name)==0){2047 if(lstrcmpi(MdiInfo[WndNum].path,pWindowInfo->GetName().c_str())==0){ 2046 2048 sprintf(buffer+i2,"rad,%s\r\n",MdiInfo[WndNum].path); 2047 2049 i2+=lstrlen(buffer+i2); -
trunk/ab5.0/abdev/abdev/RadProc.cpp
r616 r617 19 19 i=GetWndNum(hChild); 20 20 if(MdiInfo[i].DocType==WNDTYPE_RAD){ 21 if(lstrcmpi(MdiInfo[i].path,windowInfo. name)==0) break;21 if(lstrcmpi(MdiInfo[i].path,windowInfo.GetName().c_str())==0) break; 22 22 } 23 23 hChild=GetNextWindow(hChild,GW_HWNDNEXT); … … 28 28 } 29 29 30 mdic.szTitle=windowInfo. name;30 mdic.szTitle=windowInfo.GetName().c_str(); 31 31 mdic.szClass="MDIClientWindow_Rad"; 32 32 mdic.hOwner=hInst; … … 85 85 MdiInfo[i].hwnd=hChild; 86 86 MdiInfo[i].DocType=WNDTYPE_RAD; 87 MdiInfo[i].title=(char *)GlobalAlloc(GMEM_FIXED, lstrlen(windowInfo.name)+1);88 lstrcpy(MdiInfo[i].title,windowInfo. name);89 MdiInfo[i].path=(char *)GlobalAlloc(GMEM_FIXED, lstrlen(windowInfo.name)+1);90 lstrcpy(MdiInfo[i].path,windowInfo. name);87 MdiInfo[i].title=(char *)GlobalAlloc(GMEM_FIXED,windowInfo.GetName().size()+1); 88 lstrcpy(MdiInfo[i].title,windowInfo.GetName().c_str()); 89 MdiInfo[i].path=(char *)GlobalAlloc(GMEM_FIXED,windowInfo.GetName().size()+1); 90 lstrcpy(MdiInfo[i].path,windowInfo.GetName().c_str()); 91 91 92 92 … … 141 141 ResizeToRadToolWindows(i,rect.right,rect.bottom); 142 142 143 i=SendMessage(hDocCombo,CB_ADDSTRING,0,(long)windowInfo. name); //Docコンボボックスに追加143 i=SendMessage(hDocCombo,CB_ADDSTRING,0,(long)windowInfo.GetName().c_str()); //Docコンボボックスに追加 144 144 SendMessage(hDocCombo,CB_SETCURSEL,i,0); 145 145 146 146 //タブに追加 147 pobj_MainTab->InsertItem( windowInfo. name, true );147 pobj_MainTab->InsertItem( windowInfo.GetName().c_str(), true ); 148 148 149 149 //メニュー状態を設定 … … 268 268 extern HANDLE hHeap; 269 269 extern MDIINFO MdiInfo[MAX_WNDNUM]; 270 int i;271 270 272 271 WindowInfo *pWindowInfo = ProjectInfo.windowInfos[WndInfoNum]; … … 1449 1448 pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_IMAGEBOX|| 1450 1449 pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_RADIOBUTTON|| 1451 pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_STATIC){ 1452 sprintf(temporary,"%s_%s_Click",pWindowInfo->name,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName); 1450 pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_STATIC) 1451 { 1452 sprintf(temporary,"%s_%s_Click", 1453 pWindowInfo->GetName().c_str(), 1454 pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName 1455 ); 1453 1456 } 1454 1457 else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_COMBOBOX) 1455 sprintf(temporary,"%s_%s_EditChange",pWindowInfo->name,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName); 1458 { 1459 sprintf(temporary,"%s_%s_EditChange", 1460 pWindowInfo->GetName().c_str(), 1461 pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName); 1462 } 1456 1463 else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_EDIT) 1457 sprintf(temporary,"%s_%s_Change",pWindowInfo->name,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName); 1464 { 1465 sprintf(temporary,"%s_%s_Change", 1466 pWindowInfo->GetName().c_str(), 1467 pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName); 1468 } 1458 1469 else if(pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->Control==CT_LISTBOX) 1459 sprintf(temporary,"%s_%s_SelChange",pWindowInfo->name,pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName); 1470 { 1471 sprintf(temporary,"%s_%s_SelChange", 1472 pWindowInfo->GetName().c_str(), 1473 pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[0]]->IdName); 1474 } 1460 1475 else temporary[0]=0; 1461 1476 if(temporary[0]) SelectProcedureOfMessageCall(i2,temporary,temp2); -
trunk/ab5.0/abdev/abdev/RadSupport.cpp
r616 r617 66 66 hWnd=CreateWindowEx(pWindowInfo->ExStyle, 67 67 "TestWindow", 68 pWindowInfo-> name,68 pWindowInfo->GetName().c_str(), 69 69 pWindowInfo->style|WS_VISIBLE, 70 70 CW_USEDEFAULT,CW_USEDEFAULT, -
trunk/ab5.0/abdev/abdev/RadToolsAndPropertyProc.cpp
r616 r617 361 361 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 362 362 WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path); 363 sprintf(temporary,"h%s",pWindowInfo-> name);364 sprintf(temp2,"%sProc",pWindowInfo-> name);365 if( lstrcmp(temporary,pWindowInfo->HandleName)==0&&363 sprintf(temporary,"h%s",pWindowInfo->GetName().c_str()); 364 sprintf(temp2,"%sProc",pWindowInfo->GetName().c_str()); 365 if( pWindowInfo->GetHandleName() == temporary && 366 366 lstrcmp(temp2,pWindowInfo->CallBackName)==0){ 367 367 SendDlgItemMessage(hwnd,IDC_AUTOSET,BM_SETCHECK,BST_CHECKED,0); 368 368 SendMessage(hwnd,WM_COMMAND,IDC_AUTOSET,0); 369 369 } 370 SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo-> name);371 SetDlgItemText(hwnd,IDC_WINDOWHANDLE,pWindowInfo-> HandleName);370 SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->GetName().c_str()); 371 SetDlgItemText(hwnd,IDC_WINDOWHANDLE,pWindowInfo->GetHandleName().c_str()); 372 372 SetDlgItemText(hwnd,IDC_WINDOWPROC,pWindowInfo->CallBackName); 373 373 break; … … 397 397 398 398 RAD_UNDOSTATE_NAME names,NoticeNames; 399 399 400 i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWNAME))+1; 400 names.name=(char *)HeapAlloc(hHeap,0,i3);401 GetDlgItemText(hwnd,IDC_WINDOWNAME,names.name,i3);401 GetDlgItemText(hwnd,IDC_WINDOWNAME,temporary,i3); 402 names.name = temporary; 402 403 403 404 i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWHANDLE))+1; 404 names.HandleName=(char *)HeapAlloc(hHeap,0,i3);405 GetDlgItemText(hwnd,IDC_WINDOWHANDLE,names.HandleName,i3);405 GetDlgItemText(hwnd,IDC_WINDOWHANDLE,temporary,i3); 406 names.HandleName = temporary; 406 407 407 408 i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWPROC))+1; … … 409 410 GetDlgItemText(hwnd,IDC_WINDOWPROC,names.CallBackName,i3); 410 411 411 if( lstrcmp(names.name,pWindowInfo->name)==0&&412 lstrcmp(names.HandleName,pWindowInfo->HandleName)==0&&412 if( names.name == pWindowInfo->GetName() && 413 pWindowInfo->GetHandleName() == names.HandleName && 413 414 lstrcmp(names.CallBackName,pWindowInfo->CallBackName)==0){ 414 HeapDefaultFree(names.name);415 HeapDefaultFree(names.HandleName);416 415 HeapDefaultFree(names.CallBackName); 417 416 SendMessage(hwnd,WM_COMMAND,IDCANCEL,0); … … 423 422 424 423 //変更情報を更新 425 NoticeNames.name=pWindowInfo-> name;426 NoticeNames.HandleName=pWindowInfo-> HandleName;424 NoticeNames.name=pWindowInfo->GetName(); 425 NoticeNames.HandleName=pWindowInfo->GetHandleName(); 427 426 NoticeNames.CallBackName=pWindowInfo->CallBackName; 428 427 Rad_NoticeChanging(i,RAD_UNDO_NAME,SELECT_WINDOW,(DWORD)&NoticeNames); 429 428 430 HeapDefaultFree(pWindowInfo->name); 431 pWindowInfo->name=names.name; 429 pWindowInfo->SetName( names.name ); 432 430 GlobalFree(MdiInfo[i].path); 433 MdiInfo[i].path=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(names.name)); 434 lstrcpy(MdiInfo[i].path,names.name); 435 436 HeapDefaultFree(pWindowInfo->HandleName); 437 pWindowInfo->HandleName=names.HandleName; 431 MdiInfo[i].path=(char *)GlobalAlloc(GMEM_FIXED,names.name.size()+1); 432 lstrcpy(MdiInfo[i].path,names.name.c_str()); 433 434 pWindowInfo->SetHandleName( names.HandleName ); 438 435 439 436 HeapDefaultFree(pWindowInfo->CallBackName); … … 558 555 WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path); 559 556 560 SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo-> name);561 SetDlgItemText(hwnd,IDC_HANDLE,pWindowInfo-> HandleName);557 SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->GetName().c_str()); 558 SetDlgItemText(hwnd,IDC_HANDLE,pWindowInfo->GetHandleName().c_str()); 562 559 SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->caption); 563 560 … … 705 702 i=GetWndNum(GetParent(GetParent(hwnd))); 706 703 WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path); 707 SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo-> name);708 SetDlgItemText(hwnd,IDC_HANDLE,pWindowInfo-> HandleName);704 SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->GetName().c_str()); 705 SetDlgItemText(hwnd,IDC_HANDLE,pWindowInfo->GetHandleName().c_str()); 709 706 return 1; 710 707 } -
trunk/ab5.0/abdev/abdev/Rad_UndoRedo.cpp
r616 r617 41 41 case RAD_UNDO_NAME: 42 42 if(pUndoState->SelectItemNum[pUndoState->NowPos]==SELECT_WINDOW){ 43 RAD_UNDOSTATE_NAME *names ;44 names=(RAD_UNDOSTATE_NAME *)pUndoState->lpdwData[pUndoState->NowPos]; 45 46 temporary=pWindowInfo->name;47 pWindowInfo->name=names->name;48 names->name=temporary; 43 RAD_UNDOSTATE_NAME *names = (RAD_UNDOSTATE_NAME *)pUndoState->lpdwData[pUndoState->NowPos]; 44 45 std::string tempStr = pWindowInfo->GetName(); 46 pWindowInfo->SetName( names->name ); 47 names->name = tempStr; 48 49 49 GlobalFree(MdiInfo[WndNum].path); 50 MdiInfo[WndNum].path=(char *)GlobalAlloc(GMEM_FIXED, lstrlen(pWindowInfo->name)+1);51 lstrcpy(MdiInfo[WndNum].path,pWindowInfo-> name);52 53 temp orary=pWindowInfo->HandleName;54 pWindowInfo-> HandleName=names->HandleName;55 names->HandleName =temporary;50 MdiInfo[WndNum].path=(char *)GlobalAlloc(GMEM_FIXED,pWindowInfo->GetName().size()+1); 51 lstrcpy(MdiInfo[WndNum].path,pWindowInfo->GetName().c_str()); 52 53 tempStr = pWindowInfo->GetHandleName(); 54 pWindowInfo->SetHandleName( names->HandleName ); 55 names->HandleName = tempStr; 56 56 57 57 temporary=pWindowInfo->CallBackName; … … 225 225 case RAD_UNDO_NAME: 226 226 if(pUndoState->SelectItemNum[pUndoState->NowPos]==SELECT_WINDOW){ 227 RAD_UNDOSTATE_NAME *names ;228 names=(RAD_UNDOSTATE_NAME *)pUndoState->lpdwData[pUndoState->NowPos]; 229 230 temporary=pWindowInfo->name;231 pWindowInfo->name=names->name;232 names->name=temporary; 227 RAD_UNDOSTATE_NAME *names = (RAD_UNDOSTATE_NAME *)pUndoState->lpdwData[pUndoState->NowPos]; 228 229 std::string tempStr = pWindowInfo->GetName(); 230 pWindowInfo->SetName( names->name ); 231 names->name = tempStr; 232 233 233 GlobalFree(MdiInfo[WndNum].path); 234 MdiInfo[WndNum].path=(char *)GlobalAlloc(GMEM_FIXED, lstrlen(pWindowInfo->name)+1);235 lstrcpy(MdiInfo[WndNum].path,pWindowInfo-> name);236 237 temp orary=pWindowInfo->HandleName;238 pWindowInfo-> HandleName=names->HandleName;239 names->HandleName =temporary;234 MdiInfo[WndNum].path=(char *)GlobalAlloc(GMEM_FIXED,pWindowInfo->GetName().size()+1); 235 lstrcpy(MdiInfo[WndNum].path,pWindowInfo->GetName().c_str()); 236 237 tempStr = pWindowInfo->GetHandleName(); 238 pWindowInfo->SetHandleName( names->HandleName ); 239 names->HandleName = tempStr; 240 240 241 241 temporary=pWindowInfo->CallBackName; … … 399 399 case RAD_UNDO_NAME: 400 400 if(pUndoState->SelectItemNum[pos]==SELECT_WINDOW){ 401 RAD_UNDOSTATE_NAME *names; 402 names=(RAD_UNDOSTATE_NAME *)pUndoState->lpdwData[pos]; 403 HeapDefaultFree(names->name); 404 HeapDefaultFree(names->HandleName); 401 RAD_UNDOSTATE_NAME *names = (RAD_UNDOSTATE_NAME *)pUndoState->lpdwData[pos]; 405 402 HeapDefaultFree(names->CallBackName); 406 HeapDefaultFree(names);403 delete names; 407 404 } 408 405 else HeapDefaultFree((void *)pUndoState->lpdwData[pos]); … … 477 474 case RAD_UNDO_NAME: 478 475 if(SelectItemNum==SELECT_WINDOW){ 479 RAD_UNDOSTATE_NAME *names,*SaveNames; 480 names=(RAD_UNDOSTATE_NAME *)dwData; 481 SaveNames=(RAD_UNDOSTATE_NAME *)HeapAlloc(hHeap,0,sizeof(RAD_UNDOSTATE_NAME)); 482 SaveNames->name=(char *)HeapAlloc(hHeap,0,lstrlen(names->name)+1); 483 lstrcpy(SaveNames->name,names->name); 484 SaveNames->HandleName=(char *)HeapAlloc(hHeap,0,lstrlen(names->HandleName)+1); 485 lstrcpy(SaveNames->HandleName,names->HandleName); 476 RAD_UNDOSTATE_NAME *names = (RAD_UNDOSTATE_NAME *)dwData; 477 RAD_UNDOSTATE_NAME *SaveNames = new RAD_UNDOSTATE_NAME(); 478 SaveNames->name = names->name; 479 SaveNames->HandleName = names->HandleName; 486 480 SaveNames->CallBackName=(char *)HeapAlloc(hHeap,0,lstrlen(names->CallBackName)+1); 487 481 lstrcpy(SaveNames->CallBackName,names->CallBackName); -
trunk/ab5.0/abdev/abdev/WindowControl.cpp
r616 r617 15 15 int GetWndInfoNum(char *name){ 16 16 for( int i=0;i<static_cast<int>(ProjectInfo.windowInfos.size());i++){ 17 if(lstrcmpi(name,ProjectInfo.windowInfos[i]-> name)==0) return i;17 if(lstrcmpi(name,ProjectInfo.windowInfos[i]->GetName().c_str())==0) return i; 18 18 } 19 19 return -1; … … 23 23 BOOST_FOREACH( WindowInfo *pWindowInfo, ProjectInfo.windowInfos ) 24 24 { 25 if(lstrcmpi(name,pWindowInfo-> name)==0) return pWindowInfo;25 if(lstrcmpi(name,pWindowInfo->GetName().c_str())==0) return pWindowInfo; 26 26 } 27 27 return NULL; … … 374 374 sprintf(Command+i2,"%s\t\tCase %s\r\n",spaces,temporary); 375 375 i2+=lstrlen(Command+i2); 376 sprintf(Command+i2,"%s\t\t\t%s_%s_%s(ByVal (pnmHdr As VoidPtr))\r\n",spaces,pWindowInfo->name,pItemEventInfo[i].IdName,pItemEventInfo[i].pEventNames[i3]); 376 sprintf(Command+i2,"%s\t\t\t%s_%s_%s(ByVal (pnmHdr As VoidPtr))\r\n", 377 spaces, 378 pWindowInfo->GetName().c_str(), 379 pItemEventInfo[i].IdName,pItemEventInfo[i].pEventNames[i3] 380 ); 377 381 i2+=lstrlen(Command+i2); 378 382 } … … 446 450 i2+=lstrlen(Command+i2); 447 451 if(pItemEventInfo[i].ClassID==CT_MENU){ 448 sprintf(Command+i2,"%s\t%s_%s_MenuClick()\r\n",spaces,pWindowInfo-> name,pItemEventInfo[i].IdName);452 sprintf(Command+i2,"%s\t%s_%s_MenuClick()\r\n",spaces,pWindowInfo->GetName().c_str(),pItemEventInfo[i].IdName); 449 453 i2+=lstrlen(Command+i2); 450 454 for(i3=0;i3<pItemEventInfo[i].EventNum;i3++) … … 458 462 sprintf(Command+i2,"%s\t\tCase %s\r\n",spaces,temporary); 459 463 i2+=lstrlen(Command+i2); 460 sprintf(Command+i2,"%s\t\t\t%s_%s_%s()\r\n",spaces,pWindowInfo-> name,pItemEventInfo[i].IdName,pItemEventInfo[i].pEventNames[i3]);464 sprintf(Command+i2,"%s\t\t\t%s_%s_%s()\r\n",spaces,pWindowInfo->GetName().c_str(),pItemEventInfo[i].IdName,pItemEventInfo[i].pEventNames[i3]); 461 465 i2+=lstrlen(Command+i2); 462 466 HeapDefaultFree(pItemEventInfo[i].pEventNames[i3]); … … 533 537 sprintf(Command,"%sCase WM_ACTIVATE\r\n",spaces); 534 538 i=lstrlen(Command); 535 sprintf(Command+i,"%s\t%s_%s(LOWORD(wParam),HIWORD(wParam))\r\n",spaces,pWindowInfo-> name,MessageName);539 sprintf(Command+i,"%s\t%s_%s(LOWORD(wParam),HIWORD(wParam))\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 536 540 } 537 541 else if(lstrcmp(MessageName,"Create")==0){ … … 541 545 i=lstrlen(Command); 542 546 543 sprintf(Command+i,"%s\t%s=hWnd\r\n",spaces,pWindowInfo-> HandleName);547 sprintf(Command+i,"%s\t%s=hWnd\r\n",spaces,pWindowInfo->GetHandleName().c_str()); 544 548 i+=lstrlen(Command+i); 545 549 … … 587 591 spaces, 588 592 pChildInfo->IdName, 589 pWindowInfo-> name);593 pWindowInfo->GetName().c_str()); 590 594 i+=lstrlen(Command+i); 591 595 … … 598 602 sprintf(Command+i,"%s\thImage_%s_%s=LoadImage(GetWindowLongPtr(hWnd,GWLP_HINSTANCE) As HINSTANCE,\"%s\",IMAGE_ICON,0,0,LR_DEFAULTSIZE or LR_LOADFROMFILE)\r\n", 599 603 spaces, 600 pWindowInfo-> name,604 pWindowInfo->GetName().c_str(), 601 605 pChildInfo->IdName, 602 606 pChildInfo->ImageCtrlInfo.path); … … 628 632 sprintf(Command+i,"%s\thImage_%s_%s=LoadImage(GetWindowLongPtr(hWnd,GWLP_HINSTANCE) As HINSTANCE,ImageFilePath,IMAGE_ICON,0,0,LR_DEFAULTSIZE or LR_LOADFROMFILE)\r\n", 629 633 spaces, 630 pWindowInfo-> name,634 pWindowInfo->GetName().c_str(), 631 635 pChildInfo->IdName); 632 636 } … … 636 640 sprintf(Command+i,"%s\thImage_%s_%s=LoadImage(GetWindowLongPtr(hWnd,GWLP_HINSTANCE) As HINSTANCE,%s As *Byte,IMAGE_ICON,0,0,LR_DEFAULTSIZE)\r\n", 637 641 spaces, 638 pWindowInfo-> name,642 pWindowInfo->GetName().c_str(), 639 643 pChildInfo->IdName, 640 644 pChildInfo->ImageCtrlInfo.path); … … 644 648 spaces, 645 649 pChildInfo->IdName, 646 pWindowInfo-> name,650 pWindowInfo->GetName().c_str(), 647 651 pChildInfo->IdName); 648 652 i+=lstrlen(Command+i); … … 654 658 sprintf(Command+i,"%s\thImage_%s_%s=LoadImage(GetWindowLongPtr(hWnd,GWLP_HINSTANCE) As HINSTANCE,\"%s\",IMAGE_BITMAP,0,0,LR_DEFAULTSIZE or LR_LOADFROMFILE)\r\n", 655 659 spaces, 656 pWindowInfo-> name,660 pWindowInfo->GetName().c_str(), 657 661 pChildInfo->IdName, 658 662 pChildInfo->ImageCtrlInfo.path); … … 684 688 sprintf(Command+i,"%s\thImage_%s_%s=LoadImage(GetWindowLongPtr(hWnd,GWLP_HINSTANCE) As HINSTANCE,ImageFilePath,IMAGE_BITMAP,0,0,LR_LOADFROMFILE)\r\n", 685 689 spaces, 686 pWindowInfo-> name,690 pWindowInfo->GetName().c_str(), 687 691 pChildInfo->IdName); 688 692 } … … 692 696 sprintf(Command+i,"%s\thImage_%s_%s=LoadImage(GetWindowLongPtr(hWnd,GWLP_HINSTANCE) As HINSTANCE,%s As *Byte,IMAGE_BITMAP,0,0,LR_DEFAULTSIZE)\r\n", 693 697 spaces, 694 pWindowInfo-> name,698 pWindowInfo->GetName().c_str(), 695 699 pChildInfo->IdName, 696 700 pChildInfo->ImageCtrlInfo.path); … … 700 704 spaces, 701 705 pChildInfo->IdName, 702 pWindowInfo-> name,706 pWindowInfo->GetName().c_str(), 703 707 pChildInfo->IdName); 704 708 i+=lstrlen(Command+i); … … 709 713 710 714 if(bProcedureCall) 711 sprintf(Command+i,"%s\t%s_%s(ByVal (lParam As VoidPtr))\r\n",spaces,pWindowInfo-> name,MessageName);715 sprintf(Command+i,"%s\t%s_%s(ByVal (lParam As VoidPtr))\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 712 716 return WM_CREATE; 713 717 } … … 716 720 i=lstrlen(Command); 717 721 if(bProcedureCall){ 718 sprintf(Command+i,"%s\t%s_%s()\r\n",spaces,pWindowInfo-> name,MessageName);722 sprintf(Command+i,"%s\t%s_%s()\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 719 723 i+=lstrlen(Command+i); 720 724 } … … 736 740 if(pChildInfo->Control==CT_IMAGEBOX){ 737 741 if((pChildInfo->style&0x000F)==SS_ICON) 738 sprintf(Command+i,"%s\tDestroyIcon(hImage_%s_%s)\r\n",spaces,pWindowInfo-> name,pChildInfo->IdName);742 sprintf(Command+i,"%s\tDestroyIcon(hImage_%s_%s)\r\n",spaces,pWindowInfo->GetName().c_str(),pChildInfo->IdName); 739 743 else if((pChildInfo->style&0x000F)==SS_BITMAP) 740 sprintf(Command+i,"%s\tDeleteObject(hImage_%s_%s)\r\n",spaces,pWindowInfo-> name,pChildInfo->IdName);744 sprintf(Command+i,"%s\tDeleteObject(hImage_%s_%s)\r\n",spaces,pWindowInfo->GetName().c_str(),pChildInfo->IdName); 741 745 i+=lstrlen(Command+i); 742 746 } … … 747 751 sprintf(Command,"%sCase WM_DROPFILES\r\n",spaces); 748 752 i=lstrlen(Command); 749 sprintf(Command+i,"%s\t%s_%s(wParam As HDROP)\r\n",spaces,pWindowInfo-> name,MessageName);753 sprintf(Command+i,"%s\t%s_%s(wParam As HDROP)\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 750 754 } 751 755 else if(lstrcmp(MessageName,"HScroll")==0){ 752 756 sprintf(Command,"%sCase WM_HSCROLL\r\n",spaces); 753 757 i=lstrlen(Command); 754 sprintf(Command+i,"%s\t%s_%s(LOWORD(wParam),HIWORD(wParam),lParam As HWND)\r\n",spaces,pWindowInfo-> name,MessageName);758 sprintf(Command+i,"%s\t%s_%s(LOWORD(wParam),HIWORD(wParam),lParam As HWND)\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 755 759 } 756 760 else if(lstrcmp(MessageName,"KeyDown")==0){ 757 761 sprintf(Command,"%sCase WM_KEYDOWN\r\n",spaces); 758 762 i=lstrlen(Command); 759 sprintf(Command+i,"%s\t%s_%s(wParam As Long,lParam As Long)\r\n",spaces,pWindowInfo-> name,MessageName);763 sprintf(Command+i,"%s\t%s_%s(wParam As Long,lParam As Long)\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 760 764 } 761 765 else if(lstrcmp(MessageName,"KeyPress")==0){ 762 766 sprintf(Command,"%sCase WM_CHAR\r\n",spaces); 763 767 i=lstrlen(Command); 764 sprintf(Command+i,"%s\t%s_%s(wParam As Long,lParam As Long)\r\n",spaces,pWindowInfo-> name,MessageName);768 sprintf(Command+i,"%s\t%s_%s(wParam As Long,lParam As Long)\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 765 769 } 766 770 else if(lstrcmp(MessageName,"KeyUp")==0){ 767 771 sprintf(Command,"%sCase WM_KEYUP\r\n",spaces); 768 772 i=lstrlen(Command); 769 sprintf(Command+i,"%s\t%s_%s(wParam As Long,lParam As Long)\r\n",spaces,pWindowInfo-> name,MessageName);773 sprintf(Command+i,"%s\t%s_%s(wParam As Long,lParam As Long)\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 770 774 } 771 775 else if(lstrcmp(MessageName,"LButtonDown")==0){ 772 776 sprintf(Command,"%sCase WM_LBUTTONDOWN\r\n",spaces); 773 777 i=lstrlen(Command); 774 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo-> name,MessageName);778 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 775 779 } 776 780 else if(lstrcmp(MessageName,"LButtonDblClick")==0){ 777 781 sprintf(Command,"%sCase WM_LBUTTONDBLCLK\r\n",spaces); 778 782 i=lstrlen(Command); 779 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo-> name,MessageName);783 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 780 784 } 781 785 else if(lstrcmp(MessageName,"LButtonUp")==0){ 782 786 sprintf(Command,"%sCase WM_LBUTTONUP\r\n",spaces); 783 787 i=lstrlen(Command); 784 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo-> name,MessageName);788 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 785 789 } 786 790 else if(lstrcmp(MessageName,"MButtonDown")==0){ 787 791 sprintf(Command,"%sCase WM_MBUTTONDOWN\r\n",spaces); 788 792 i=lstrlen(Command); 789 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo-> name,MessageName);793 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 790 794 } 791 795 else if(lstrcmp(MessageName,"MButtonDblClick")==0){ 792 796 sprintf(Command,"%sCase WM_MBUTTONDBLCLK\r\n",spaces); 793 797 i=lstrlen(Command); 794 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo-> name,MessageName);798 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 795 799 } 796 800 else if(lstrcmp(MessageName,"MButtonUp")==0){ 797 801 sprintf(Command,"%sCase WM_MBUTTONUP\r\n",spaces); 798 802 i=lstrlen(Command); 799 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo-> name,MessageName);803 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 800 804 } 801 805 else if(lstrcmp(MessageName,"MouseMove")==0){ 802 806 sprintf(Command,"%sCase WM_MOUSEMOVE\r\n",spaces); 803 807 i=lstrlen(Command); 804 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo-> name,MessageName);808 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 805 809 } 806 810 else if(lstrcmp(MessageName,"Move")==0){ 807 811 sprintf(Command,"%sCase WM_MOVE\r\n",spaces); 808 812 i=lstrlen(Command); 809 sprintf(Command+i,"%s\t%s_%s(LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo-> name,MessageName);813 sprintf(Command+i,"%s\t%s_%s(LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 810 814 } 811 815 else if(lstrcmp(MessageName,"Notify")==0){ … … 822 826 sprintf(Command+i,"%s\thDC=BeginPaint(hWnd,ps)\r\n",spaces); 823 827 i+=lstrlen(Command+i); 824 sprintf(Command+i,"%s\t%s_%s(hDC)\r\n",spaces,pWindowInfo-> name,MessageName);828 sprintf(Command+i,"%s\t%s_%s(hDC)\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 825 829 i+=lstrlen(Command+i); 826 830 sprintf(Command+i,"%s\tEndPaint(hWnd,ps)\r\n",spaces); … … 833 837 i+=lstrlen(Command+i); 834 838 if(bProcedureCall){ 835 sprintf(Command+i,"%s\t%s_%s(cancel)\r\n",spaces,pWindowInfo-> name,MessageName);839 sprintf(Command+i,"%s\t%s_%s(cancel)\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 836 840 i+=lstrlen(Command+i); 837 841 } … … 845 849 sprintf(Command,"%sCase WM_RBUTTONDBLCLK\r\n",spaces); 846 850 i=lstrlen(Command); 847 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo-> name,MessageName);851 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 848 852 } 849 853 else if(lstrcmp(MessageName,"RButtonDown")==0){ 850 854 sprintf(Command,"%sCase WM_RBUTTONDOWN\r\n",spaces); 851 855 i=lstrlen(Command); 852 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo-> name,MessageName);856 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 853 857 } 854 858 else if(lstrcmp(MessageName,"RButtonUp")==0){ 855 859 sprintf(Command,"%sCase WM_RBUTTONUP\r\n",spaces); 856 860 i=lstrlen(Command); 857 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo-> name,MessageName);861 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 858 862 } 859 863 else if(lstrcmp(MessageName,"Resize")==0){ 860 864 sprintf(Command,"%sCase WM_SIZE\r\n",spaces); 861 865 i=lstrlen(Command); 862 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo-> name,MessageName);866 sprintf(Command+i,"%s\t%s_%s(wParam As Long,LOWORD(lParam),HIWORD(lParam))\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 863 867 } 864 868 else if(lstrcmp(MessageName,"SetFocus")==0){ 865 869 sprintf(Command,"%sCase WM_SETFOCUS\r\n",spaces); 866 870 i=lstrlen(Command); 867 sprintf(Command+i,"%s\t%s_%s()\r\n",spaces,pWindowInfo-> name,MessageName);871 sprintf(Command+i,"%s\t%s_%s()\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 868 872 } 869 873 else if(lstrcmp(MessageName,"Timer")==0){ 870 874 sprintf(Command,"%sCase WM_TIMER\r\n",spaces); 871 875 i=lstrlen(Command); 872 sprintf(Command+i,"%s\t%s_%s(wParam As DWord)\r\n",spaces,pWindowInfo-> name,MessageName);876 sprintf(Command+i,"%s\t%s_%s(wParam As DWord)\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 873 877 } 874 878 else if(lstrcmp(MessageName,"VScroll")==0){ 875 879 sprintf(Command,"%sCase WM_VSCROLL\r\n",spaces); 876 880 i=lstrlen(Command); 877 sprintf(Command+i,"%s\t%s_%s(LOWORD(wParam),HIWORD(wParam),lParam As HWND)\r\n",spaces,pWindowInfo-> name,MessageName);881 sprintf(Command+i,"%s\t%s_%s(LOWORD(wParam),HIWORD(wParam),lParam As HWND)\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 878 882 } 879 883 … … 885 889 sprintf(Command,"%sCase MM_MCINOTIFY\r\n",spaces); 886 890 i=lstrlen(Command); 887 sprintf(Command+i,"%s\t%s_%s(wParam,lParam)\r\n",spaces,pWindowInfo-> name,MessageName);891 sprintf(Command+i,"%s\t%s_%s(wParam,lParam)\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 888 892 } 889 893 return 0; … … 1044 1048 BOOST_FOREACH( WindowInfo *pWindowInfo, ProjectInfo.windowInfos ) 1045 1049 { 1046 sprintf(buffer+i2,"Dim %s As HWND\r\n",pWindowInfo-> HandleName);1047 i2+=lstrlen(buffer+i2); 1048 sprintf(buffer+i2,"Dim hFont_%s As HFONT\r\n",pWindowInfo-> name);1050 sprintf(buffer+i2,"Dim %s As HWND\r\n",pWindowInfo->GetHandleName().c_str()); 1051 i2+=lstrlen(buffer+i2); 1052 sprintf(buffer+i2,"Dim hFont_%s As HFONT\r\n",pWindowInfo->GetName().c_str()); 1049 1053 i2+=lstrlen(buffer+i2); 1050 1054 sprintf(buffer+i2,"hFont_%s=CreateFont(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,\"%s\")\r\n", 1051 pWindowInfo-> name,1055 pWindowInfo->GetName().c_str(), 1052 1056 pWindowInfo->LogFont.lfHeight, 1053 1057 pWindowInfo->LogFont.lfWidth, … … 1111 1115 if((pChildInfo->style&0x000F)==SS_ICON|| 1112 1116 (pChildInfo->style&0x000F)==SS_BITMAP){ 1113 sprintf(buffer+i2,"Dim hImage_%s_%s As HANDLE\r\n",pWindowInfo-> name,pChildInfo->IdName);1117 sprintf(buffer+i2,"Dim hImage_%s_%s As HANDLE\r\n",pWindowInfo->GetName().c_str(),pChildInfo->IdName); 1114 1118 i2+=lstrlen(buffer+i2); 1115 1119 … … 1162 1166 { 1163 1167 //フォントハンドル解放 1164 sprintf(buffer+i2,"\tDeleteObject(hFont_%s)\r\n",pWindowInfo-> name);1168 sprintf(buffer+i2,"\tDeleteObject(hFont_%s)\r\n",pWindowInfo->GetName().c_str()); 1165 1169 i2+=lstrlen(buffer+i2); 1166 1170 … … 1208 1212 ppNames=GetProcedureNamesOfMessageCall(i,&pItemEventInfo,&i3,&bAvailUserProc[i]); 1209 1213 1210 sprintf(buffer+i2,"Function EventCall_%s(hWnd As HWND, message As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT\r\n",pWindowInfo-> name);1214 sprintf(buffer+i2,"Function EventCall_%s(hWnd As HWND, message As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT\r\n",pWindowInfo->GetName().c_str()); 1211 1215 i2+=lstrlen(buffer+i2); 1212 1216 … … 1246 1250 i2+=lstrlen(buffer+i2); 1247 1251 if(sw4){ 1248 sprintf(buffer+i2,"\t\t\t%s_Notify(ByVal (lParam As *NMHDR))\r\n",pWindowInfo-> name);1252 sprintf(buffer+i2,"\t\t\t%s_Notify(ByVal (lParam As *NMHDR))\r\n",pWindowInfo->GetName().c_str()); 1249 1253 i2+=lstrlen(buffer+i2); 1250 1254 } … … 1272 1276 lstrcpy(buffer+i2,"\t\tCase WM_NOTIFY\r\n"); 1273 1277 i2+=lstrlen(buffer+i2); 1274 sprintf(buffer+i2,"\t\t\t%s_Notify(ByVal (lParam As *NMHDR))\r\n",pWindowInfo-> name);1278 sprintf(buffer+i2,"\t\t\t%s_Notify(ByVal (lParam As *NMHDR))\r\n",pWindowInfo->GetName().c_str()); 1275 1279 i2+=lstrlen(buffer+i2); 1276 1280 } … … 1295 1299 lstrcpy(buffer+i2,"\t\tCase Else\r\n"); 1296 1300 i2+=lstrlen(buffer+i2); 1297 sprintf(buffer+i2,"\t\t\tEventCall_%s=DefWindowProc(hWnd,message,wParam,lParam)\r\n",pWindowInfo-> name);1301 sprintf(buffer+i2,"\t\t\tEventCall_%s=DefWindowProc(hWnd,message,wParam,lParam)\r\n",pWindowInfo->GetName().c_str()); 1298 1302 i2+=lstrlen(buffer+i2); 1299 1303 lstrcpy(buffer+i2,"\t\t\tExit Function\r\n"); … … 1303 1307 i2+=lstrlen(buffer+i2); 1304 1308 1305 sprintf(buffer+i2,"\tEventCall_%s=0\r\n",pWindowInfo-> name);1309 sprintf(buffer+i2,"\tEventCall_%s=0\r\n",pWindowInfo->GetName().c_str()); 1306 1310 i2+=lstrlen(buffer+i2); 1307 1311 lstrcpy(buffer+i2,"End Function\r\n"); … … 1363 1367 if(pWindowInfo->type==WNDTYPE_MODALDLG){ 1364 1368 if(sw1==0){ 1365 sprintf(buffer+i2,"\tIf lstrcmp(TemplateName,\"%s\")=0 Then\r\n",pWindowInfo-> name);1369 sprintf(buffer+i2,"\tIf lstrcmp(TemplateName,\"%s\")=0 Then\r\n",pWindowInfo->GetName().c_str()); 1366 1370 i2+=lstrlen(buffer+i2); 1367 1371 sw1=1; 1368 1372 } 1369 1373 else{ 1370 sprintf(buffer+i2,"\tElseIf lstrcmp(TemplateName,\"%s\")=0 Then\r\n",pWindowInfo-> name);1374 sprintf(buffer+i2,"\tElseIf lstrcmp(TemplateName,\"%s\")=0 Then\r\n",pWindowInfo->GetName().c_str()); 1371 1375 i2+=lstrlen(buffer+i2); 1372 1376 } 1373 1377 sprintf(buffer+i2,"\t\t%s=CreateWindowEx(&H%08x,\"NORMALDLG\",\"%s\",&H%08x,%d,%d,%d,%d,hOwnerWnd,%d As HMENU,GetModuleHandle(0),0)\r\n", 1374 pWindowInfo-> HandleName,1378 pWindowInfo->GetHandleName().c_str(), 1375 1379 pWindowInfo->ExStyle, 1376 1380 pWindowInfo->caption, … … 1383 1387 i2+=lstrlen(buffer+i2); 1384 1388 sprintf(buffer+i2,"\t\thDlg=%s\r\n", 1385 pWindowInfo-> HandleName);1389 pWindowInfo->GetHandleName().c_str()); 1386 1390 i2+=lstrlen(buffer+i2); 1387 1391 if(bAvailUserProc[i]){ 1388 1392 sprintf(buffer+i2,"\t\tSetWindowLongPtr(%s,GWLP_WNDPROC,AddressOf(%s) As LONG_PTR)\r\n", 1389 pWindowInfo-> HandleName,1393 pWindowInfo->GetHandleName().c_str(), 1390 1394 pWindowInfo->CallBackName); 1391 1395 } 1392 1396 else{ 1393 1397 sprintf(buffer+i2,"\t\tSetWindowLongPtr(%s,GWLP_WNDPROC,AddressOf(EventCall_%s) As LONG_PTR)\r\n", 1394 pWindowInfo-> HandleName,1395 pWindowInfo-> name);1396 } 1397 i2+=lstrlen(buffer+i2); 1398 sprintf(buffer+i2,"\t\tSendMessage(%s,WM_INITDIALOG,0,0)\r\n",pWindowInfo-> HandleName);1398 pWindowInfo->GetHandleName().c_str(), 1399 pWindowInfo->GetName().c_str()); 1400 } 1401 i2+=lstrlen(buffer+i2); 1402 sprintf(buffer+i2,"\t\tSendMessage(%s,WM_INITDIALOG,0,0)\r\n",pWindowInfo->GetHandleName().c_str()); 1399 1403 i2+=lstrlen(buffer+i2); 1400 1404 if(pWindowInfo->IconResName){ 1401 sprintf(buffer+i2,"\t\tSendMessage(%s,WM_SETICON,ICON_SMALL,LoadIcon(GetModuleHandle(0),MAKEINTRESOURCE(%s)) As LPARAM)\r\n",pWindowInfo-> HandleName,pWindowInfo->IconResName);1405 sprintf(buffer+i2,"\t\tSendMessage(%s,WM_SETICON,ICON_SMALL,LoadIcon(GetModuleHandle(0),MAKEINTRESOURCE(%s)) As LPARAM)\r\n",pWindowInfo->GetHandleName().c_str(),pWindowInfo->IconResName); 1402 1406 i2+=lstrlen(buffer+i2); 1403 1407 } 1404 sprintf(buffer+i2,"\t\tShowWindow(%s,SW_SHOW)\r\n",pWindowInfo-> HandleName);1408 sprintf(buffer+i2,"\t\tShowWindow(%s,SW_SHOW)\r\n",pWindowInfo->GetHandleName().c_str()); 1405 1409 i2+=lstrlen(buffer+i2); 1406 1410 } … … 1461 1465 { 1462 1466 if(pWindowInfo->type==WNDTYPE_MODELESSDLG){ 1463 sprintf(buffer+i2,"\tIf lstrcmp(TemplateName,\"%s\")=0 Then\r\n",pWindowInfo-> name);1467 sprintf(buffer+i2,"\tIf lstrcmp(TemplateName,\"%s\")=0 Then\r\n",pWindowInfo->GetName().c_str()); 1464 1468 i2+=lstrlen(buffer+i2); 1465 1469 1466 1470 sprintf(buffer+i2,"\t\t%s=CreateWindowEx(&H%08x,\"NORMALDLG\",\"%s\",&H%08x,%d,%d,%d,%d,hOwnerWnd,%d As HMENU,GetModuleHandle(0),0)\r\n", 1467 pWindowInfo-> HandleName,1471 pWindowInfo->GetHandleName().c_str(), 1468 1472 pWindowInfo->ExStyle, 1469 1473 pWindowInfo->caption, … … 1475 1479 pWindowInfo->id); 1476 1480 i2+=lstrlen(buffer+i2); 1477 sprintf(buffer+i2,"\t\tCreateDialog=%s\r\n",pWindowInfo-> HandleName);1481 sprintf(buffer+i2,"\t\tCreateDialog=%s\r\n",pWindowInfo->GetHandleName().c_str()); 1478 1482 i2+=lstrlen(buffer+i2); 1479 1483 if(bAvailUserProc[i]){ 1480 1484 sprintf(buffer+i2,"\t\tSetWindowLongPtr(%s,GWLP_WNDPROC,AddressOf(%s) As LONG_PTR)\r\n", 1481 pWindowInfo-> HandleName,1485 pWindowInfo->GetHandleName().c_str(), 1482 1486 pWindowInfo->CallBackName); 1483 1487 } 1484 1488 else{ 1485 1489 sprintf(buffer+i2,"\t\tSetWindowLongPtr(%s,GWLP_WNDPROC,AddressOf(EventCall_%s) As LONG_PTR)\r\n", 1486 pWindowInfo-> HandleName,1487 pWindowInfo-> name);1488 } 1489 i2+=lstrlen(buffer+i2); 1490 sprintf(buffer+i2,"\t\tSendMessage(%s,WM_INITDIALOG,0,0)\r\n",pWindowInfo-> HandleName);1490 pWindowInfo->GetHandleName().c_str(), 1491 pWindowInfo->GetName().c_str()); 1492 } 1493 i2+=lstrlen(buffer+i2); 1494 sprintf(buffer+i2,"\t\tSendMessage(%s,WM_INITDIALOG,0,0)\r\n",pWindowInfo->GetHandleName().c_str()); 1491 1495 i2+=lstrlen(buffer+i2); 1492 1496 if(pWindowInfo->IconResName){ 1493 sprintf(buffer+i2,"\t\tSendMessage(%s,WM_SETICON,ICON_SMALL,LoadIcon(GetModuleHandle(0),MAKEINTRESOURCE(%s)) As LPARAM)\r\n",pWindowInfo-> HandleName,pWindowInfo->IconResName);1497 sprintf(buffer+i2,"\t\tSendMessage(%s,WM_SETICON,ICON_SMALL,LoadIcon(GetModuleHandle(0),MAKEINTRESOURCE(%s)) As LPARAM)\r\n",pWindowInfo->GetHandleName().c_str(),pWindowInfo->IconResName); 1494 1498 i2+=lstrlen(buffer+i2); 1495 1499 } 1496 sprintf(buffer+i2,"\tEnd If\r\n",pWindowInfo-> name);1500 sprintf(buffer+i2,"\tEnd If\r\n",pWindowInfo->GetName().c_str()); 1497 1501 i2+=lstrlen(buffer+i2); 1498 1502 } … … 1557 1561 if(bAvailUserProc[i]) 1558 1562 sprintf(buffer+i2,"_RadSys_wcl.lpfnWndProc=AddressOf(%s)\r\n",pWindowInfo->CallBackName); 1559 else sprintf(buffer+i2,"_RadSys_wcl.lpfnWndProc=AddressOf(EventCall_%s)\r\n",pWindowInfo-> name);1563 else sprintf(buffer+i2,"_RadSys_wcl.lpfnWndProc=AddressOf(EventCall_%s)\r\n",pWindowInfo->GetName().c_str()); 1560 1564 i2+=lstrlen(buffer+i2); 1561 1565 if(pWindowInfo->bgColor==COLOR_3DFACE) … … 1638 1642 BOOST_FOREACH( WindowInfo *pWindowInfo, ProjectInfo.windowInfos ) 1639 1643 { 1640 sprintf(buffer+i2,"WINDOW:%s\r\n",pWindowInfo-> name);1641 i2+=lstrlen(buffer+i2); 1642 sprintf(buffer+i2," HANDLE = %s\r\n",pWindowInfo-> HandleName);1644 sprintf(buffer+i2,"WINDOW:%s\r\n",pWindowInfo->GetName().c_str()); 1645 i2+=lstrlen(buffer+i2); 1646 sprintf(buffer+i2," HANDLE = %s\r\n",pWindowInfo->GetHandleName().c_str()); 1643 1647 i2+=lstrlen(buffer+i2); 1644 1648 sprintf(buffer+i2," POINT = %d,%d\r\n",pWindowInfo->pos.x,pWindowInfo->pos.y); … … 1713 1717 } 1714 1718 } 1715 sprintf(buffer+i2,"END\r\n",pWindowInfo-> name);1719 sprintf(buffer+i2,"END\r\n",pWindowInfo->GetName().c_str()); 1716 1720 i2+=lstrlen(buffer+i2); 1717 1721 if(i2-GENERAL_SIZE<GENERAL_SIZE){ … … 1724 1728 i2+=lstrlen(buffer+i2); 1725 1729 i2+=GetSaveMenuData(buffer+i2,1,ProjectInfo.pMenuInfo[i].pMenuInfo,ProjectInfo.pMenuInfo[i].NumberOfMenu); 1726 sprintf(buffer+i2,"END\r\n",windowInfos[i]-> name);1730 sprintf(buffer+i2,"END\r\n",windowInfos[i]->GetName().c_str()); 1727 1731 i2+=lstrlen(buffer+i2); 1728 1732 if(i2-GENERAL_SIZE<GENERAL_SIZE){ … … 1882 1886 i3=1; 1883 1887 1884 ProjectInfo.windowInfos.back()->name=(char *)HeapAlloc(hHeap,0,i2+1); 1885 lstrcpy(ProjectInfo.windowInfos.back()->name,temp2); 1888 ProjectInfo.windowInfos.back()->SetName( temp2 ); 1886 1889 } 1887 1890 else if(lstrcmpi(temporary,"HANDLE")==0&&i3==1){ 1888 ProjectInfo.windowInfos.back()->HandleName=(char *)HeapAlloc(hHeap,0,i2+1); 1889 lstrcpy(ProjectInfo.windowInfos.back()->HandleName,temp2); 1891 ProjectInfo.windowInfos.back()->SetHandleName( temp2 ); 1890 1892 } 1891 1893 else if(lstrcmpi(temporary,"POINT")==0&&i3==1){ … … 2177 2179 BOOST_FOREACH( WindowInfo *pWindowInfo, ProjectInfo.windowInfos ) 2178 2180 { 2179 if(lstrcmpi(NewWindow.name,pWindowInfo-> name)==0){2181 if(lstrcmpi(NewWindow.name,pWindowInfo->GetName().c_str())==0){ 2180 2182 //"\"%s\" ウィンドウは既にプロジェクト内に存在します。" 2181 sprintf(temporary,STRING_DUPLICATIONERROR_WINDOW_IN_PROJECT,pWindowInfo-> name);2183 sprintf(temporary,STRING_DUPLICATIONERROR_WINDOW_IN_PROJECT,pWindowInfo->GetName().c_str()); 2182 2184 MessageBox(hOwner,temporary,STRING_ERROR,MB_OK|MB_ICONEXCLAMATION); 2183 2185 return; 2184 2186 } 2185 if(lstrcmpi(NewWindow.HandleName,pWindowInfo-> HandleName)==0){2187 if(lstrcmpi(NewWindow.HandleName,pWindowInfo->GetHandleName().c_str())==0){ 2186 2188 //"\"%s\" ハンドルは既にプロジェクト内に存在します。" 2187 sprintf(temporary,STRING_DUPLICATIONERROR_HANDLE_IN_PROJECT,pWindowInfo-> HandleName);2189 sprintf(temporary,STRING_DUPLICATIONERROR_HANDLE_IN_PROJECT,pWindowInfo->GetHandleName().c_str()); 2188 2190 MessageBox(hOwner,temporary,STRING_ERROR,MB_OK|MB_ICONEXCLAMATION); 2189 2191 return; … … 2205 2207 2206 2208 //ウィンドウ名 2207 ProjectInfo.windowInfos.back()->name=(char *)HeapAlloc(hHeap,0,lstrlen(NewWindow.name)+1); 2208 lstrcpy(ProjectInfo.windowInfos.back()->name,NewWindow.name); 2209 ProjectInfo.windowInfos.back()->SetName( NewWindow.name ); 2209 2210 2210 2211 //ハンドル名 2211 ProjectInfo.windowInfos.back()->HandleName=(char *)HeapAlloc(hHeap,0,lstrlen(NewWindow.HandleName)+1); 2212 lstrcpy(ProjectInfo.windowInfos.back()->HandleName,NewWindow.HandleName); 2212 ProjectInfo.windowInfos.back()->SetHandleName( NewWindow.HandleName ); 2213 2213 2214 2214 //位置情報 … … 2267 2267 2268 2268 //メッセージ処理ファイル名 2269 sprintf(temporary,"%s.ab",ProjectInfo.windowInfos.back()-> name);2269 sprintf(temporary,"%s.ab",ProjectInfo.windowInfos.back()->GetName().c_str()); 2270 2270 ProjectInfo.windowInfos.back()->filepath=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1); 2271 2271 lstrcpy(ProjectInfo.windowInfos.back()->filepath,temporary); … … 2287 2287 NewWindow.CallBackName); 2288 2288 2289 sprintf(temporary,"%s%s.ab",ProjectInfo.dir,ProjectInfo.windowInfos.back()-> name);2289 sprintf(temporary,"%s%s.ab",ProjectInfo.dir,ProjectInfo.windowInfos.back()->GetName().c_str()); 2290 2290 2291 2291 //書き込み … … 2306 2306 tv.item.iSelectedImage=2; 2307 2307 tv.hParent=ProjectInfo.hWindowTreeItem; 2308 tv.item.pszText=ProjectInfo.windowInfos.back()->name; 2308 lstrcpy( temp2, ProjectInfo.windowInfos.back()->GetName().c_str() ); 2309 tv.item.pszText = temp2; 2309 2310 2310 2311 ProjectInfo.windowInfos.back()->hTreeItem=TreeView_InsertItem(hMaterialTreeView,&tv); … … 2326 2327 //ウィンドウが開かれている場合は閉じる 2327 2328 for(i=0;i<MAX_WNDNUM;i++){ 2328 if(MdiInfo[i].hwnd&&lstrcmpi(pWindowInfo-> name,MdiInfo[i].path)==0){2329 if(MdiInfo[i].hwnd&&lstrcmpi(pWindowInfo->GetName().c_str(),MdiInfo[i].path)==0){ 2329 2330 SendMessage(MdiInfo[i].hwnd,WM_CLOSE,0,0); 2330 2331 break; … … 2333 2334 2334 2335 //ウィンドウ情報のメモリを解放 2335 HeapDefaultFree(pWindowInfo->name);2336 2336 HeapDefaultFree(pWindowInfo->filepath); 2337 HeapDefaultFree(pWindowInfo->HandleName);2338 2337 HeapDefaultFree(pWindowInfo->caption); 2339 2338 HeapDefaultFree(pWindowInfo->ClassName); -
trunk/ab5.0/abdev/abdev/include/ProjectManager/WindowManager.h
r616 r617 50 50 public: 51 51 WindowInfo() 52 : name( NULL ) 53 , HandleName( NULL ) 54 , caption( NULL ) 52 : caption( NULL ) 55 53 , MenuID( NULL ) 56 54 , IconResName( NULL ) … … 60 58 } 61 59 60 void SetName( const std::string &name ) 61 { 62 this->name = name; 63 } 64 const std::string &GetName() const 65 { 66 return name; 67 } 68 69 void SetHandleName( const std::string &handleName ) 70 { 71 this->handleName = handleName; 72 } 73 const std::string &GetHandleName() const 74 { 75 return handleName; 76 } 77 62 78 //ウィンドウデータ 63 char *name;64 char *HandleName;65 79 POINT pos; 66 80 SIZE size; … … 83 97 //ツリー項目 84 98 HTREEITEM hTreeItem; 99 100 private: 101 std::string name; 102 std::string handleName; 85 103 }; 86 104
Note:
See TracChangeset
for help on using the changeset viewer.