Changeset 623 in dev for trunk/ab5.0/abdev/abdev/src/ProjectManager
- Timestamp:
- May 21, 2008, 11:02:07 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/abdev/src/ProjectManager/ProjectManager.cpp
r622 r623 25 25 lstrcpy(pobj_nv->DefSaveDir,this->GetWorkDir().GetPath().c_str()); 26 26 27 28 //////////////////////////////////////////29 // リソースデータ用領域を確保30 this->res.pCursorResInfo=(RESITEMINFO *)HeapAlloc(hHeap,0,1);31 this->res.NumberOfCursorRes=0;32 this->res.pBitmapResInfo=(RESITEMINFO *)HeapAlloc(hHeap,0,1);33 this->res.NumberOfBitmapRes=0;34 this->res.pIconResInfo=(RESITEMINFO *)HeapAlloc(hHeap,0,1);35 this->res.NumberOfIconRes=0;36 27 37 28 … … 242 233 243 234 // リソースを読み込む 244 Jenga::Common::Path resourcePath( projectInfo.GetResourceFileFullPath() );235 Jenga::Common::Path resourcePath( this->GetResourceFileFullPath() ); 245 236 if( resourcePath.IsExistFile() ) 246 237 { 247 GetResourceData();238 this->resourceManager.Load( this->GetResourceFileFullPath() ); 248 239 } 249 240 … … 302 293 if(MdiInfo[WndNum].DocType==WNDTYPE_ICONEDIT){ 303 294 if(MdiInfo[WndNum].MdiIconEditInfo->bModify){ 304 for(i=0;i<this->res .NumberOfIconRes;i++){305 lstrcpy(temporary,this->res .pIconResInfo[i].path);295 for(i=0;i<this->resourceManager.iconResources.size();i++){ 296 lstrcpy(temporary,this->resourceManager.iconResources[i].filepath.c_str()); 306 297 lstrcpy( temporary, this->GetWorkDir().GetFullPath( temporary ).c_str() ); 307 298 if(lstrcmpi(MdiInfo[WndNum].path,temporary)==0){ … … 366 357 i2=0; 367 358 i3=101; 368 for(i=0;i<this->res .NumberOfCursorRes;i++,i3++){359 for(i=0;i<this->resourceManager.cursorResources.size();i++,i3++){ 369 360 sprintf(buffer+i2,"Const %s=%d\r\n", 370 this->res .pCursorResInfo[i].IdName,361 this->resourceManager.cursorResources[i].idName.c_str(), 371 362 i3); 372 363 i2+=lstrlen(buffer+i2); 373 364 } 374 for(i=0;i<this->res .NumberOfBitmapRes;i++,i3++){365 for(i=0;i<this->resourceManager.bitmapResources.size();i++,i3++){ 375 366 sprintf(buffer+i2,"Const %s=%d\r\n", 376 this->res .pBitmapResInfo[i].IdName,367 this->resourceManager.bitmapResources[i].idName.c_str(), 377 368 i3); 378 369 i2+=lstrlen(buffer+i2); 379 370 } 380 for(i=0;i<this->res .NumberOfIconRes;i++,i3++){371 for(i=0;i<this->resourceManager.iconResources.size();i++,i3++){ 381 372 sprintf(buffer+i2,"Const %s=%d\r\n", 382 this->res .pIconResInfo[i].IdName,373 this->resourceManager.iconResources[i].idName.c_str(), 383 374 i3); 384 375 i2+=lstrlen(buffer+i2); … … 389 380 390 381 i2=0; 391 for(i=0;i<this->res .NumberOfCursorRes;i++){382 for(i=0;i<this->resourceManager.cursorResources.size();i++){ 392 383 sprintf(buffer+i2,"%s CURSOR \"%s\"\r\n", 393 this->res .pCursorResInfo[i].IdName,394 this->res .pCursorResInfo[i].path);395 i2+=lstrlen(buffer+i2); 396 } 397 for(i=0;i<this->res .NumberOfBitmapRes;i++){384 this->resourceManager.cursorResources[i].idName.c_str(), 385 this->resourceManager.cursorResources[i].filepath.c_str()); 386 i2+=lstrlen(buffer+i2); 387 } 388 for(i=0;i<this->resourceManager.bitmapResources.size();i++){ 398 389 sprintf(buffer+i2,"%s BITMAP \"%s\"\r\n", 399 this->res .pBitmapResInfo[i].IdName,400 this->res .pBitmapResInfo[i].path);401 i2+=lstrlen(buffer+i2); 402 } 403 for(i=0;i<this->res .NumberOfIconRes;i++){390 this->resourceManager.bitmapResources[i].idName.c_str(), 391 this->resourceManager.bitmapResources[i].filepath.c_str()); 392 i2+=lstrlen(buffer+i2); 393 } 394 for(i=0;i<this->resourceManager.iconResources.size();i++){ 404 395 sprintf(buffer+i2,"%s ICON \"%s\"\r\n", 405 this->res .pIconResInfo[i].IdName,406 this->res .pIconResInfo[i].path);396 this->resourceManager.iconResources[i].idName.c_str(), 397 this->resourceManager.iconResources[i].filepath.c_str()); 407 398 i2+=lstrlen(buffer+i2); 408 399 } … … 578 569 } 579 570 else if(MdiInfo[WndNum].DocType==WNDTYPE_ICONEDIT){ 580 for(i=0;this->res .NumberOfIconRes;i++){581 lstrcpy(temporary,this->res .pIconResInfo[i].path);571 for(i=0;this->resourceManager.iconResources.size();i++){ 572 lstrcpy(temporary,this->resourceManager.iconResources[i].filepath.c_str()); 582 573 lstrcpy( temporary, this->GetWorkDir().GetFullPath( temporary ).c_str() ); 583 574 if(lstrcmpi(MdiInfo[WndNum].path,temporary)==0){ … … 627 618 628 619 //リソースのメモリを解放 629 for(i=0;i<this->res.NumberOfCursorRes;i++){ 630 HeapDefaultFree(this->res.pCursorResInfo[i].IdName); 631 HeapDefaultFree(this->res.pCursorResInfo[i].path); 632 } 633 HeapDefaultFree(this->res.pCursorResInfo); 634 for(i=0;i<this->res.NumberOfBitmapRes;i++){ 635 HeapDefaultFree(this->res.pBitmapResInfo[i].IdName); 636 HeapDefaultFree(this->res.pBitmapResInfo[i].path); 637 } 638 HeapDefaultFree(this->res.pBitmapResInfo); 639 for(i=0;i<this->res.NumberOfIconRes;i++){ 640 HeapDefaultFree(this->res.pIconResInfo[i].IdName); 641 HeapDefaultFree(this->res.pIconResInfo[i].path); 642 } 643 HeapDefaultFree(this->res.pIconResInfo); 620 this->resourceManager.Clear(); 644 621 645 622 //プロジェクト ビューを非表示にする
Note:
See TracChangeset
for help on using the changeset viewer.