Changeset 626 in dev for trunk/ab5.0/abdev
- Timestamp:
- May 27, 2008, 10:10:17 PM (16 years ago)
- Location:
- trunk/ab5.0/abdev/abdev
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/abdev/Backup.cpp
r625 r626 107 107 108 108 char szOldTitle[MAX_PATH]; 109 lstrcpy(szOldTitle,MdiInfo[WndNum].title );109 lstrcpy(szOldTitle,MdiInfo[WndNum].title.c_str()); 110 110 111 111 //ドキュメント セレクト コンボボックスから消去 112 112 extern HWND hDocCombo; 113 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum].title );113 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum].title.c_str()); 114 114 SendMessage(hDocCombo,CB_DELETESTRING,i2,0); 115 115 … … 129 129 } 130 130 DuplicateTitleCheck(str); 131 GlobalFree(MdiInfo[WndNum].title); 132 MdiInfo[WndNum].title=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(str)+1); 133 lstrcpy(MdiInfo[WndNum].title,str); 134 SendMessage(hDocCombo,CB_ADDSTRING,0,(long)MdiInfo[WndNum].title); 135 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum].title); 131 MdiInfo[WndNum].title = str; 132 SendMessage(hDocCombo,CB_ADDSTRING,0,(long)MdiInfo[WndNum].title.c_str()); 133 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum].title.c_str()); 136 134 SendMessage(hDocCombo,CB_SETCURSEL,i2,0); 137 135 138 136 //MDIウィンドウのタイトルを再設定 139 SetWindowText(hChild,MdiInfo[WndNum].title );137 SetWindowText(hChild,MdiInfo[WndNum].title.c_str()); 140 138 141 139 //タブコントロールを再設定 … … 143 141 TabColor=pobj_nv->pobj_ExtLink->GetTabColorFromFilePath(MdiInfo[WndNum].path); 144 142 pobj_MainTab->DeleteItem( szOldTitle, false ); 145 pobj_MainTab->InsertItem( MdiInfo[WndNum].title , false, TabColor );143 pobj_MainTab->InsertItem( MdiInfo[WndNum].title.c_str(), false, TabColor ); 146 144 147 145 MdiInfo[WndNum].pMdiTextEdit->Modify(); -
trunk/ab5.0/abdev/abdev/ChildWndOnRebar.cpp
r625 r626 48 48 SendMessage(hwnd,CB_GETLBTEXT,SendMessage(hwnd,CB_GETCURSEL,0,0),(long)str); 49 49 for(i=0;i<MdiInfo.size();i++){ 50 if(lstrcmpi(str,MdiInfo[i].title )==0) break;50 if(lstrcmpi(str,MdiInfo[i].title.c_str())==0) break; 51 51 } 52 52 BringWindowToTop(MdiInfo[i].hwnd); -
trunk/ab5.0/abdev/abdev/Common.h
r625 r626 354 354 HWND hwnd; 355 355 int DocType; 356 char *title;356 std::string title; 357 357 std::string path; 358 358 -
trunk/ab5.0/abdev/abdev/FileOperation.cpp
r625 r626 344 344 345 345 char szOldTitle[MAX_PATH]; 346 lstrcpy(szOldTitle,MdiInfo[WndNum].title );346 lstrcpy(szOldTitle,MdiInfo[WndNum].title.c_str()); 347 347 348 348 if(MdiInfo[WndNum].DocType==WNDTYPE_RAD||MdiInfo[WndNum].DocType==WNDTYPE_MENU){ … … 376 376 377 377 //ドキュメント セレクト コンボボックスから消去 378 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum].title );378 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum].title.c_str()); 379 379 SendMessage(hDocCombo,CB_DELETESTRING,i2,0); 380 380 … … 385 385 _splitpath(temporary,NULL,NULL,str,str2); 386 386 lstrcat(str,str2); 387 GlobalFree(MdiInfo[WndNum].title); 388 MdiInfo[WndNum].title=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(str)+1); 389 lstrcpy(MdiInfo[WndNum].title,str); 390 SendMessage(hDocCombo,CB_ADDSTRING,0,(long)MdiInfo[WndNum].title); 391 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum].title); 387 MdiInfo[WndNum].title = str; 388 SendMessage(hDocCombo,CB_ADDSTRING,0,(long)MdiInfo[WndNum].title.c_str()); 389 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum].title.c_str()); 392 390 SendMessage(hDocCombo,CB_SETCURSEL,i2,0); 393 391 394 392 //MDIウィンドウのタイトルを再設定 395 SetWindowText(hChild,MdiInfo[WndNum].title );393 SetWindowText(hChild,MdiInfo[WndNum].title.c_str()); 396 394 } 397 395 else{ … … 474 472 CloseHandle(fh); 475 473 MdiInfo[WndNum].path = temporary; 476 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum].title );474 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum].title.c_str()); 477 475 SendMessage(hDocCombo,CB_DELETESTRING,i2,0); 478 476 _splitpath(temporary,NULL,NULL,str,str2); 479 477 lstrcat(str,str2); 480 lstrcpy(MdiInfo[WndNum].title,str);481 SendMessage(hDocCombo,CB_ADDSTRING,0,(long)MdiInfo[WndNum].title );482 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum].title );478 MdiInfo[WndNum].title = str; 479 SendMessage(hDocCombo,CB_ADDSTRING,0,(long)MdiInfo[WndNum].title.c_str()); 480 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum].title.c_str()); 483 481 SendMessage(hDocCombo,CB_SETCURSEL,i2,0); 484 SetWindowText(hChild,MdiInfo[WndNum].title );482 SetWindowText(hChild,MdiInfo[WndNum].title.c_str()); 485 483 } 486 484 else{ … … 504 502 color=pobj_MainTab->GetItemColor(szOldTitle); 505 503 pobj_MainTab->DeleteItem( szOldTitle, false ); 506 pobj_MainTab->InsertItem( MdiInfo[WndNum].title , false, color );504 pobj_MainTab->InsertItem( MdiInfo[WndNum].title.c_str(), false, color ); 507 505 } 508 506 else{ 509 pobj_MainTab->RenameItem( szOldTitle, MdiInfo[WndNum].title );507 pobj_MainTab->RenameItem( szOldTitle, MdiInfo[WndNum].title.c_str() ); 510 508 } 511 509 -
trunk/ab5.0/abdev/abdev/IconEditor.cpp
r625 r626 373 373 MdiInfo[i].hwnd=hChild; 374 374 MdiInfo[i].DocType=WNDTYPE_ICONEDIT; 375 MdiInfo[i].title=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(str)+1); 376 lstrcpy(MdiInfo[i].title,str); 375 MdiInfo[i].title = str; 377 376 if(filepath) 378 377 { … … 539 538 if(i==-1) return 0; //ウィンドウが初期状態の場合 540 539 541 i=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[i].title );540 i=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[i].title.c_str()); 542 541 SendMessage(hDocCombo,CB_SETCURSEL,i,0); 543 542 SetStatusText(NULL); -
trunk/ab5.0/abdev/abdev/MdiTextEdit.cpp
r475 r626 27 27 28 28 //タブ文字列に変更を示すアスタリスクを付ける 29 pobj_MainTab->NofityModifyDocument( pMdiInfo->title );29 pobj_MainTab->NofityModifyDocument( pMdiInfo->title.c_str() ); 30 30 } 31 31 void CMdiTextEdit::UnModify(){ … … 34 34 35 35 //アスタリスク表示を解除する 36 pobj_MainTab->NofityUnModifyDocument( pMdiInfo->title );36 pobj_MainTab->NofityUnModifyDocument( pMdiInfo->title.c_str() ); 37 37 38 38 //アンドゥーリドゥーのベース番号を取得 -
trunk/ab5.0/abdev/abdev/MenuProc.cpp
r625 r626 252 252 MdiInfo[i].hwnd=hChild; 253 253 MdiInfo[i].DocType=WNDTYPE_MENU; 254 MdiInfo[i].title=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(pMenuInfo->IdName)+1); 255 lstrcpy(MdiInfo[i].title,pMenuInfo->IdName); 254 MdiInfo[i].title = pMenuInfo->IdName; 256 255 MdiInfo[i].path = pMenuInfo->IdName; 257 256 … … 857 856 if(i==-1) return 0; //ウィンドウが初期状態の場合 858 857 859 i=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[i].title );858 i=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[i].title.c_str()); 860 859 SendMessage(hDocCombo,CB_SETCURSEL,i,0); 861 860 SetStatusText(NULL); -
trunk/ab5.0/abdev/abdev/Print.cpp
r475 r626 547 547 memset(&di,0,sizeof(DOCINFO)); 548 548 di.cbSize=sizeof(DOCINFO); 549 di.lpszDocName=MdiInfo[WndNum].title ;549 di.lpszDocName=MdiInfo[WndNum].title.c_str(); 550 550 if(StartDoc(pd.hDC,&di)==0){ 551 551 MessageBox(hOwner,"印刷できません。プリンターの状況を確認してください。",APPLICATION_NAME,MB_OK | MB_ICONEXCLAMATION); -
trunk/ab5.0/abdev/abdev/RadProc.cpp
r625 r626 85 85 MdiInfo[i].hwnd=hChild; 86 86 MdiInfo[i].DocType=WNDTYPE_RAD; 87 MdiInfo[i].title=(char *)GlobalAlloc(GMEM_FIXED,windowInfo.GetName().size()+1); 88 lstrcpy(MdiInfo[i].title,windowInfo.GetName().c_str()); 87 MdiInfo[i].title = windowInfo.GetName(); 89 88 MdiInfo[i].path = windowInfo.GetName(); 90 89 … … 1996 1995 if(i==-1) return 0; //ウィンドウが初期状態の場合 1997 1996 1998 i=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[i].title );1997 i=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[i].title.c_str()); 1999 1998 SendMessage(hDocCombo,CB_SETCURSEL,i,0); 2000 1999 SetStatusText(NULL); -
trunk/ab5.0/abdev/abdev/TabCtrl.cpp
r625 r626 262 262 263 263 for(i=0;i<MdiInfo.size();i++){ 264 if(lstrcmpi(ItemText,MdiInfo[i].title )==0) break;264 if(lstrcmpi(ItemText,MdiInfo[i].title.c_str())==0) break; 265 265 } 266 266 BringWindowToTop(MdiInfo[i].hwnd); 267 267 } 268 void CMainTab::MdiActiveEvent(c har *lpszText){268 void CMainTab::MdiActiveEvent(const char *lpszText){ 269 269 int i2; 270 270 i2=SearchItemIndex(lpszText); -
trunk/ab5.0/abdev/abdev/TabCtrl.h
r24 r626 40 40 41 41 void SelChangeEvent(); 42 void MdiActiveEvent(c har *lpszText);42 void MdiActiveEvent(const char *lpszText); 43 43 44 44 void draw(HDC hdc); -
trunk/ab5.0/abdev/abdev/TextEditor_EventProc.cpp
r625 r626 43 43 if(i==-1) return 0; //ウィンドウが初期状態の場合 44 44 45 i=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[i].title );45 i=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[i].title.c_str()); 46 46 SendMessage(hDocCombo,CB_SETCURSEL,i,0); 47 47 SetStatusText(NULL); -
trunk/ab5.0/abdev/abdev/abdev.cpp
r625 r626 727 727 for(i=0;i<MdiInfo.size();i++){ 728 728 if(MdiInfo[i].hwnd){ 729 if(lstrcmpi(MdiInfo[i].title ,lpszTitle)==0){729 if(lstrcmpi(MdiInfo[i].title.c_str(),lpszTitle)==0){ 730 730 lstrcat(lpszTitle,"_"); 731 731 DuplicateTitleCheck(lpszTitle); … … 899 899 MdiInfo[i].hwnd=hChild; 900 900 MdiInfo[i].DocType=DocumentType; 901 MdiInfo[i].title="";902 901 DuplicateTitleCheck(str); 903 MdiInfo[i].title=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(str)+1); 904 lstrcpy(MdiInfo[i].title,str); 902 MdiInfo[i].title = str; 905 903 if(filepath) 906 904 { … … 979 977 //ドキュメントコンボボックスから文字列を消去 980 978 extern HWND hDocCombo; 981 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum].title );979 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum].title.c_str()); 982 980 SendMessage(hDocCombo,CB_DELETESTRING,i2,0); 983 981 984 982 //タブコントロールからアイテムを消去 985 if(pobj_MainTab) pobj_MainTab->DeleteItem( MdiInfo[WndNum].title, true ); 986 987 988 GlobalFree(MdiInfo[WndNum].title); 983 if(pobj_MainTab) pobj_MainTab->DeleteItem( MdiInfo[WndNum].title.c_str(), true ); 984 989 985 990 986 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){ … … 1153 1149 //ドキュメント セレクト コンボボックス 1154 1150 extern HWND hDocCombo; 1155 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[i].title );1151 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[i].title.c_str()); 1156 1152 SendMessage(hDocCombo,CB_SETCURSEL,i2,0); 1157 1153 1158 1154 //タブコントロール 1159 pobj_MainTab->MdiActiveEvent(MdiInfo[i].title );1155 pobj_MainTab->MdiActiveEvent(MdiInfo[i].title.c_str()); 1160 1156 1161 1157 if( !projectInfo.IsOpened() ){
Note:
See TracChangeset
for help on using the changeset viewer.