Changeset 625 in dev for trunk/ab5.0/abdev/abdev/FileOperation.cpp
- Timestamp:
- May 27, 2008, 9:17:34 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/abdev/FileOperation.cpp
r622 r625 57 57 return buffer; 58 58 } 59 _int8 WriteBuffer(const std::string &path,char *buffer,int length, bool isEnableError){ 59 _int8 WriteBuffer(const std::string &path,const char *buffer,int length, bool isEnableError) 60 { 60 61 HANDLE hFile; 61 62 DWORD dw; … … 328 329 329 330 COLORREF TabColor; 330 TabColor=pobj_nv->pobj_ExtLink->GetTabColorFromFilePath( OpenFileName);331 TabColor=pobj_nv->pobj_ExtLink->GetTabColorFromFilePath( filePath ); 331 332 332 333 return NewTextEditWindow(OpenFileName,DocumentType,TabColor); … … 335 336 extern LPSTR IconFileFilter; 336 337 extern HWND hClient,hDocCombo; 337 extern MDIINFO MdiInfo[MAX_WNDNUM];338 338 int WndNum,i2; 339 339 char temporary[MAX_PATH],str[MAX_PATH],str2[32]; … … 380 380 381 381 //新しいパスをセット 382 GlobalFree(MdiInfo[WndNum].path); 383 MdiInfo[WndNum].path=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(temporary)+1); 384 lstrcpy(MdiInfo[WndNum].path,temporary); 382 MdiInfo[WndNum].path = temporary; 385 383 386 384 //ドキュメント セレクト コンボボックスに挿入 … … 398 396 } 399 397 else{ 400 if(MdiInfo[WndNum].path [0]=='\0'){398 if(MdiInfo[WndNum].path.empty()){ 401 399 //"保存先のファイルを指定してください" 402 400 get_file_path: … … 418 416 return 1; 419 417 } 420 lstrcpy(temporary,MdiInfo[WndNum].path );418 lstrcpy(temporary,MdiInfo[WndNum].path.c_str()); 421 419 } 422 420 … … 475 473 } 476 474 CloseHandle(fh); 477 GlobalFree(MdiInfo[WndNum].path); 478 MdiInfo[WndNum].path=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(temporary)+1); 479 lstrcpy(MdiInfo[WndNum].path,temporary); 475 MdiInfo[WndNum].path = temporary; 480 476 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum].title); 481 477 SendMessage(hDocCombo,CB_DELETESTRING,i2,0); … … 489 485 } 490 486 else{ 491 if(MdiInfo[WndNum].path [0]=='\0'){487 if(MdiInfo[WndNum].path.empty()){ 492 488 //"保存先のファイルを指定してください" 493 489 if(!GetFilePathDialog(hOwner,temporary,IconFileFilter,STRING_FILESAVETITLE_DEFAULT,FALSE)) return 0; … … 495 491 return 1; 496 492 } 497 lstrcpy(temporary,MdiInfo[WndNum].path );493 lstrcpy(temporary,MdiInfo[WndNum].path.c_str()); 498 494 } 499 495 SaveIconFile(temporary,hChild); … … 515 511 516 512 //「最近使ったファイル」を更新 517 pobj_nv->pobj_History->insert(MdiInfo[WndNum].path );513 pobj_nv->pobj_History->insert(MdiInfo[WndNum].path.c_str()); 518 514 519 515 return 1;
Note:
See TracChangeset
for help on using the changeset viewer.