- Timestamp:
- May 27, 2008, 9:17:34 PM (16 years ago)
- Location:
- trunk/ab5.0
- Files:
-
- 2 added
- 56 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/BasicCompiler.cpp
r608 r625 211 211 lstrcat(temporary,path+i); 212 212 lstrcpy(path,temporary); 213 }214 std::string GetApplicationBaseFullPath( const std::string &relationalPath )215 {216 char fullPath[1024];217 lstrcpy( fullPath, relationalPath.c_str() );218 GetFullPath( fullPath, Jenga::Common::Environment::GetAppDir() );219 return fullPath;220 213 } 221 214 -
trunk/ab5.0/abdev/BasicCompiler_Common/common.h
r622 r625 217 217 void GetRelationalPath(char *path,char *dir); 218 218 void GetFullPath( char *path, const std::string &baseDirPath ); 219 std::string GetApplicationBaseFullPath( const std::string &relationalPath );220 219 void ShowErrorLine(int LineNum,const char *FileName); 221 220 BOOL GetFilePathDialog(HWND hwnd,char *filename,LPSTR Filter,LPSTR Title,BOOL bOpen); -
trunk/ab5.0/abdev/BasicCompiler_Common/include/LexicalAnalyzer.h
r581 r625 6 6 class LexicalAnalyzer 7 7 { 8 class SourceTemplate9 {10 std::string source;11 public:12 SourceTemplate( const std::string &filePath );13 ~SourceTemplate()14 {15 }16 17 std::string GetResult( const std::map<std::string,std::string> &values );18 };19 20 8 public: 21 9 -
trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer.cpp
r546 r625 2 2 3 3 using namespace ActiveBasic::Compiler; 4 5 LexicalAnalyzer::SourceTemplate::SourceTemplate( const std::string &filePath )6 {7 Jenga::Common::File file = Jenga::Common::File( GetApplicationBaseFullPath( filePath ) );8 source = file.Read();9 }10 std::string LexicalAnalyzer::SourceTemplate::GetResult( const std::map<std::string,std::string> &values )11 {12 std::string result = source;13 14 std::map<std::string,std::string>::const_iterator it = values.begin();15 while( it != values.end() )16 {17 while( true )18 {19 std::string::size_type index = result.find( it->first );20 if( index == std::string::npos )21 {22 break;23 }24 25 result = result.substr( 0, index ) + it->second + result.substr( index + it->first.length() );26 }27 it++;28 }29 30 return result;31 }32 33 4 34 5 bool LexicalAnalyzer::CollectNamespaces( const char *source, NamespaceScopesCollection &namespaceScopesCollection ) -
trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Delegate.cpp
r588 r625 124 124 std::string destSource = ""; 125 125 126 SourceTemplate sourceTemplate( ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\templates\\delegate_class.tab" );126 Jenga::Common::SourceTemplate sourceTemplate( ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\templates\\delegate_class.tab" ); 127 127 128 128 delegates.Iterator_Reset(); -
trunk/ab5.0/abdev/abdev/Backup.cpp
r475 r625 48 48 sprintf(temp2,"%x\r\n",hOwner); 49 49 50 for(i=0;i<M AX_WNDNUM;i++){50 for(i=0;i<MdiInfo.size();i++){ 51 51 if(MdiInfo[i].hwnd){ 52 52 int WndNum; … … 60 60 61 61 //情報を追加 62 sprintf(temp2+lstrlen(temp2),"%s\r\n",MdiInfo[WndNum].path );62 sprintf(temp2+lstrlen(temp2),"%s\r\n",MdiInfo[WndNum].path.c_str()); 63 63 64 64 iNum++; … … 115 115 116 116 //パスを変更 117 GlobalFree(MdiInfo[WndNum].path); 118 MdiInfo[WndNum].path=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(szBeforeFilePath)+1); 119 lstrcpy(MdiInfo[WndNum].path,szBeforeFilePath); 117 MdiInfo[WndNum].path = szBeforeFilePath; 120 118 121 119 //ドキュメント セレクト コンボボックスに挿入 -
trunk/ab5.0/abdev/abdev/Caret.cpp
r475 r625 122 122 // 選択範囲(バッファインデックス)を取得 123 123 ////////////////////////////////////////// 124 extern MDIINFO MdiInfo[MAX_WNDNUM];125 124 126 125 pCharRange->cpMin=GetBufferIndexFromCaretPos( … … 149 148 } 150 149 void TextEdit_GetSelText(int WndNum,CHARRANGE *pCharRange,char *buffer){ 151 extern MDIINFO MdiInfo[MAX_WNDNUM];152 150 153 151 memcpy(buffer, … … 158 156 159 157 void GetScrollBaseCaretPos(int WndNum,int *pNaturalBaseX,int *pNaturalBaseY){ 160 extern MDIINFO MdiInfo[MAX_WNDNUM];161 158 162 159 HWND hEdit; … … 176 173 177 174 void GetNaturalBaseCaretPos(int WndNum,int *pScrollBaseX,int *pScrollBaseY){ 178 extern MDIINFO MdiInfo[MAX_WNDNUM];179 175 180 176 HWND hEdit; … … 194 190 195 191 void TextEdit_SetSel(int WndNum,int StartIndex,int EndIndex,BOOL bShowCenter){ 196 extern MDIINFO MdiInfo[MAX_WNDNUM];197 192 198 193 GetCaretPosFromBufferIndex( … … 216 211 } 217 212 void TextEdit_SelectOneLine(int WndNum,int code_pos,BOOL bShowCenter){ 218 extern MDIINFO MdiInfo[MAX_WNDNUM];219 213 220 214 /////////////////////// … … 235 229 void ResetCaretPos(int WndNum,BOOL bInputAndReset){ 236 230 extern HANDLE hHeap; 237 extern MDIINFO MdiInfo[MAX_WNDNUM];238 231 int x,y; 239 232 … … 465 458 } 466 459 BOOL TextEdit_ScrollCaret(int WndNum,BOOL bScrollOneStep_x,BOOL bShowCenter){ 467 extern MDIINFO MdiInfo[MAX_WNDNUM];468 460 int x,y; 469 461 BOOL bScroll=0; … … 537 529 538 530 void CaretPos_LooseToNatural(int WndNum,int loose_x,int loose_y,POINT *pCaretPos){ 539 extern MDIINFO MdiInfo[MAX_WNDNUM];540 531 int i,i2,LastPos; 541 532 int x,y; … … 650 641 ///////////////////////////// 651 642 652 extern MDIINFO MdiInfo[MAX_WNDNUM];653 643 654 644 //ピクセル座標をカーソル座標(文字単位)に変更 … … 664 654 /////////////////////////// 665 655 666 extern MDIINFO MdiInfo[MAX_WNDNUM];667 656 int i; 668 657 int x,y; … … 719 708 /////////////////////////// 720 709 721 extern MDIINFO MdiInfo[MAX_WNDNUM];722 710 int i,i2; 723 711 char *pBuf; … … 773 761 // キャレット移動(上キー) 774 762 /////////////////////////// 775 extern MDIINFO MdiInfo[MAX_WNDNUM];776 763 777 764 if(pCaretPos->y==0){ … … 795 782 // キャレット移動(下キー) 796 783 /////////////////////////// 797 extern MDIINFO MdiInfo[MAX_WNDNUM];798 784 799 785 //上下のキャレット移動時には、左右方向の位置を保持する … … 812 798 // キャレット移動(PageUpキー) 813 799 /////////////////////////////// 814 extern MDIINFO MdiInfo[MAX_WNDNUM];815 800 816 801 if(pCaretPos->y==0){ … … 839 824 // キャレット移動(PageUpキー) 840 825 /////////////////////////////// 841 extern MDIINFO MdiInfo[MAX_WNDNUM];842 826 843 827 //上下のキャレット移動時には、左右方向の位置を保持する -
trunk/ab5.0/abdev/abdev/ChildWndOnRebar.cpp
r477 r625 40 40 LRESULT CALLBACK DocComboProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 41 41 extern WNDPROC OldDocComboProc; 42 extern MDIINFO MdiInfo[MAX_WNDNUM];43 42 int i; 44 43 char str[MAX_PATH]; … … 48 47 if(HIWORD(wParam)==CBN_SELCHANGE){ 49 48 SendMessage(hwnd,CB_GETLBTEXT,SendMessage(hwnd,CB_GETCURSEL,0,0),(long)str); 50 for(i=0;i<M AX_WNDNUM;i++){49 for(i=0;i<MdiInfo.size();i++){ 51 50 if(lstrcmpi(str,MdiInfo[i].title)==0) break; 52 51 } … … 181 180 extern WNDPROC OldDocComboProc; 182 181 extern HFONT hStatusFont; 183 extern MDIINFO MdiInfo[MAX_WNDNUM];184 182 int i,i2; 185 183 HWND hTempWnd; … … 200 198 hTempWnd=GetWindow(hClient,GW_CHILD); 201 199 if(IsWindow(hTempWnd)){ 202 for(i=0,i2=0;i<M AX_WNDNUM;i++){200 for(i=0,i2=0;i<MdiInfo.size();i++){ 203 201 if(MdiInfo[i].hwnd){ 204 202 GetWindowText(MdiInfo[i].hwnd,buffer,MAX_PATH); -
trunk/ab5.0/abdev/abdev/ClassTree.cpp
r619 r625 444 444 } 445 445 void SetClassTreeFromOneFile(char *lpszFilePath,int iFileNum){ 446 extern MDIINFO MdiInfo[MAX_WNDNUM];447 446 int WndNum; 448 447 HWND hChild=GetWindow(hClient,GW_CHILD); 449 448 while(hChild){ 450 449 WndNum=GetWndNum(hChild); 451 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){ 452 if(lstrcmpi(MdiInfo[WndNum].path,lpszFilePath)==0) break; 453 } 454 hChild=GetNextWindow(hChild,GW_HWNDNEXT); 450 if( WndNum != -1 ) 451 { 452 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){ 453 if(lstrcmpi(MdiInfo[WndNum].path.c_str(),lpszFilePath)==0) break; 454 } 455 hChild=GetNextWindow(hChild,GW_HWNDNEXT); 456 } 455 457 } 456 458 -
trunk/ab5.0/abdev/abdev/Common.h
r624 r625 258 258 struct RAD_UNDOSTATE_NAME{ 259 259 std::string name; 260 std::string HandleName;261 char *CallBackName;262 260 }; 263 261 #define RAD_UNDO_INSERTWND 1 … … 357 355 int DocType; 358 356 char *title; 359 char *path;357 std::string path; 360 358 361 359 union{ … … 368 366 char *IndentStr; 369 367 }; 370 extern MDIINFO MdiInfo[MAX_WNDNUM];368 extern std::vector<MDIINFO> MdiInfo; 371 369 372 370 //RADツールのマウスドラッグ … … 483 481 #define EVENTTYPE_MMSYS 2 484 482 485 //ウィンドウ タイプ486 #define WNDTYPE_DEFAULT 0487 #define WNDTYPE_MODALDLG 1488 #define WNDTYPE_MODELESSDLG 3489 483 490 484 struct NEWPROJECTINFO{ … … 648 642 char *ReadBuffer( const std::string &path ); 649 643 char *ReadBuffer_NonErrMsg( const std::string &path ); 650 _int8 WriteBuffer(const std::string &path,c har *buffer,int length, bool isEnableError = true);644 _int8 WriteBuffer(const std::string &path,const char *buffer,int length, bool isEnableError = true); 651 645 _int8 WriteBuffer_NonErrMsg(const std::string &path,char *buffer,int length); 652 646 void GetRelationalPath(char *path,char *dir); … … 738 732 void SetupWindow(HWND hwnd); 739 733 BOOL SetRunning(HWND hChild); 740 BOOL IsNeedCompile( char *FileName,BOOL bDebug);734 BOOL IsNeedCompile( const std::string &filepath, BOOL bDebug ); 741 735 std::string GetLastErrorString(); 742 736 … … 875 869 876 870 void add(char *path); 877 void insert(c har *path);871 void insert(const char *path); 878 872 879 873 void ResetFileMenu(CSubMenuEx *pobj_SubMenu,BOOL bOwnerDraw); … … 969 963 970 964 //WindowControl.cpp 971 int GetWndInfoNum( char *name);972 ActiveBasic::PM::WindowInfo *GetWndInfo( c har *name );965 int GetWndInfoNum( const std::string &name ); 966 ActiveBasic::PM::WindowInfo *GetWndInfo( const std::string &name ); 973 967 HGLOBAL Rad_GetChildInfoClipboardData(int WndNum,int WndInfoNum); 974 968 void Rad_PasteChildInfoClipboardData(int WndNum,HGLOBAL hGlobal); 975 969 char *PermutationWndPgmTemplate(char *pBuf,const char *pPjName, char *pWndName, char *pHandleName, char *pProcName); 970 const std::string PermutationWndPgmTemplate( const std::string &templateFilePath, const std::string &projectName, std::string &windowName, std::string &handleName, std::string &procName ); 976 971 void GetItemClassName(char *buffer,int Control); 977 972 void SaveWindowProgram(); … … 1057 1052 1058 1053 //MenuProc.cpp 1059 int GetMenuInfoNum(const char *name);1054 int GetMenuInfoNum(const std::string &name); 1060 1055 void HeapMenuDataFree(MENU_INFO *pMenuInfo,int ItemNum,int *NumberOfFreedItem); 1061 1056 BOOL CALLBACK DlgProject_MenuID_Input(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam); -
trunk/ab5.0/abdev/abdev/Complement.cpp
r475 r625 388 388 iControlTabSpace=MdiInfo[WndNum].pMdiTextEdit->iWidth_ControlTabSpace; 389 389 390 extern MDIINFO MdiInfo[MAX_WNDNUM];391 390 extern int font_width,font_height; 392 391 POINT pos; … … 612 611 613 612 LRESULT CALLBACK ComplementListViewProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 614 extern MDIINFO MdiInfo[MAX_WNDNUM];615 613 extern COMPLEMENT_WINDOW_INFO ComplementWndInfo; 616 614 int i,WndNum; -
trunk/ab5.0/abdev/abdev/Debugger.cpp
r619 r625 251 251 252 252 char temporary[MAX_PATH]; 253 sprintf(temporary,"\"%s\",%d",MdiInfo[WndNum].path ,MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y);253 sprintf(temporary,"\"%s\",%d",MdiInfo[WndNum].path.c_str(),MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y); 254 254 255 255 char temp2[MAX_PATH]; … … 281 281 ////////////////////////// 282 282 283 CFileBreakPoint::CFileBreakPoint(c har *lpszFileName,int iLineNum){283 CFileBreakPoint::CFileBreakPoint(const char *lpszFileName,int iLineNum){ 284 284 this->lpszFileName=(char *)HeapAlloc(hHeap,0,lstrlen(lpszFileName)+1); 285 285 lstrcpy(this->lpszFileName,lpszFileName); … … 389 389 HeapDefaultFree(ppItem); 390 390 } 391 void CDBBreakPoint::insert( char *lpszFileName,int iLineNum){391 void CDBBreakPoint::insert( const char *lpszFileName,int iLineNum){ 392 392 int i; 393 393 for(i=0;i<num;i++){ … … 404 404 } 405 405 } 406 void CDBBreakPoint::remove( char *lpszFileName,int iLineNum){406 void CDBBreakPoint::remove( const char *lpszFileName,int iLineNum){ 407 407 int i; 408 408 for(i=0;i<num;i++){ … … 429 429 if(WndNum==-1) return; 430 430 431 if(!IsExistFile(MdiInfo[WndNum].path)) return; 431 if( !Jenga::Common::Path( MdiInfo[WndNum].path ).IsExistFile() ) 432 { 433 return; 434 } 432 435 433 436 int i,i2,sw=0; 434 437 for(i=0;i<num;i++){ 435 if(lstrcmpi(MdiInfo[WndNum].path ,ppItem[i]->lpszFileName)==0){438 if(lstrcmpi(MdiInfo[WndNum].path.c_str(),ppItem[i]->lpszFileName)==0){ 436 439 for(i2=0;i2<ppItem[i]->num;i2++){ 437 440 if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y==ppItem[i]->piLine[i2]){ … … 446 449 if(sw==0){ 447 450 //ブレークポイントを追加 448 insert(MdiInfo[WndNum].path ,MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y);451 insert(MdiInfo[WndNum].path.c_str(),MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y); 449 452 } 450 453 else{ 451 454 //ブレークポイントを削除 452 remove(MdiInfo[WndNum].path ,MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y);455 remove(MdiInfo[WndNum].path.c_str(),MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y); 453 456 } 454 457 … … 500 503 501 504 502 CFileBreakPoint *CDBBreakPoint::EnumLines(c har *lpszFilePath){505 CFileBreakPoint *CDBBreakPoint::EnumLines(const char *lpszFilePath){ 503 506 int i; 504 507 for(i=0;i<num;i++){ … … 510 513 } 511 514 512 void CDBBreakPoint::replace( LPSTRlpszFilePath,LPSTR lpszBuffer,CHARRANGE *pDelRange,CHARRANGE *pRange,LPSTR lpszNewStr){515 void CDBBreakPoint::replace(const char *lpszFilePath,LPSTR lpszBuffer,CHARRANGE *pDelRange,CHARRANGE *pRange,LPSTR lpszNewStr){ 513 516 int i; 514 517 for(i=0;i<num;i++){ -
trunk/ab5.0/abdev/abdev/Debugger.h
r3 r625 53 53 int num; 54 54 55 CFileBreakPoint(c har *lpszFileName,int iLineNum);55 CFileBreakPoint(const char *lpszFileName,int iLineNum); 56 56 ~CFileBreakPoint(); 57 57 … … 72 72 ~CDBBreakPoint(); 73 73 74 void insert( char *lpszFileName,int iLineNum);75 void remove( char *lpszFileName,int iLineNum);74 void insert( const char *lpszFileName,int iLineNum); 75 void remove( const char *lpszFileName,int iLineNum); 76 76 77 77 void Event_BreakPoint(void); 78 78 void SaveToTempFile(void); 79 79 80 CFileBreakPoint *EnumLines(c har *lpszFilePath);80 CFileBreakPoint *EnumLines(const char *lpszFilePath); 81 81 82 void replace( LPSTRlpszFilePath,LPSTR lpszBuffer,CHARRANGE *pDelRange,CHARRANGE *pRange,LPSTR lpszNewStr);82 void replace(const char *lpszFilePath,LPSTR lpszBuffer,CHARRANGE *pDelRange,CHARRANGE *pRange,LPSTR lpszNewStr); 83 83 }; -
trunk/ab5.0/abdev/abdev/DocumentAdvice.cpp
r620 r625 179 179 180 180 #define MEM_SPACE 1024 //強制終了を防ぐためのゆとりスペース 181 extern MDIINFO MdiInfo[MAX_WNDNUM]; 182 for(i3=0;i3<MAX_WNDNUM;i3++){ 181 for(i3=0;i3<MdiInfo.size();i3++){ 183 182 if(MdiInfo[i3].hwnd){ 184 if(lstrcmpi(temporary,MdiInfo[i3].path )==0) break;185 } 186 } 187 if(i3==M AX_WNDNUM){183 if(lstrcmpi(temporary,MdiInfo[i3].path.c_str())==0) break; 184 } 185 } 186 if(i3==MdiInfo.size()){ 188 187 //ファイルから開く 189 188 HANDLE fh; -
trunk/ab5.0/abdev/abdev/DrawBuffer.cpp
r619 r625 193 193 if( projectInfo.IsOpened() ){ 194 194 pobj_FileBreakPoint= 195 projectInfo.pobj_DBBreakPoint->EnumLines(MdiInfo[m_WndNum].path );195 projectInfo.pobj_DBBreakPoint->EnumLines(MdiInfo[m_WndNum].path.c_str()); 196 196 } 197 197 else{ 198 198 extern CDBBreakPoint *pobj_DBBreakPoint; 199 pobj_FileBreakPoint=pobj_DBBreakPoint->EnumLines(MdiInfo[m_WndNum].path );199 pobj_FileBreakPoint=pobj_DBBreakPoint->EnumLines(MdiInfo[m_WndNum].path.c_str()); 200 200 } 201 201 … … 266 266 267 267 void TextEdit_DrawBuffer(HDC hdc,int WndNum){ 268 extern MDIINFO MdiInfo[MAX_WNDNUM];269 268 int i,i2; 270 269 int x,y; -
trunk/ab5.0/abdev/abdev/DrawWindow.cpp
r624 r625 4 4 5 5 void DrawLineInClient(int WndNum,long StartX,long StartY,long EndX,long EndY){ 6 extern MDIINFO MdiInfo[MAX_WNDNUM];7 6 MoveToEx(MdiInfo[WndNum].MdiRadInfo->hMemDC, 8 7 StartX+MdiInfo[WndNum].MdiRadInfo->ClientPos.x, … … 14 13 } 15 14 void DrawRectangleInClient(int WndNum,long left,long top,long right,long bottom,COLORREF RGB_Pen,COLORREF RGB_Brush,BOOL bBrushing){ 16 extern MDIINFO MdiInfo[MAX_WNDNUM];17 15 HPEN hPen,hOldPen; 18 16 HBRUSH hBrush,hOldBrush; … … 36 34 } 37 35 void DrawButtonEdge(int WndNum,POINT *pPos,SIZE *pSize){ 38 extern MDIINFO MdiInfo[MAX_WNDNUM];39 36 HPEN hPen,hOldPen; 40 37 … … 86 83 } 87 84 void DrawItemEdgeByExStyle(int WndNum,int ExStyle,POINT *pPos,SIZE *pSize){ 88 extern MDIINFO MdiInfo[MAX_WNDNUM];89 85 HPEN hPen,hOldPen; 90 86 RECT rect; … … 172 168 } 173 169 void DrawScrollBar(int WndNum,DWORD style,BOOL bSwitch,POINT *pPos,SIZE *pSize){ 174 extern MDIINFO MdiInfo[MAX_WNDNUM];175 170 int i,i2; 176 171 HPEN hPen,hOldPen; … … 487 482 } 488 483 void DrawUpDownControl(int WndNum,DWORD style,BOOL bSwitch,POINT *pPos,SIZE *pSize){ 489 extern MDIINFO MdiInfo[MAX_WNDNUM];490 484 int i,i2; 491 485 HPEN hPen,hOldPen; … … 688 682 } 689 683 void DesigningWindow(int WndNum,HDC hdc,POINT *pBasePos,const ActiveBasic::PM::WindowInfo *pWindowInfo){ 690 extern MDIINFO MdiInfo[MAX_WNDNUM];691 684 int i,i2,i3,i4; 692 685 double red,green,blue,d_red,d_green,d_blue; … … 1773 1766 } 1774 1767 void DrawRadWindow(int WndNum,const ActiveBasic::PM::WindowInfo *pWindowInfo){ 1775 extern MDIINFO MdiInfo[MAX_WNDNUM];1776 1768 HBRUSH hOldBrush; 1777 1769 POINT pos; -
trunk/ab5.0/abdev/abdev/ExtensionLink.cpp
r475 r625 197 197 } 198 198 199 COLORREF CExtLink::GetTabColorFromFilePath(char *path){ 199 COLORREF CExtLink::GetTabColorFromFilePath( const std::string &filepath ) 200 { 200 201 //拡張子を識別し、タブの色を決定 201 202 char szExt[255],*lpszTemp; 202 _splitpath( path,NULL,NULL,NULL,szExt);203 _splitpath(filepath.c_str(),NULL,NULL,NULL,szExt); 203 204 if(szExt[0]=='.') lpszTemp=szExt+1; 204 205 else lpszTemp=szExt; -
trunk/ab5.0/abdev/abdev/ExtensionLink.h
r3 r625 31 31 void ResetListView(HWND hListView); 32 32 33 COLORREF GetTabColorFromFilePath( char *path);33 COLORREF GetTabColorFromFilePath( const std::string &filepath ); 34 34 }; 35 35 -
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; -
trunk/ab5.0/abdev/abdev/History.cpp
r475 r625 57 57 iNum++; 58 58 } 59 void CHistory::insert(c har *path){59 void CHistory::insert(const char *path){ 60 60 //重複チェック 61 61 int i; -
trunk/ab5.0/abdev/abdev/IconEditor.cpp
r620 r625 29 29 } 30 30 void ResetIconType(int WndNum){ 31 extern MDIINFO MdiInfo[MAX_WNDNUM];32 31 int i; 33 32 HWND hCombo; … … 127 126 void AddIconType(int WndNum,int IconType){ 128 127 extern HANDLE hHeap; 129 extern MDIINFO MdiInfo[MAX_WNDNUM];130 128 int i,width,BitCount; 131 129 … … 192 190 } 193 191 void DeleteIconType(int WndNum){ 194 extern MDIINFO MdiInfo[MAX_WNDNUM];195 192 int i; 196 193 … … 241 238 extern HANDLE hHeap; 242 239 extern HWND hDocCombo; 243 extern MDIINFO MdiInfo[MAX_WNDNUM];244 240 int i,i2,IconNum; 245 241 char str[MAX_PATH],str2[32],*buffer; … … 257 253 i=GetWndNum(hChild); 258 254 if(MdiInfo[i].DocType==WNDTYPE_ICONEDIT){ 259 if(lstrcmpi(MdiInfo[i].path ,filepath)==0) break;255 if(lstrcmpi(MdiInfo[i].path.c_str(),filepath)==0) break; 260 256 } 261 257 hChild=GetNextWindow(hChild,GW_HWNDNEXT); … … 373 369 374 370 //ウィンドウのID登録 375 for(i=0;i<MAX_WNDNUM;i++){ 376 if(MdiInfo[i].hwnd==0){ 377 MdiInfo[i].hwnd=hChild; 378 MdiInfo[i].DocType=WNDTYPE_ICONEDIT; 379 MdiInfo[i].title=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(str)+1); 380 lstrcpy(MdiInfo[i].title,str); 381 if(filepath){ 382 MdiInfo[i].path=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(filepath)+1); 383 lstrcpy(MdiInfo[i].path,filepath); 384 } 385 else MdiInfo[i].path=(char *)GlobalAlloc(GPTR,1); 386 387 MdiInfo[i].MdiIconEditInfo=(MDIICONEDITINFO *)HeapAlloc(hHeap,0,sizeof(MDIICONEDITINFO)); 388 MdiInfo[i].MdiIconEditInfo->hMain=hMain; 389 MdiInfo[i].MdiIconEditInfo->hToolDlg=hToolDlg; 390 MdiInfo[i].MdiIconEditInfo->hButtonsDlg=hButtonsDlg; 391 MdiInfo[i].MdiIconEditInfo->hColorDlg=hColorDlg; 392 hdc=GetDC(hMain); 393 MdiInfo[i].MdiIconEditInfo->memdc=CreateCompatibleDC(hdc); 394 MdiInfo[i].MdiIconEditInfo->hMemBmp=CreateCompatibleBitmap(hdc,600,400); 395 SelectObject(MdiInfo[i].MdiIconEditInfo->memdc,MdiInfo[i].MdiIconEditInfo->hMemBmp); 396 ReleaseDC(hMain,hdc); 397 398 MdiInfo[i].MdiIconEditInfo->SelectLevel=0; 399 400 MdiInfo[i].MdiIconEditInfo->num=IconNum; 401 MdiInfo[i].MdiIconEditInfo->SelectIconNum=0; 402 memcpy(MdiInfo[i].MdiIconEditInfo->pIconImage,pImageBuffer,sizeof(DWORD)*IconNum); 403 404 memcpy(MdiInfo[i].MdiIconEditInfo->dwBytesInRes,dwBytesInRes,sizeof(DWORD)*IconNum); 405 406 MdiInfo[i].MdiIconEditInfo->NowTool=IDC_TOOL_PEN; 407 MdiInfo[i].MdiIconEditInfo->MainColor=RGB(0,0,0); 408 extern COLORREF TransparentClrRef; 409 MdiInfo[i].MdiIconEditInfo->SubColor=TransparentClrRef; 410 411 for(i2=0;i2<MdiInfo[i].MdiIconEditInfo->num;i2++){ 412 MdiInfo[i].MdiIconEditInfo->undo[i2].NowPos=0; 413 memset(MdiInfo[i].MdiIconEditInfo->undo[i2].lpData,0,sizeof(BYTE *)*MAX_ICONEDIT_UNDONUM); 414 } 415 MdiInfo[i].MdiIconEditInfo->bModify=0; 416 break; 417 } 418 } 371 MdiInfo.push_back( MDIINFO() ); 372 i = MdiInfo.size()-1; 373 MdiInfo[i].hwnd=hChild; 374 MdiInfo[i].DocType=WNDTYPE_ICONEDIT; 375 MdiInfo[i].title=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(str)+1); 376 lstrcpy(MdiInfo[i].title,str); 377 if(filepath) 378 { 379 MdiInfo[i].path = filepath; 380 } 381 else 382 { 383 MdiInfo[i].path = ""; 384 } 385 386 MdiInfo[i].MdiIconEditInfo=(MDIICONEDITINFO *)HeapAlloc(hHeap,0,sizeof(MDIICONEDITINFO)); 387 MdiInfo[i].MdiIconEditInfo->hMain=hMain; 388 MdiInfo[i].MdiIconEditInfo->hToolDlg=hToolDlg; 389 MdiInfo[i].MdiIconEditInfo->hButtonsDlg=hButtonsDlg; 390 MdiInfo[i].MdiIconEditInfo->hColorDlg=hColorDlg; 391 hdc=GetDC(hMain); 392 MdiInfo[i].MdiIconEditInfo->memdc=CreateCompatibleDC(hdc); 393 MdiInfo[i].MdiIconEditInfo->hMemBmp=CreateCompatibleBitmap(hdc,600,400); 394 SelectObject(MdiInfo[i].MdiIconEditInfo->memdc,MdiInfo[i].MdiIconEditInfo->hMemBmp); 395 ReleaseDC(hMain,hdc); 396 397 MdiInfo[i].MdiIconEditInfo->SelectLevel=0; 398 399 MdiInfo[i].MdiIconEditInfo->num=IconNum; 400 MdiInfo[i].MdiIconEditInfo->SelectIconNum=0; 401 memcpy(MdiInfo[i].MdiIconEditInfo->pIconImage,pImageBuffer,sizeof(DWORD)*IconNum); 402 403 memcpy(MdiInfo[i].MdiIconEditInfo->dwBytesInRes,dwBytesInRes,sizeof(DWORD)*IconNum); 404 405 MdiInfo[i].MdiIconEditInfo->NowTool=IDC_TOOL_PEN; 406 MdiInfo[i].MdiIconEditInfo->MainColor=RGB(0,0,0); 407 extern COLORREF TransparentClrRef; 408 MdiInfo[i].MdiIconEditInfo->SubColor=TransparentClrRef; 409 410 for(i2=0;i2<MdiInfo[i].MdiIconEditInfo->num;i2++){ 411 MdiInfo[i].MdiIconEditInfo->undo[i2].NowPos=0; 412 memset(MdiInfo[i].MdiIconEditInfo->undo[i2].lpData,0,sizeof(BYTE *)*MAX_ICONEDIT_UNDONUM); 413 } 414 MdiInfo[i].MdiIconEditInfo->bModify=0; 415 416 419 417 420 418 //メモリへ初期描画を行う … … 449 447 } 450 448 void SaveIconFile(char *filepath,HWND hwnd){ 451 extern MDIINFO MdiInfo[MAX_WNDNUM];452 449 int i,i2,WndNum; 453 450 char buffer[8192],temporary[MAX_PATH]; … … 534 531 LRESULT CALLBACK MDIClientWindow_IconEdit(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 535 532 extern HWND hDocCombo; 536 extern MDIINFO MdiInfo[MAX_WNDNUM];537 533 int i,WndNum; 538 534 -
trunk/ab5.0/abdev/abdev/IconEditor_Color.cpp
r475 r625 7 7 BOOL CALLBACK DlgIconColorProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 8 8 extern HANDLE hHeap; 9 extern MDIINFO MdiInfo[MAX_WNDNUM];10 9 extern COLORREF TransparentClrRef; 11 10 int i,i2,WndNum; -
trunk/ab5.0/abdev/abdev/IconEditor_Main.cpp
r475 r625 13 13 void LimitRectFormat(int WndNum,RECT *pRect){ 14 14 //はみ出した場合は範囲内におさめる 15 extern MDIINFO MdiInfo[MAX_WNDNUM];16 15 if(pRect->left<0) pRect->left=0; 17 16 if(pRect->top<0) pRect->top=0; … … 33 32 } 34 33 void SetZoomedPixel(HDC hdc,int WndNum,int x,int y){ 35 extern MDIINFO MdiInfo[MAX_WNDNUM];36 34 POINT pos; 37 35 … … 47 45 } 48 46 DWORD GetColorCode(int WndNum,COLORREF ColorRef){ 49 extern MDIINFO MdiInfo[MAX_WNDNUM];50 47 int i,i2; 51 48 RGBQUAD *pRgbq; … … 70 67 ////////////////////////////////////////////// 71 68 72 extern MDIINFO MdiInfo[MAX_WNDNUM];73 69 HDC hDC; 74 70 HBITMAP hBmp; … … 114 110 //////////////////////////////////// 115 111 116 extern MDIINFO MdiInfo[MAX_WNDNUM];117 112 HDC hDC,hDC2; 118 113 BITMAP Bitmap; … … 147 142 148 143 void IconEdit_SelectImage(int WndNum){ 149 extern MDIINFO MdiInfo[MAX_WNDNUM];150 144 SIZE size; 151 145 HDC hDC; … … 169 163 void IconEdit_PasteImage(int WndNum){ 170 164 extern HANDLE hHeap; 171 extern MDIINFO MdiInfo[MAX_WNDNUM];172 165 int i,i2,i3,x,y,y2,selecting_x,selecting_y; 173 166 DWORD dwRgbq; … … 299 292 300 293 void DrawIconToMemBmp(int WndNum,RECT *pRect){ 301 extern MDIINFO MdiInfo[MAX_WNDNUM];302 294 HPEN hPen,hOldPen; 303 295 HBRUSH hBrush,hOldBrush; … … 406 398 407 399 void PixelChange(int WndNum,int x,int y,DWORD ColorCode){ 408 extern MDIINFO MdiInfo[MAX_WNDNUM];409 400 int i; 410 401 int y2; … … 467 458 } 468 459 COLORREF IconEdit_GetPixel(int WndNum,int x,int y){ 469 extern MDIINFO MdiInfo[MAX_WNDNUM];470 460 int i,i2; 471 461 int y2; … … 525 515 } 526 516 void IconEdit_DrawLine(int WndNum,int x1,int y1,int x2,int y2,DWORD ColorCode){ 527 extern MDIINFO MdiInfo[MAX_WNDNUM];528 517 int dx,dy,s,step; 529 518 … … 576 565 } 577 566 void IconEdit_FloodFill(int WndNum,int x,int y,COLORREF FilledColor,DWORD ColorCode){ 578 extern MDIINFO MdiInfo[MAX_WNDNUM];579 567 580 568 if(x<0||y<0) return; … … 610 598 } 611 599 void IconEdit_DrawEllipse(int WndNum,int x1,int y1,int x2,int y2,DWORD ColorCode){ 612 extern MDIINFO MdiInfo[MAX_WNDNUM];613 600 RECT rect,rc2; 614 601 … … 680 667 681 668 void IconEdit_EraseRect(int WndNum,RECT *pRect){ 682 extern MDIINFO MdiInfo[MAX_WNDNUM];683 669 684 670 //変更情報 … … 698 684 699 685 void IconEdit_DrawFrame(HWND hwnd,int WndNum,RECT *pRect){ 700 extern MDIINFO MdiInfo[MAX_WNDNUM];701 686 HDC hdc; 702 687 HPEN hPen,hOldPen; … … 744 729 } 745 730 void IconEdit_DrawSelectingRect(HDC hdc,int WndNum){ 746 extern MDIINFO MdiInfo[MAX_WNDNUM];747 731 int i2,i3; 748 732 HPEN hPen,hOldPen; … … 817 801 void DrawZoomedBitmap(HDC hdc,int WndNum,POINT *pPos){ 818 802 extern HANDLE hHeap; 819 extern MDIINFO MdiInfo[MAX_WNDNUM];820 803 int x,y; 821 804 RGBQUAD rgbq; … … 869 852 } 870 853 int IconEdit_GetStateOfDraggingFrame(int WndNum,int x,int y){ 871 extern MDIINFO MdiInfo[MAX_WNDNUM];872 854 POINT pos; 873 855 RECT rect; … … 892 874 // 選択されているイメージを表示 893 875 894 extern MDIINFO MdiInfo[MAX_WNDNUM];895 876 HDC hDC2; 896 877 SIZE size; … … 914 895 } 915 896 void TempLine(HDC hdc,int WndNum,int x1,int y1,int x2,int y2,COLORREF ColorRef){ 916 extern MDIINFO MdiInfo[MAX_WNDNUM];917 897 int dx,dy,s,step; 918 898 HPEN hPen,hOldPen; … … 977 957 } 978 958 void TempRectangle(HDC hdc,int WndNum,int x1,int y1,int x2,int y2,COLORREF ColorRef,COLORREF FillClrRef,BOOL bFill){ 979 extern MDIINFO MdiInfo[MAX_WNDNUM];980 959 int x,y; 981 960 HPEN hPen,hOldPen; … … 1038 1017 } 1039 1018 void TempEllipse(HDC hdc,int WndNum,int x1,int y1,int x2,int y2,COLORREF ColorRef){ 1040 extern MDIINFO MdiInfo[MAX_WNDNUM];1041 1019 HPEN hPen,hOldPen; 1042 1020 HBRUSH hBrush,hOldBrush; … … 1137 1115 } 1138 1116 LRESULT CALLBACK IconEditWindowProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 1139 extern MDIINFO MdiInfo[MAX_WNDNUM];1140 1117 int WndNum,dx,dy; 1141 1118 BOOL bRedrawMemBmp; -
trunk/ab5.0/abdev/abdev/IconEditor_Tool.cpp
r613 r625 32 32 33 33 BOOL CALLBACK DlgIconButtons(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 34 extern MDIINFO MdiInfo[MAX_WNDNUM];35 34 int WndNum; 36 35 RECT rect; … … 105 104 } 106 105 BOOL CALLBACK DlgIconType(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 107 extern MDIINFO MdiInfo[MAX_WNDNUM];108 106 int i,WndNum; 109 107 HWND hList; … … 180 178 } 181 179 BOOL CALLBACK DlgIconToolProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 182 extern MDIINFO MdiInfo[MAX_WNDNUM];183 180 int i,WndNum; 184 181 -
trunk/ab5.0/abdev/abdev/IconEditor_UndoRedo.cpp
r475 r625 4 4 5 5 void IconEdit_UndoCommand(int WndNum){ 6 extern MDIINFO MdiInfo[MAX_WNDNUM];7 6 int i; 8 7 BYTE *pByte; … … 40 39 } 41 40 void IconEdit_RedoCommand(int WndNum){ 42 extern MDIINFO MdiInfo[MAX_WNDNUM];43 41 BYTE *pByte; 44 42 ICONEDIT_UNDOSTATE *pUndoState; … … 68 66 void IconEdit_NoticeChanging(int WndNum){ 69 67 extern HANDLE hHeap; 70 extern MDIINFO MdiInfo[MAX_WNDNUM];71 68 int i; 72 69 ICONEDIT_UNDOSTATE *pUndoState; -
trunk/ab5.0/abdev/abdev/MenuProc.cpp
r624 r625 11 11 #endif 12 12 13 int GetMenuInfoNum(const char *name){13 int GetMenuInfoNum(const std::string &name){ 14 14 int i; 15 15 for(i=0;i<projectInfo.NumberOfMenu;i++){ 16 if(lstrcmpi(name ,projectInfo.pMenuInfo[i].IdName)==0) return i;16 if(lstrcmpi(name.c_str(),projectInfo.pMenuInfo[i].IdName)==0) return i; 17 17 } 18 18 return -1; … … 68 68 void Project_Menu_Insert(void){ 69 69 extern HANDLE hHeap; 70 extern MDIINFO MdiInfo[MAX_WNDNUM];71 70 extern char NewIdName[MAX_PATH]; 72 71 int i; … … 121 120 //////////////////////////////// 122 121 // ウィンドウ プロパティを更新 123 for(i=0;i<M AX_WNDNUM;i++){122 for(i=0;i<MdiInfo.size();i++){ 124 123 if(MdiInfo[i].hwnd&&MdiInfo[i].DocType==WNDTYPE_RAD){ 125 124 if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW) … … 132 131 void Project_Menu_Delete(int MenuInfoNum){ 133 132 extern HANDLE hHeap; 134 extern MDIINFO MdiInfo[MAX_WNDNUM];135 133 int i; 136 134 137 135 //ウィンドウが開かれている場合は閉じる 138 for(i=0;i<M AX_WNDNUM;i++){139 if(MdiInfo[i].hwnd&&lstrcmpi(projectInfo.pMenuInfo[MenuInfoNum].IdName,MdiInfo[i].path )==0){136 for(i=0;i<MdiInfo.size();i++){ 137 if(MdiInfo[i].hwnd&&lstrcmpi(projectInfo.pMenuInfo[MenuInfoNum].IdName,MdiInfo[i].path.c_str())==0){ 140 138 SendMessage(MdiInfo[i].hwnd,WM_CLOSE,0,0); 141 139 break; … … 166 164 //////////////////////////////// 167 165 // ウィンドウ プロパティを更新 168 for(i=0;i<M AX_WNDNUM;i++){166 for(i=0;i<MdiInfo.size();i++){ 169 167 if(MdiInfo[i].hwnd&&MdiInfo[i].DocType==WNDTYPE_RAD){ 170 168 if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW) 171 ChangePropertyWindow(i,GetWndInfoNum(MdiInfo[i].path ));169 ChangePropertyWindow(i,GetWndInfoNum(MdiInfo[i].path.c_str())); 172 170 } 173 171 } … … 192 190 extern HINSTANCE hInst; 193 191 extern HWND hDocCombo; 194 extern MDIINFO MdiInfo[MAX_WNDNUM];195 192 int i; 196 193 HWND hChild,hListWnd,hMenuEdit; … … 203 200 i=GetWndNum(hChild); 204 201 if(MdiInfo[i].DocType==WNDTYPE_MENU){ 205 if(lstrcmpi(MdiInfo[i].path ,pMenuInfo->IdName)==0) break;202 if(lstrcmpi(MdiInfo[i].path.c_str(),pMenuInfo->IdName)==0) break; 206 203 } 207 204 hChild=GetNextWindow(hChild,GW_HWNDNEXT); … … 249 246 hChild,NULL,hInst,NULL); 250 247 248 251 249 //ウィンドウのID登録 252 for(i=0;i<MAX_WNDNUM;i++){ 253 if(MdiInfo[i].hwnd==0){ 254 MdiInfo[i].hwnd=hChild; 255 MdiInfo[i].DocType=WNDTYPE_MENU; 256 MdiInfo[i].title=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(pMenuInfo->IdName)+1); 257 lstrcpy(MdiInfo[i].title,pMenuInfo->IdName); 258 MdiInfo[i].path=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(pMenuInfo->IdName)+1); 259 lstrcpy(MdiInfo[i].path,pMenuInfo->IdName); 260 261 262 ///////////////////// 263 //MENU ウィンドウ情報 264 265 MdiInfo[i].MdiMenuInfo=(MDIMENUINFO *)GlobalAlloc(GPTR,sizeof(MDIMENUINFO)); 266 267 MdiInfo[i].MdiMenuInfo->hList=hListWnd; 268 269 MdiInfo[i].MdiMenuInfo->hMenuEdit=hMenuEdit; 270 MdiInfo[i].MdiMenuInfo->hEdit_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_PROJECT_MENUEDIT),hMenuEdit,(DLGPROC)MenuEditDlg); 271 272 SCROLLINFO ScrollInfo; 273 ScrollInfo.cbSize=sizeof(SCROLLINFO); 274 ScrollInfo.fMask=SIF_POS; 275 ScrollInfo.nPos=0; 276 SetScrollInfo(MdiInfo[i].MdiMenuInfo->hMenuEdit,SB_VERT,&ScrollInfo,1); 277 278 SendMessage(hListWnd,LB_RESETCONTENT,0,0); 279 SetMenuDataList(hListWnd,pMenuInfo,0); 280 if(pMenuInfo->NumberOfMenu){ 281 SendMessage(hListWnd,LB_SETCURSEL,0,0); 282 SendMessage(hChild,WM_COMMAND,MAKELONG(0,LBN_SELCHANGE),(long)hListWnd); 283 } 284 break; 285 } 286 } 250 MdiInfo.push_back( MDIINFO() ); 251 i = MdiInfo.size()-1; 252 MdiInfo[i].hwnd=hChild; 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); 256 MdiInfo[i].path = pMenuInfo->IdName; 257 258 259 ///////////////////// 260 //MENU ウィンドウ情報 261 262 MdiInfo[i].MdiMenuInfo=(MDIMENUINFO *)GlobalAlloc(GPTR,sizeof(MDIMENUINFO)); 263 264 MdiInfo[i].MdiMenuInfo->hList=hListWnd; 265 266 MdiInfo[i].MdiMenuInfo->hMenuEdit=hMenuEdit; 267 MdiInfo[i].MdiMenuInfo->hEdit_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_PROJECT_MENUEDIT),hMenuEdit,(DLGPROC)MenuEditDlg); 268 269 SCROLLINFO ScrollInfo; 270 ScrollInfo.cbSize=sizeof(SCROLLINFO); 271 ScrollInfo.fMask=SIF_POS; 272 ScrollInfo.nPos=0; 273 SetScrollInfo(MdiInfo[i].MdiMenuInfo->hMenuEdit,SB_VERT,&ScrollInfo,1); 274 275 SendMessage(hListWnd,LB_RESETCONTENT,0,0); 276 SetMenuDataList(hListWnd,pMenuInfo,0); 277 if(pMenuInfo->NumberOfMenu){ 278 SendMessage(hListWnd,LB_SETCURSEL,0,0); 279 SendMessage(hChild,WM_COMMAND,MAKELONG(0,LBN_SELCHANGE),(long)hListWnd); 280 } 281 287 282 288 283 //ウィンドウ位置を初期化 … … 332 327 extern HANDLE hHeap; 333 328 extern HWND hClient,hOwner; 334 extern MDIINFO MdiInfo[MAX_WNDNUM];335 329 int i; 336 330 char temporary[MAX_PATH]; … … 744 738 LRESULT CALLBACK MenuEditWindow(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 745 739 extern HINSTANCE hInst; 746 extern MDIINFO MdiInfo[MAX_WNDNUM];747 740 int i; 748 741 RECT rect; … … 797 790 LRESULT CALLBACK MDIClientWindow_Menu(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 798 791 extern HWND hDocCombo; 799 extern MDIINFO MdiInfo[MAX_WNDNUM];800 792 int i,i2,i3,WndNum,MenuInfoNum; 801 793 MENU_INFO *pMenuInfo; -
trunk/ab5.0/abdev/abdev/MessageCallOperation.cpp
r624 r625 39 39 40 40 NameLen=pWindowInfo->GetName().size(); 41 CallBackNameLen= lstrlen(pWindowInfo->CallBackName);42 43 buffer = ReadBuffer( projectInfo.GetWorkDir().GetPath() + pWindowInfo-> filepath);41 CallBackNameLen=pWindowInfo->GetCallbackName().size(); 42 43 buffer = ReadBuffer( projectInfo.GetWorkDir().GetPath() + pWindowInfo->GetSourceFileName() ); 44 44 45 45 *num=0; … … 117 117 i2+=9; 118 118 while(buffer[i2]==' '||buffer[i2]=='\t') i2++; 119 if(memicmp(buffer+i2,pWindowInfo-> CallBackName,CallBackNameLen)==0&&119 if(memicmp(buffer+i2,pWindowInfo->GetCallbackName().c_str(),CallBackNameLen)==0&& 120 120 (buffer[i2+CallBackNameLen]==' '||buffer[i2+CallBackNameLen]=='\t'||buffer[i2+CallBackNameLen]=='(')){ 121 121 *pbAlways=1; … … 129 129 } 130 130 void SelectProcedureOfMessageCall(int WndInfoNum,char *ProcedureName,char *Parameter){ 131 extern MDIINFO MdiInfo[MAX_WNDNUM];132 131 int i,i2,i3,WndNum; 133 132 char temporary[MAX_PATH],*pBuf; … … 137 136 ActiveBasic::PM::WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum]; 138 137 139 hChild=OpenFileWithExtension( projectInfo.GetWorkDir().GetPath() + pWindowInfo-> filepath);138 hChild=OpenFileWithExtension( projectInfo.GetWorkDir().GetPath() + pWindowInfo->GetSourceFileName() ); 140 139 if(!hChild) return; 141 140 WndNum=GetWndNum(hChild); … … 216 215 } 217 216 BOOL GetEventProcedureNameFromListView(HWND hList,int WndNum,int WndInfoNum,char *EventName,char *Parameter,DWORD dwEventType){ 218 extern MDIINFO MdiInfo[MAX_WNDNUM];219 217 int i,MaxCount; 220 218 char temporary[MAX_PATH]; … … 394 392 } 395 393 void SetEventToList(HWND hDlg,DWORD dwEventType){ 396 extern MDIINFO MdiInfo[MAX_WNDNUM];397 394 int i,i2,WndNum; 398 395 HWND hList; … … 586 583 } 587 584 BOOL CALLBACK DlgEventCode(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 588 extern MDIINFO MdiInfo[MAX_WNDNUM];589 585 int WndNum,WndInfoNum,i,i2; 590 586 char temporary[MAX_PATH],temp2[MAX_PATH]; -
trunk/ab5.0/abdev/abdev/ParameterHint.cpp
r620 r625 38 38 lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() ); 39 39 40 extern MDIINFO MdiInfo[MAX_WNDNUM]; 41 for(i=0;i<MAX_WNDNUM;i++){ 40 for(i=0;i<MdiInfo.size();i++){ 42 41 if(MdiInfo[i].hwnd){ 43 if(lstrcmpi(MdiInfo[i].path ,temporary)==0) break;44 } 45 } 46 if(i==M AX_WNDNUM){42 if(lstrcmpi(MdiInfo[i].path.c_str(),temporary)==0) break; 43 } 44 } 45 if(i==MdiInfo.size()){ 47 46 //ファイルから開く 48 47 pBuf=ReadBuffer(temporary); … … 56 55 else{ 57 56 //単体ソースコードのとき 58 extern MDIINFO MdiInfo[MAX_WNDNUM];59 57 int WndNum; 60 58 … … 682 680 void ShowParameterHint(int WndNum){ 683 681 extern HANDLE hHeap; 684 extern MDIINFO MdiInfo[MAX_WNDNUM];685 682 extern METHODCHECKINFO MethodCheckInfo; 686 683 int i,i2,i3,IsStr,IsComment,PareNum,iPos; … … 1238 1235 extern HINSTANCE hInst; 1239 1236 extern METHODCHECKINFO MethodCheckInfo; 1240 extern MDIINFO MdiInfo[MAX_WNDNUM];1241 1237 HDC hdc,memdc; 1242 1238 RECT rect,rc2; -
trunk/ab5.0/abdev/abdev/ProjectControl.cpp
r624 r625 42 42 LRESULT CALLBACK TabProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 43 43 extern HANDLE hHeap; 44 extern MDIINFO MdiInfo[MAX_WNDNUM];45 44 extern LPSTR DefFileFilter; 46 45 int i,i2,WndNum; … … 1057 1056 windowInfos.push_back( new ActiveBasic::PM::WindowInfo() ); 1058 1057 windowInfos.back()->SetName( "MainWnd" ); 1059 windowInfos.back()->SetHandleName( "hMainWnd" );1060 1058 windowInfos.back()->pos.x=CW_USEDEFAULT; 1061 1059 windowInfos.back()->pos.y=CW_USEDEFAULT; … … 1077 1075 windowInfos.back()->SetIconResourceName( "" ); 1078 1076 windowInfos.back()->SetClassName( "NORMAL" ); 1079 windowInfos.back()->CallBackName="MainWndProc"; 1080 windowInfos.back()->type=WNDTYPE_DEFAULT; 1081 windowInfos.back()->filepath="MainWnd.ab"; 1077 windowInfos.back()->SetType( ActiveBasic::PM::WindowType::Default ); 1082 1078 sprintf(temporary,"%s%s.wnd",dir,NewProjectInfo.name); 1083 1079 … … 1244 1240 ////////////////////////////////////////// 1245 1241 //ワークファイル(*.wrk)をオープン 1246 extern MDIINFO MdiInfo[MAX_WNDNUM];1247 1242 HTREEITEM hTreeItem; 1248 1243 HANDLE hFind; … … 1571 1566 } 1572 1567 BOOL ProjectModifyCheck(BOOL bRun){ 1573 extern MDIINFO MdiInfo[MAX_WNDNUM];1574 1568 int i,WndNum,sw; 1575 1569 HWND hChild; … … 1601 1595 for(i=0;i<projectInfo.pobj_DBFileInfo->iNum;i++){ 1602 1596 projectInfo.pobj_DBFileInfo->ppobj_FileInfo[i]->GetFullPath(temporary); 1603 if(lstrcmpi(MdiInfo[WndNum].path ,temporary)==0) sw=1;1597 if(lstrcmpi(MdiInfo[WndNum].path.c_str(),temporary)==0) sw=1; 1604 1598 } 1605 1599 } … … 1611 1605 lstrcpy(temporary,resourceItem.filepath.c_str()); 1612 1606 lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() ); 1613 if(lstrcmpi(MdiInfo[WndNum].path ,temporary)==0) sw=1;1607 if(lstrcmpi(MdiInfo[WndNum].path.c_str(),temporary)==0) sw=1; 1614 1608 } 1615 1609 } … … 1639 1633 } 1640 1634 void MakeWorkFile(void){ 1641 extern MDIINFO MdiInfo[MAX_WNDNUM];1642 1635 int i,i2,WndNum; 1643 1636 char temporary[MAX_PATH],buffer[32767]; … … 1658 1651 for(i=0;i<projectInfo.pobj_DBFileInfo->iNum;i++){ 1659 1652 projectInfo.pobj_DBFileInfo->ppobj_FileInfo[i]->GetFullPath(temporary); 1660 if(lstrcmpi(MdiInfo[WndNum].path ,temporary)==0){1653 if(lstrcmpi(MdiInfo[WndNum].path.c_str(),temporary)==0){ 1661 1654 TextEdit_GetSel(WndNum,&CharRange); 1662 1655 … … 1684 1677 BOOST_FOREACH( ActiveBasic::PM::WindowInfo *pWindowInfo, projectInfo.windowInfos ) 1685 1678 { 1686 if(lstrcmpi(MdiInfo[WndNum].path ,pWindowInfo->GetName().c_str())==0){1687 sprintf(buffer+i2,"rad,%s\r\n",MdiInfo[WndNum].path );1679 if(lstrcmpi(MdiInfo[WndNum].path.c_str(),pWindowInfo->GetName().c_str())==0){ 1680 sprintf(buffer+i2,"rad,%s\r\n",MdiInfo[WndNum].path.c_str()); 1688 1681 i2+=lstrlen(buffer+i2); 1689 1682 break; … … 1693 1686 else if(MdiInfo[WndNum].DocType==WNDTYPE_MENU){ 1694 1687 for(i=0;i<projectInfo.NumberOfMenu;i++){ 1695 if(lstrcmpi(MdiInfo[WndNum].path ,projectInfo.pMenuInfo[i].IdName)==0){1696 sprintf(buffer+i2,"menu,%s\r\n",MdiInfo[WndNum].path );1688 if(lstrcmpi(MdiInfo[WndNum].path.c_str(),projectInfo.pMenuInfo[i].IdName)==0){ 1689 sprintf(buffer+i2,"menu,%s\r\n",MdiInfo[WndNum].path.c_str()); 1697 1690 i2+=lstrlen(buffer+i2); 1698 1691 break; … … 1705 1698 lstrcpy(temporary,resourceItem.filepath.c_str()); 1706 1699 lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() ); 1707 if(lstrcmpi(MdiInfo[WndNum].path ,temporary)==0){1700 if(lstrcmpi(MdiInfo[WndNum].path.c_str(),temporary)==0){ 1708 1701 sprintf(buffer+i2,"icon,%s\r\n",resourceItem.filepath.c_str()); 1709 1702 i2+=lstrlen(buffer+i2); -
trunk/ab5.0/abdev/abdev/RadProc.cpp
r624 r625 8 8 extern HINSTANCE hInst,hResInst; 9 9 extern HWND hDocCombo; 10 extern MDIINFO MdiInfo[MAX_WNDNUM];11 10 int i,i2; 12 11 HWND hChild; … … 19 18 i=GetWndNum(hChild); 20 19 if(MdiInfo[i].DocType==WNDTYPE_RAD){ 21 if(lstrcmpi(MdiInfo[i].path ,windowInfo.GetName().c_str())==0) break;20 if(lstrcmpi(MdiInfo[i].path.c_str(),windowInfo.GetName().c_str())==0) break; 22 21 } 23 22 hChild=GetNextWindow(hChild,GW_HWNDNEXT); … … 81 80 //ウィンドウのID登録 82 81 HDC hdc; 83 for(i=0;i<MAX_WNDNUM;i++){ 84 if(MdiInfo[i].hwnd==0){ 85 MdiInfo[i].hwnd=hChild; 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()); 89 MdiInfo[i].path=(char *)GlobalAlloc(GMEM_FIXED,windowInfo.GetName().size()+1); 90 lstrcpy(MdiInfo[i].path,windowInfo.GetName().c_str()); 91 92 93 //////////////////////////// 94 // MDIRADINFO構造体をセット 95 //////////////////////////// 96 97 MdiInfo[i].MdiRadInfo=(MDIRADINFO *)GlobalAlloc(GPTR,sizeof(MDIRADINFO)); 98 99 MdiInfo[i].MdiRadInfo->hTools=hTools; 100 MdiInfo[i].MdiRadInfo->hProperty=hProperty; 101 MdiInfo[i].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW),hProperty,(DLGPROC)RadProperty_WindowProc); 102 103 SCROLLINFO ScrollInfo; 104 ScrollInfo.cbSize=sizeof(SCROLLINFO); 105 ScrollInfo.fMask=SIF_POS; 106 ScrollInfo.nPos=0; 107 SetScrollInfo(MdiInfo[i].MdiRadInfo->hProperty,SB_VERT,&ScrollInfo,1); 108 109 MdiInfo[i].MdiRadInfo->hRad=hRad; 110 111 MdiInfo[i].MdiRadInfo->hSupport=hSupport; 112 113 hdc=GetDC(hRad); 114 MdiInfo[i].MdiRadInfo->hBitmap=CreateCompatibleBitmap(hdc,ScreenX*2,ScreenY*2); 115 MdiInfo[i].MdiRadInfo->hMemDC=CreateCompatibleDC(hdc); 116 MdiInfo[i].MdiRadInfo->hOldBitmap= 117 (HBITMAP)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,MdiInfo[i].MdiRadInfo->hBitmap); 118 ReleaseDC(hRad,hdc); 119 120 for(i2=0;i2<MAX_RAD_SELITEM;i2++) MdiInfo[i].MdiRadInfo->SelectingItem[i2]=-1; 121 MdiInfo[i].MdiRadInfo->ButtonSelect=IDC_TOOL_MOUSE; 122 123 //変更情報を初期化 124 MdiInfo[i].MdiRadInfo->undo.NowPos=0; 125 memset(MdiInfo[i].MdiRadInfo->undo.Command,0,sizeof(int)*MAX_UNDONUM); 126 127 128 DrawRadWindow(i,&windowInfo); 129 130 //サポートダイアログの内容をセット 131 SetSupportDlgData(i,windowInfo); 132 133 break; 134 } 135 } 82 MdiInfo.push_back( MDIINFO() ); 83 i = MdiInfo.size()-1; 84 85 MdiInfo[i].hwnd=hChild; 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()); 89 MdiInfo[i].path = windowInfo.GetName(); 90 91 92 //////////////////////////// 93 // MDIRADINFO構造体をセット 94 //////////////////////////// 95 96 MdiInfo[i].MdiRadInfo=(MDIRADINFO *)GlobalAlloc(GPTR,sizeof(MDIRADINFO)); 97 98 MdiInfo[i].MdiRadInfo->hTools=hTools; 99 MdiInfo[i].MdiRadInfo->hProperty=hProperty; 100 MdiInfo[i].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW),hProperty,(DLGPROC)RadProperty_WindowProc); 101 102 SCROLLINFO ScrollInfo; 103 ScrollInfo.cbSize=sizeof(SCROLLINFO); 104 ScrollInfo.fMask=SIF_POS; 105 ScrollInfo.nPos=0; 106 SetScrollInfo(MdiInfo[i].MdiRadInfo->hProperty,SB_VERT,&ScrollInfo,1); 107 108 MdiInfo[i].MdiRadInfo->hRad=hRad; 109 110 MdiInfo[i].MdiRadInfo->hSupport=hSupport; 111 112 hdc=GetDC(hRad); 113 MdiInfo[i].MdiRadInfo->hBitmap=CreateCompatibleBitmap(hdc,ScreenX*2,ScreenY*2); 114 MdiInfo[i].MdiRadInfo->hMemDC=CreateCompatibleDC(hdc); 115 MdiInfo[i].MdiRadInfo->hOldBitmap= 116 (HBITMAP)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,MdiInfo[i].MdiRadInfo->hBitmap); 117 ReleaseDC(hRad,hdc); 118 119 for(i2=0;i2<MAX_RAD_SELITEM;i2++) MdiInfo[i].MdiRadInfo->SelectingItem[i2]=-1; 120 MdiInfo[i].MdiRadInfo->ButtonSelect=IDC_TOOL_MOUSE; 121 122 //変更情報を初期化 123 MdiInfo[i].MdiRadInfo->undo.NowPos=0; 124 memset(MdiInfo[i].MdiRadInfo->undo.Command,0,sizeof(int)*MAX_UNDONUM); 125 126 DrawRadWindow(i,&windowInfo); 127 128 //サポートダイアログの内容をセット 129 SetSupportDlgData(i,windowInfo); 130 136 131 137 132 ShowWindow(hSupport,SW_SHOW); … … 160 155 161 156 extern HANDLE hHeap; 162 extern MDIINFO MdiInfo[MAX_WNDNUM];163 157 int i,i2,NewItemNum; 164 158 char temporary[MAX_PATH]; … … 271 265 void DeleteDlgItem(int WndNum,int WndInfoNum,int ItemNum,BOOL bNoticeChanging){ 272 266 extern HANDLE hHeap; 273 extern MDIINFO MdiInfo[MAX_WNDNUM];274 267 275 268 ActiveBasic::PM::WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum]; … … 335 328 } 336 329 void DrawFrame(HWND hwnd,int WndNum,int WndInfoNum,RECT *NewRect,RECT *OldRect,BOOL bLA){ 337 extern MDIINFO MdiInfo[MAX_WNDNUM];338 330 static int swLineStop; 339 331 int i,sw; … … 446 438 } 447 439 void GetSelectingRect(int WndNum,int WndInfoNum,int num,RECT *rect){ 448 extern MDIINFO MdiInfo[MAX_WNDNUM];449 440 450 441 ActiveBasic::PM::WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum]; … … 466 457 } 467 458 void DrawSelectingRect(HWND hwnd,int WndNum,int WndInfoNum,int ButtonSelect){ 468 extern MDIINFO MdiInfo[MAX_WNDNUM];469 459 extern RADINFO RadInfo; 470 460 int i,i2,i3; … … 541 531 } 542 532 void ChangePropertyWindow(int WndNum,int WndInfoNum){ 543 extern MDIINFO MdiInfo[MAX_WNDNUM];544 533 RECT rect; 545 534 SCROLLINFO ScrollInfo; … … 603 592 } 604 593 int GetItemNumOnMouse(int WndNum,int WndInfoNum,int x,int y){ 605 extern MDIINFO MdiInfo[MAX_WNDNUM];606 594 int i; 607 595 … … 648 636 void SelectItemNumOnMouse(int WndNum,int WndInfoNum,int x,int y){ 649 637 //マウス座標をもとにコントロールアイテムを選択 650 extern MDIINFO MdiInfo[MAX_WNDNUM];651 638 int i; 652 639 … … 671 658 } 672 659 void SetItemNumOnFrame(int WndNum,int WndInfoNum,RECT *pRect){ 673 extern MDIINFO MdiInfo[MAX_WNDNUM];674 660 int i,i2,sw; 675 661 RECT rect; … … 696 682 } 697 683 int GetStateOfDraggingFrame(int WndNum,int WndInfoNum,int x,int y){ 698 extern MDIINFO MdiInfo[MAX_WNDNUM];699 684 int i; 700 685 RECT rect; … … 757 742 } 758 743 void ResetScrollbarOfRadEditor(int WndNum,int weight,int height){ 759 extern MDIINFO MdiInfo[MAX_WNDNUM];760 744 SCROLLINFO ScrollInfo; 761 745 SIZE NeedSize; … … 791 775 } 792 776 LRESULT CALLBACK RadWindow(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 793 extern MDIINFO MdiInfo[MAX_WNDNUM];794 777 extern RADINFO RadInfo; 795 778 int i,i2,i3,i4; … … 1964 1947 } 1965 1948 void ResizeToRadToolWindows(int WndNum,int weight,int height){ 1966 extern MDIINFO MdiInfo[MAX_WNDNUM];1967 1949 int i,i2; 1968 1950 RECT rect; … … 2002 1984 LRESULT CALLBACK MDIClientWindow_Rad(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 2003 1985 extern HWND hDocCombo; 2004 extern MDIINFO MdiInfo[MAX_WNDNUM];2005 1986 int i,WndNum; 2006 1987 -
trunk/ab5.0/abdev/abdev/RadSupport.cpp
r624 r625 189 189 // サポートダイアログの内容をセット 190 190 //////////////////////////////////// 191 extern MDIINFO MdiInfo[MAX_WNDNUM];192 191 extern RADINFO RadInfo; 193 192 char temporary[255]; … … 268 267 269 268 BOOL CALLBACK DlgRadSupport(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 270 extern MDIINFO MdiInfo[MAX_WNDNUM];271 269 static BOOL bTimer; 272 270 int i,i3; -
trunk/ab5.0/abdev/abdev/RadToolsAndPropertyProc.cpp
r624 r625 100 100 } 101 101 BOOL CALLBACK RadToolButtonsProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 102 extern MDIINFO MdiInfo[MAX_WNDNUM];103 102 int i,i2,WndNum; 104 103 HWND hParent; … … 198 197 } 199 198 LRESULT CALLBACK RadToolsWindow(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 200 extern MDIINFO MdiInfo[MAX_WNDNUM];201 199 extern HFONT hStatusFont; 202 200 int i; … … 352 350 extern HANDLE hHeap; 353 351 extern HWND hClient,hOwner; 354 extern MDIINFO MdiInfo[MAX_WNDNUM];355 352 int i,i3; 356 353 char temporary[MAX_PATH],temp2[MAX_PATH]; … … 361 358 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 362 359 ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path); 363 sprintf(temporary,"h%s",pWindowInfo->GetName().c_str());364 sprintf(temp2,"%sProc",pWindowInfo->GetName().c_str());365 if( pWindowInfo->GetHandleName() == temporary &&366 lstrcmp(temp2,pWindowInfo->CallBackName)==0){367 SendDlgItemMessage(hwnd,IDC_AUTOSET,BM_SETCHECK,BST_CHECKED,0);368 SendMessage(hwnd,WM_COMMAND,IDC_AUTOSET,0);369 }370 360 SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->GetName().c_str()); 371 SetDlgItemText(hwnd,IDC_WINDOWHANDLE, pWindowInfo->GetHandleName().c_str());372 SetDlgItemText(hwnd,IDC_WINDOWPROC, pWindowInfo->CallBackName);361 SetDlgItemText(hwnd,IDC_WINDOWHANDLE,( "h" + pWindowInfo->GetName() ).c_str()); 362 SetDlgItemText(hwnd,IDC_WINDOWPROC,( pWindowInfo->GetName() + "Proc" ).c_str()); 373 363 break; 374 364 } … … 402 392 names.name = temporary; 403 393 404 i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWHANDLE))+1; 405 GetDlgItemText(hwnd,IDC_WINDOWHANDLE,temporary,i3); 406 names.HandleName = temporary; 407 408 i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWPROC))+1; 409 names.CallBackName=(char *)HeapAlloc(hHeap,0,i3); 410 GetDlgItemText(hwnd,IDC_WINDOWPROC,names.CallBackName,i3); 411 412 if( names.name == pWindowInfo->GetName() && 413 pWindowInfo->GetHandleName() == names.HandleName && 414 lstrcmp(names.CallBackName,pWindowInfo->CallBackName)==0){ 415 HeapDefaultFree(names.CallBackName); 394 if( names.name == pWindowInfo->GetName() ) 395 { 416 396 SendMessage(hwnd,WM_COMMAND,IDCANCEL,0); 417 397 return 1; … … 423 403 //変更情報を更新 424 404 NoticeNames.name=pWindowInfo->GetName(); 425 NoticeNames.HandleName=pWindowInfo->GetHandleName();426 NoticeNames.CallBackName=pWindowInfo->CallBackName;427 405 Rad_NoticeChanging(i,RAD_UNDO_NAME,SELECT_WINDOW,(DWORD)&NoticeNames); 428 406 429 407 pWindowInfo->SetName( names.name ); 430 GlobalFree(MdiInfo[i].path); 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 ); 435 436 HeapDefaultFree(pWindowInfo->CallBackName); 437 pWindowInfo->CallBackName=names.CallBackName; 408 MdiInfo[i].path = names.name; 438 409 439 410 EndDialog(hwnd,1); … … 444 415 return 1; 445 416 case IDC_WINDOWNAME: 446 if(HIWORD(wParam)==EN_CHANGE) SendMessage(hwnd,WM_COMMAND,IDC_AUTOSET,0); 447 return 1; 448 case IDC_AUTOSET: 449 if(SendDlgItemMessage(hwnd,IDC_AUTOSET,BM_GETCHECK,0,0)){ 450 SendDlgItemMessage(hwnd,IDC_WINDOWHANDLE,EM_SETREADONLY,1,0); 451 SendDlgItemMessage(hwnd,IDC_WINDOWPROC,EM_SETREADONLY,1,0); 417 { 452 418 GetDlgItemText(hwnd,IDC_WINDOWNAME,temporary,MAX_PATH); 453 419 if(temporary[0]){ … … 462 428 } 463 429 } 464 else{465 SendDlgItemMessage(hwnd,IDC_WINDOWHANDLE,EM_SETREADONLY,0,0);466 SendDlgItemMessage(hwnd,IDC_WINDOWPROC,EM_SETREADONLY,0,0);467 }468 430 return 1; 469 431 } … … 473 435 } 474 436 BOOL CALLBACK DlgRadProperty_Window_ExStyle(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 475 extern MDIINFO MdiInfo[MAX_WNDNUM];476 437 int i; 477 438 … … 544 505 BOOL CALLBACK RadProperty_WindowProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 545 506 extern HANDLE hHeap; 546 extern MDIINFO MdiInfo[MAX_WNDNUM];547 507 int i,i3,i4; 548 508 static BOOL bInitial; … … 568 528 SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)resourceItem.idName.c_str()); 569 529 } 570 if( pWindowInfo->type==WNDTYPE_MODALDLG||571 pWindowInfo->type==WNDTYPE_MODELESSDLG){530 if( pWindowInfo->IsModalDlg() || pWindowInfo->IsModelessDlg() ) 531 { 572 532 SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,0,0); 573 533 EnableWindow(GetDlgItem(hwnd,IDC_BGCOLOR),0); … … 688 648 ////////// 689 649 //タイプ 690 switch(pWindowInfo->type){ 691 case WNDTYPE_DEFAULT: 692 SendDlgItemMessage(hwnd,IDC_DEFWINDOW,BM_SETCHECK,BST_CHECKED,0); 693 break; 694 case WNDTYPE_MODALDLG: 695 SendDlgItemMessage(hwnd,IDC_MODALDLG,BM_SETCHECK,BST_CHECKED,0); 696 break; 697 case WNDTYPE_MODELESSDLG: 698 SendDlgItemMessage(hwnd,IDC_MODELESSDLG,BM_SETCHECK,BST_CHECKED,0); 699 break; 650 if( pWindowInfo->IsDefaultWindow() ) 651 { 652 SendDlgItemMessage(hwnd,IDC_DEFWINDOW,BM_SETCHECK,BST_CHECKED,0); 653 } 654 else if( pWindowInfo->IsModalDlg() ) 655 { 656 SendDlgItemMessage(hwnd,IDC_MODALDLG,BM_SETCHECK,BST_CHECKED,0); 657 } 658 else if( pWindowInfo->IsModelessDlg() ) 659 { 660 SendDlgItemMessage(hwnd,IDC_MODELESSDLG,BM_SETCHECK,BST_CHECKED,0); 661 } 662 else 663 { 664 throw; 700 665 } 701 666 … … 1115 1080 1116 1081 //変更情報 1117 Rad_NoticeChanging(i,RAD_UNDO_TYPE,SELECT_WINDOW, pWindowInfo->type);1082 Rad_NoticeChanging(i,RAD_UNDO_TYPE,SELECT_WINDOW,(DWORD)pWindowInfo->GetType()); 1118 1083 1119 1084 if(SendDlgItemMessage(hwnd,IDC_DEFWINDOW,BM_GETCHECK,0,0)) 1120 pWindowInfo->type=WNDTYPE_DEFAULT; 1085 { 1086 pWindowInfo->SetType( ActiveBasic::PM::WindowType::Default ); 1087 } 1121 1088 else if(SendDlgItemMessage(hwnd,IDC_MODALDLG,BM_GETCHECK,0,0)) 1122 pWindowInfo->type=WNDTYPE_MODALDLG; 1089 { 1090 pWindowInfo->SetType( ActiveBasic::PM::WindowType::ModalDlg ); 1091 } 1123 1092 else if(SendDlgItemMessage(hwnd,IDC_MODELESSDLG,BM_GETCHECK,0,0)) 1124 pWindowInfo->type=WNDTYPE_MODELESSDLG; 1093 { 1094 pWindowInfo->SetType( ActiveBasic::PM::WindowType::ModelessDlg ); 1095 } 1125 1096 return 1; 1126 1097 } … … 1134 1105 BOOL CALLBACK DlgRadProperty_Item_RenameCaption(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 1135 1106 extern HANDLE hHeap; 1136 extern MDIINFO MdiInfo[MAX_WNDNUM];1137 1107 int i,i3; 1138 1108 char *temporary; … … 1267 1237 extern HANDLE hHeap; 1268 1238 extern HWND hClient,hOwner; 1269 extern MDIINFO MdiInfo[MAX_WNDNUM];1270 1239 int i,i3; 1271 1240 char *temporary; … … 1323 1292 BOOL DefaultItemStyles(HWND hwnd,int WndNum,int WndInfoNum,WPARAM wParam){ 1324 1293 extern HANDLE hHeap; 1325 extern MDIINFO MdiInfo[MAX_WNDNUM];1326 1294 1327 1295 ActiveBasic::PM::WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum]; … … 1389 1357 } 1390 1358 BOOL CALLBACK DlgRadProperty_Item_ExStyle(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 1391 extern MDIINFO MdiInfo[MAX_WNDNUM];1392 1359 int i; 1393 1360 … … 1451 1418 1452 1419 BOOL CALLBACK RadProperty_ButtonProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 1453 extern MDIINFO MdiInfo[MAX_WNDNUM];1454 1420 int i,i2,i3; 1455 1421 static BOOL bInitial; … … 1673 1639 // CHECKBOX プロパティ 1674 1640 BOOL CALLBACK RadProperty_CheckBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 1675 extern MDIINFO MdiInfo[MAX_WNDNUM];1676 1641 int i,i2,i3; 1677 1642 static BOOL bInitial; … … 1964 1929 } 1965 1930 BOOL CALLBACK RadProperty_ComboBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 1966 extern MDIINFO MdiInfo[MAX_WNDNUM];1967 1931 int i,i2,i3; 1968 1932 static BOOL bInitial; … … 2232 2196 } 2233 2197 BOOL CALLBACK RadProperty_EditProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 2234 extern MDIINFO MdiInfo[MAX_WNDNUM];2235 2198 int i,i2,i3; 2236 2199 static BOOL bInitial; … … 2518 2481 2519 2482 BOOL CALLBACK RadProperty_GroupBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 2520 extern MDIINFO MdiInfo[MAX_WNDNUM];2521 2483 int i,i2,i3; 2522 2484 static BOOL bInitial; … … 2670 2632 BOOL CALLBACK RadProperty_ImageBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 2671 2633 extern HANDLE hHeap; 2672 extern MDIINFO MdiInfo[MAX_WNDNUM];2673 2634 int i,i2,i3; 2674 2635 char temporary[MAX_PATH]; … … 3066 3027 // LISTVIEW プロパティ 3067 3028 BOOL CALLBACK RadProperty_ListViewProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 3068 extern MDIINFO MdiInfo[MAX_WNDNUM];3069 3029 int i,i2,i3; 3070 3030 static BOOL bInitial; … … 3358 3318 } 3359 3319 BOOL CALLBACK RadProperty_ListBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 3360 extern MDIINFO MdiInfo[MAX_WNDNUM];3361 3320 int i,i2,i3; 3362 3321 static BOOL bInitial; … … 3616 3575 // PROGRESSBAR プロパティ 3617 3576 BOOL CALLBACK RadProperty_ProgressBarProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 3618 extern MDIINFO MdiInfo[MAX_WNDNUM];3619 3577 int i,i2; 3620 3578 static BOOL bInitial; … … 3701 3659 3702 3660 BOOL CALLBACK RadProperty_RadioButtonProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 3703 extern MDIINFO MdiInfo[MAX_WNDNUM];3704 3661 int i,i2,i3; 3705 3662 static BOOL bInitial; … … 3935 3892 3936 3893 BOOL CALLBACK RadProperty_ScrollBarProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 3937 extern MDIINFO MdiInfo[MAX_WNDNUM];3938 3894 int i,i2,i3; 3939 3895 static BOOL bInitial; … … 4020 3976 4021 3977 BOOL CALLBACK RadProperty_StaticProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 4022 extern MDIINFO MdiInfo[MAX_WNDNUM];4023 3978 int i,i2,i3; 4024 3979 static BOOL bInitial; … … 4151 4106 // TRACKBAR プロパティ 4152 4107 BOOL CALLBACK RadProperty_TrackBarProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 4153 extern MDIINFO MdiInfo[MAX_WNDNUM];4154 4108 int i,i2,i3; 4155 4109 static BOOL bInitial; … … 4304 4258 // TREEVIEW プロパティ 4305 4259 BOOL CALLBACK RadProperty_TreeViewProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 4306 extern MDIINFO MdiInfo[MAX_WNDNUM];4307 4260 int i,i2; 4308 4261 static BOOL bInitial; … … 4516 4469 // UPDOWN プロパティ 4517 4470 BOOL CALLBACK RadProperty_UpDownProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 4518 extern MDIINFO MdiInfo[MAX_WNDNUM];4519 4471 int i,i2,i3; 4520 4472 static BOOL bInitial; … … 4689 4641 4690 4642 LRESULT CALLBACK RadPropertyWindow(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 4691 extern MDIINFO MdiInfo[MAX_WNDNUM];4692 4643 int i; 4693 4644 RECT rect; -
trunk/ab5.0/abdev/abdev/Rad_UndoRedo.cpp
r624 r625 5 5 void Rad_UndoCommand(int WndNum){ 6 6 extern HINSTANCE hInst; 7 extern MDIINFO MdiInfo[MAX_WNDNUM];8 7 int i; 9 8 DWORD dw; 10 char *temporary;11 9 RAD_UNDOSTATE *pUndoState; 12 10 … … 47 45 names->name = tempStr; 48 46 49 GlobalFree(MdiInfo[WndNum].path); 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 57 temporary=pWindowInfo->CallBackName; 58 pWindowInfo->CallBackName=names->CallBackName; 59 names->CallBackName=temporary; 47 MdiInfo[WndNum].path = pWindowInfo->GetName(); 60 48 } 61 49 else{ … … 195 183 break; 196 184 case RAD_UNDO_TYPE: 197 dw= pWindowInfo->type;198 pWindowInfo-> type=pUndoState->lpdwData[pUndoState->NowPos];185 dw=(DWORD)pWindowInfo->GetType(); 186 pWindowInfo->SetType( (ActiveBasic::PM::WindowType::EnumType)pUndoState->lpdwData[pUndoState->NowPos] ); 199 187 pUndoState->lpdwData[pUndoState->NowPos]=dw; 188 200 189 if(pUndoState->SelectItemNum[pUndoState->NowPos]==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) 201 190 ChangePropertyWindow(WndNum,WndInfoNum); … … 209 198 void Rad_RedoCommand(int WndNum){ 210 199 extern HINSTANCE hInst; 211 extern MDIINFO MdiInfo[MAX_WNDNUM];212 200 DWORD dw; 213 char *temporary;214 201 RAD_UNDOSTATE *pUndoState; 215 202 ActiveBasic::PM::ChildWindowInfo *pChildInfo; … … 247 234 names->name = tempStr; 248 235 249 GlobalFree(MdiInfo[WndNum].path); 250 MdiInfo[WndNum].path=(char *)GlobalAlloc(GMEM_FIXED,pWindowInfo->GetName().size()+1); 251 lstrcpy(MdiInfo[WndNum].path,pWindowInfo->GetName().c_str()); 252 253 tempStr = pWindowInfo->GetHandleName(); 254 pWindowInfo->SetHandleName( names->HandleName ); 255 names->HandleName = tempStr; 256 257 temporary=pWindowInfo->CallBackName; 258 pWindowInfo->CallBackName=names->CallBackName; 259 names->CallBackName=temporary; 236 MdiInfo[WndNum].path = pWindowInfo->GetName(); 260 237 } 261 238 else{ … … 394 371 } 395 372 case RAD_UNDO_TYPE: 396 dw= pWindowInfo->type;397 pWindowInfo-> type=pUndoState->lpdwData[pUndoState->NowPos];373 dw=(DWORD)pWindowInfo->GetType(); 374 pWindowInfo->SetType( (ActiveBasic::PM::WindowType::EnumType)pUndoState->lpdwData[pUndoState->NowPos] ); 398 375 pUndoState->lpdwData[pUndoState->NowPos]=dw; 376 399 377 if(pUndoState->SelectItemNum[pUndoState->NowPos]==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) 400 378 ChangePropertyWindow(WndNum,WndInfoNum); … … 411 389 void Rad_DeleteUndoData(int WndNum,int pos){ 412 390 extern HANDLE hHeap; 413 extern MDIINFO MdiInfo[MAX_WNDNUM];414 391 RAD_UNDOSTATE *pUndoState; 415 392 … … 425 402 if(pUndoState->SelectItemNum[pos]==SELECT_WINDOW){ 426 403 RAD_UNDOSTATE_NAME *names = (RAD_UNDOSTATE_NAME *)pUndoState->lpdwData[pos]; 427 HeapDefaultFree(names->CallBackName);428 404 delete names; 429 405 } … … 471 447 void Rad_NoticeChanging(int WndNum,int Command,int SelectItemNum,DWORD dwData){ 472 448 extern HANDLE hHeap; 473 extern MDIINFO MdiInfo[MAX_WNDNUM];474 449 int i; 475 450 RAD_UNDOSTATE *pUndoState; … … 510 485 RAD_UNDOSTATE_NAME *SaveNames = new RAD_UNDOSTATE_NAME(); 511 486 SaveNames->name = names->name; 512 SaveNames->HandleName = names->HandleName;513 SaveNames->CallBackName=(char *)HeapAlloc(hHeap,0,lstrlen(names->CallBackName)+1);514 lstrcpy(SaveNames->CallBackName,names->CallBackName);515 487 pUndoState->lpdwData[pUndoState->NowPos]=(DWORD)SaveNames; 516 488 } -
trunk/ab5.0/abdev/abdev/Replace.cpp
r619 r625 5 5 void TextEdit_ResetWordColor(int WndNum,CHARRANGE *pCharRange,int DocType){ 6 6 extern HANDLE hHeap; 7 extern MDIINFO MdiInfo[MAX_WNDNUM];8 7 int i,i2,IsStr; 9 8 char *pBuf,*pTemp; … … 82 81 void TextEdit_Replace(int WndNum,char *str,BOOL bRedraw){ 83 82 extern HANDLE hHeap; 84 extern MDIINFO MdiInfo[MAX_WNDNUM];85 83 CHARRANGE Range,DelRange; 86 84 … … 116 114 if( projectInfo.IsOpened() ){ 117 115 projectInfo.pobj_DBBreakPoint->replace( 118 MdiInfo[WndNum].path ,116 MdiInfo[WndNum].path.c_str(), 119 117 MdiInfo[WndNum].pMdiTextEdit->buffer, 120 118 &DelRange, … … 125 123 extern CDBBreakPoint *pobj_DBBreakPoint; 126 124 pobj_DBBreakPoint->replace( 127 MdiInfo[WndNum].path ,125 MdiInfo[WndNum].path.c_str(), 128 126 MdiInfo[WndNum].pMdiTextEdit->buffer, 129 127 &DelRange, … … 190 188 void TextEdit_ReplaceUpdateUndoData(int WndNum,char *str,BOOL bPaste,BOOL bRedraw){ 191 189 extern HANDLE hHeap; 192 extern MDIINFO MdiInfo[MAX_WNDNUM];193 190 int Command; 194 191 char *KeyStr,*DelStr; -
trunk/ab5.0/abdev/abdev/Resource.cpp
r624 r625 161 161 //////////////////////////////// 162 162 // ウィンドウ プロパティを更新 163 extern MDIINFO MdiInfo[MAX_WNDNUM]; 164 for(i2=0;i2<MAX_WNDNUM;i2++){ 163 for(i2=0;i2<MdiInfo.size();i2++){ 165 164 if(MdiInfo[i2].hwnd&&MdiInfo[i2].DocType==WNDTYPE_RAD){ 166 165 if(MdiInfo[i2].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW) … … 269 268 //////////////////////////////// 270 269 // ウィンドウ プロパティを更新 271 extern MDIINFO MdiInfo[MAX_WNDNUM]; 272 for(i2=0;i2<MAX_WNDNUM;i2++){ 270 for(i2=0;i2<MdiInfo.size();i2++){ 273 271 if(MdiInfo[i2].hwnd&&MdiInfo[i2].DocType==WNDTYPE_RAD){ 274 272 if(MdiInfo[i2].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW) … … 304 302 //////////////////////////////// 305 303 // ウィンドウ プロパティを更新 306 extern MDIINFO MdiInfo[MAX_WNDNUM]; 307 for(i2=0;i2<MAX_WNDNUM;i2++){ 304 for(i2=0;i2<MdiInfo.size();i2++){ 308 305 if(MdiInfo[i2].hwnd&&MdiInfo[i2].DocType==WNDTYPE_RAD){ 309 306 if(MdiInfo[i2].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW) -
trunk/ab5.0/abdev/abdev/Search.cpp
r475 r625 27 27 void SetSearchData(HWND hDlg,char *str,_int8 IsBigSmall, bool isWordUnit){ 28 28 extern HANDLE hHeap; 29 extern MDIINFO MdiInfo[MAX_WNDNUM];30 29 int i,i2,i3,i4,i5,length; 31 30 int WndNum; … … 82 81 } 83 82 BOOL CALLBACK DlgFindAll(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 84 extern MDIINFO MdiInfo[MAX_WNDNUM];85 83 int i,WndNum; 86 84 … … 139 137 } 140 138 BOOL StartSearch(HWND hDlg,char *FindString,_int8 IsBigSmall, bool isWordUnit, BOOL IsShowMessage){ 141 extern MDIINFO MdiInfo[MAX_WNDNUM];142 139 int i; 143 140 char *pBuf,msg[255]; … … 213 210 BOOL CALLBACK DlgFind(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 214 211 extern HANDLE hHeap; 215 extern MDIINFO MdiInfo[MAX_WNDNUM];216 212 HWND FindAllDlg; 217 213 int i,WndNum; … … 314 310 extern HANDLE hHeap; 315 311 extern HINSTANCE hInst; 316 extern MDIINFO MdiInfo[MAX_WNDNUM];317 312 int i; 318 313 int WndNum; -
trunk/ab5.0/abdev/abdev/SubOperation.cpp
r523 r625 891 891 if(bRedraw){ 892 892 //再描画 893 extern MDIINFO MdiInfo[MAX_WNDNUM];894 893 int i; 895 for(i=0;i<M AX_WNDNUM;i++){894 for(i=0;i<MdiInfo.size();i++){ 896 895 if(MdiInfo[i].hwnd){ 897 896 if(IS_DOCUMENT_TEXT(MdiInfo[i].DocType)){ … … 1456 1455 //実行コマンド 1457 1456 BOOL SetRunning(HWND hChild){ 1458 extern MDIINFO MdiInfo[MAX_WNDNUM];1459 1457 extern LPSTR DefFileFilter; 1460 1458 int WndNum; … … 1474 1472 WndNum=GetWndNum(hChild); 1475 1473 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){ 1476 if(MdiInfo[WndNum].path [0]=='\0'){1474 if(MdiInfo[WndNum].path.empty()){ 1477 1475 //"保存先のファイルを指定してください" 1478 1476 if(!GetFilePathDialog(hOwner,temp2,DefFileFilter,STRING_FILESAVETITLE_DEFAULT,0)) return FALSE; … … 1485 1483 } 1486 1484 else{ 1487 if(hFind=FindFirstFile(MdiInfo[WndNum].path ,&wfd)){1485 if(hFind=FindFirstFile(MdiInfo[WndNum].path.c_str(),&wfd)){ 1488 1486 if(hFind==INVALID_HANDLE_VALUE){ 1489 1487 if(!SaveDocument(hChild,NULL)) return 0; … … 1497 1495 } 1498 1496 1499 BOOL IsNeedCompile(char *FileName,BOOL bDebug){ 1497 BOOL IsNeedCompile( const std::string &filepath, BOOL bDebug ) 1498 { 1500 1499 char temporary[MAX_PATH],temp2[MAX_PATH],temp3[MAX_PATH]; 1501 1500 HANDLE hFind,hFile; … … 1503 1502 FILETIME SourceTime,ExeTime; 1504 1503 1505 _splitpath( FileName,temporary,temp2,temp3,NULL);1504 _splitpath(filepath.c_str(),temporary,temp2,temp3,NULL); 1506 1505 lstrcat(temporary,temp2); 1507 1506 lstrcat(temporary,temp3); … … 1513 1512 FindClose(hFind); 1514 1513 1515 hFile=CreateFile( FileName,GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);1514 hFile=CreateFile(filepath.c_str(),GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL); 1516 1515 GetFileTime(hFile,NULL,NULL,&SourceTime); 1517 1516 CloseHandle(hFile); -
trunk/ab5.0/abdev/abdev/TabCtrl.cpp
r475 r625 261 261 } 262 262 263 extern MDIINFO MdiInfo[MAX_WNDNUM]; 264 for(i=0;i<MAX_WNDNUM;i++){ 263 for(i=0;i<MdiInfo.size();i++){ 265 264 if(lstrcmpi(ItemText,MdiInfo[i].title)==0) break; 266 265 } -
trunk/ab5.0/abdev/abdev/TextEditor.cpp
r475 r625 9 9 int GetControlTabSpace(int WndNum,int *piCount){ 10 10 if(pobj_nv->bEditor_LineNumber){ 11 extern MDIINFO MdiInfo[MAX_WNDNUM];12 11 13 12 char *pBuf; … … 82 81 } 83 82 void SetTextEditWordColor(int WndNum){ 84 extern MDIINFO MdiInfo[MAX_WNDNUM];85 83 int i,i2,i3,IsStr; 86 84 char str[255]; … … 153 151 } 154 152 void ResetScrollbar(int WndNum,int max_x,int max_y){ 155 extern MDIINFO MdiInfo[MAX_WNDNUM];156 153 RECT rect; 157 154 … … 215 212 } 216 213 void TextEdit_GetWordCaret(HWND hwnd,int WndNum,POINT *pPos,int *piStart,int *piEnd,BOOL bBeforeAfterFlag){ 217 extern MDIINFO MdiInfo[MAX_WNDNUM];218 214 int i,start,end; 219 215 char *pBuf; … … 328 324 } 329 325 void CancelBeforeAutoIndent(int WndNum){ 330 extern MDIINFO MdiInfo[MAX_WNDNUM];331 326 int i; 332 327 -
trunk/ab5.0/abdev/abdev/TextEditor_EventProc.cpp
r613 r625 30 30 extern HANDLE hHeap; 31 31 extern HWND hDocCombo; 32 extern MDIINFO MdiInfo[MAX_WNDNUM];33 32 static DWORD dwAutoScroll; 34 33 extern COMPLEMENT_WINDOW_INFO ComplementWndInfo; -
trunk/ab5.0/abdev/abdev/TextEditor_KeyEvent.cpp
r475 r625 156 156 157 157 int TextEdit_GetLineIndex(int WndNum,int iPos){ 158 extern MDIINFO MdiInfo[MAX_WNDNUM];159 158 int i; 160 159 char *pBuf; -
trunk/ab5.0/abdev/abdev/TextEditor_MouseEvent.cpp
r475 r625 152 152 ////////////////////////////// 153 153 154 extern MDIINFO MdiInfo[MAX_WNDNUM];155 154 int WndNum; 156 155 POINT pos; -
trunk/ab5.0/abdev/abdev/TextEditor_UndoRedo.cpp
r475 r625 4 4 5 5 void TextEdit_UndoCommand(int WndNum){ 6 extern MDIINFO MdiInfo[MAX_WNDNUM];7 6 int i; 8 7 TEXTEDIT_UNDOSTATE *pUndoState; … … 48 47 } 49 48 void TextEdit_RedoCommand(int WndNum){ 50 extern MDIINFO MdiInfo[MAX_WNDNUM];51 49 TEXTEDIT_UNDOSTATE *pUndoState; 52 50 … … 106 104 void TextEdit_NoticeChanging(int WndNum,int Command,char *KeyStr,char *DelStr,CHARRANGE *Range,CHARRANGE *DelRange){ 107 105 extern HANDLE hHeap; 108 extern MDIINFO MdiInfo[MAX_WNDNUM];109 106 int i; 110 107 TEXTEDIT_UNDOSTATE *pUndoState; -
trunk/ab5.0/abdev/abdev/WebSearch.cpp
r489 r625 590 590 591 591 592 extern MDIINFO MdiInfo[MAX_WNDNUM];593 592 MdiInfo[WndNum].pMdiTextEdit->pobj_WebResult->add(WndNum,str); 594 593 … … 863 862 864 863 void CSideWeb::SelChangeEvent(){ 865 extern MDIINFO MdiInfo[MAX_WNDNUM];866 864 char temporary[MAX_PATH]; 867 865 -
trunk/ab5.0/abdev/abdev/WindowControl.cpp
r624 r625 13 13 #endif 14 14 15 int GetWndInfoNum(char *name){ 15 int GetWndInfoNum( const std::string &name ) 16 { 16 17 for( int i=0;i<static_cast<int>(projectInfo.windowInfos.size());i++){ 17 if(lstrcmpi(name ,projectInfo.windowInfos[i]->GetName().c_str())==0) return i;18 if(lstrcmpi(name.c_str(),projectInfo.windowInfos[i]->GetName().c_str())==0) return i; 18 19 } 19 20 return -1; 20 21 } 21 ActiveBasic::PM::WindowInfo *GetWndInfo( c har *name )22 ActiveBasic::PM::WindowInfo *GetWndInfo( const std::string &name ) 22 23 { 23 24 BOOST_FOREACH( ActiveBasic::PM::WindowInfo *pWindowInfo, projectInfo.windowInfos ) 24 25 { 25 if(lstrcmpi(name ,pWindowInfo->GetName().c_str())==0) return pWindowInfo;26 if(lstrcmpi(name.c_str(),pWindowInfo->GetName().c_str())==0) return pWindowInfo; 26 27 } 27 28 return NULL; … … 66 67 HGLOBAL Rad_GetChildInfoClipboardData(int WndNum,int WndInfoNum){ 67 68 //ChildWindowInfo構造体をクリップボード用データ(pByteが示すバッファ)に変換する 68 extern MDIINFO MdiInfo[MAX_WNDNUM];69 69 HGLOBAL hGlobal; 70 70 BYTE *pByte; … … 141 141 void Rad_PasteChildInfoClipboardData(int WndNum,HGLOBAL hGlobal){ 142 142 //hGlobalに格納されているクリップボードデータをRAD画面に挿入する 143 extern MDIINFO MdiInfo[MAX_WNDNUM];144 143 BYTE *pByte; 145 144 int i2,i3,WndInfoNum; … … 307 306 308 307 return pBuf; 308 } 309 const std::string PermutationWndPgmTemplate( const std::string &templateFilePath, const std::string &projectName, const std::string &windowName, const std::string &handleName, const std::string &procName ) 310 { 311 Jenga::Common::SourceTemplate sourceTemplate( templateFilePath ); 312 Jenga::Common::SourceTemplate::Values values; 313 314 values.Insert( "#name#", projectName ); 315 values.Insert( "#window#", windowName ); 316 values.Insert( "#handle#", handleName ); 317 values.Insert( "#procedure#", procName ); 318 319 return sourceTemplate.GetResult( values ); 309 320 } 310 321 … … 535 546 } 536 547 else if(lstrcmp(MessageName,"Create")==0){ 537 if(pWindowInfo->type==WNDTYPE_MODALDLG||pWindowInfo->type==WNDTYPE_MODELESSDLG) 548 if( pWindowInfo->IsModalDlg() || pWindowInfo->IsModelessDlg() ) 549 { 538 550 sprintf(Command,"%sCase WM_INITDIALOG\r\n",spaces); 539 else sprintf(Command,"%sCase WM_CREATE\r\n",spaces); 551 } 552 else 553 { 554 sprintf(Command,"%sCase WM_CREATE\r\n",spaces); 555 } 540 556 i=lstrlen(Command); 541 557 … … 833 849 sprintf(Command+i,"%s\tDim cancel=0 As Integer\r\n",spaces); 834 850 i+=lstrlen(Command+i); 835 if(bProcedureCall){ 851 if(bProcedureCall) 852 { 836 853 sprintf(Command+i,"%s\t%s_%s(cancel)\r\n",spaces,pWindowInfo->GetName().c_str(),MessageName); 837 854 i+=lstrlen(Command+i); 838 855 } 839 if(pWindowInfo->type==WNDTYPE_MODALDLG) 856 857 if( pWindowInfo->IsModalDlg() ) 858 { 840 859 sprintf(Command+i,"%s\tIf cancel=0 Then EndDialog(hWnd,0)\r\n",spaces); 860 } 841 861 else 862 { 842 863 sprintf(Command+i,"%s\tIf cancel=0 Then DestroyWindow(hWnd)\r\n",spaces); 864 } 843 865 return WM_CLOSE; 844 866 } … … 1362 1384 BOOST_FOREACH( ActiveBasic::PM::WindowInfo *pWindowInfo, projectInfo.windowInfos ) 1363 1385 { 1364 if(pWindowInfo->type==WNDTYPE_MODALDLG){ 1386 if( pWindowInfo->IsModalDlg() ) 1387 { 1365 1388 if(sw1==0){ 1366 1389 sprintf(buffer+i2,"\tIf lstrcmp(TemplateName,\"%s\")=0 Then\r\n",pWindowInfo->GetName().c_str()); … … 1388 1411 sprintf(buffer+i2,"\t\tSetWindowLongPtr(%s,GWLP_WNDPROC,AddressOf(%s) As LONG_PTR)\r\n", 1389 1412 pWindowInfo->GetHandleName().c_str(), 1390 pWindowInfo-> CallBackName);1413 pWindowInfo->GetCallbackName().c_str()); 1391 1414 } 1392 1415 else{ … … 1461 1484 BOOST_FOREACH( ActiveBasic::PM::WindowInfo *pWindowInfo, projectInfo.windowInfos ) 1462 1485 { 1463 if(pWindowInfo->type==WNDTYPE_MODELESSDLG){ 1486 if( pWindowInfo->IsModelessDlg() ) 1487 { 1464 1488 sprintf(buffer+i2,"\tIf lstrcmp(TemplateName,\"%s\")=0 Then\r\n",pWindowInfo->GetName().c_str()); 1465 1489 i2+=lstrlen(buffer+i2); … … 1480 1504 sprintf(buffer+i2,"\t\tSetWindowLongPtr(%s,GWLP_WNDPROC,AddressOf(%s) As LONG_PTR)\r\n", 1481 1505 pWindowInfo->GetHandleName().c_str(), 1482 pWindowInfo-> CallBackName);1506 pWindowInfo->GetCallbackName().c_str()); 1483 1507 } 1484 1508 else{ … … 1534 1558 BOOST_FOREACH( ActiveBasic::PM::WindowInfo *pWindowInfo, projectInfo.windowInfos ) 1535 1559 { 1536 if(pWindowInfo->type==WNDTYPE_DEFAULT){ 1560 if( pWindowInfo->IsDefaultWindow() ) 1561 { 1537 1562 ////////////////////// 1538 1563 //通常ウィンドウ作成 … … 1558 1583 i2+=lstrlen(buffer+i2); 1559 1584 if(bAvailUserProc[i]) 1560 sprintf(buffer+i2,"_RadSys_wcl.lpfnWndProc=AddressOf(%s)\r\n",pWindowInfo-> CallBackName);1585 sprintf(buffer+i2,"_RadSys_wcl.lpfnWndProc=AddressOf(%s)\r\n",pWindowInfo->GetCallbackName().c_str()); 1561 1586 else sprintf(buffer+i2,"_RadSys_wcl.lpfnWndProc=AddressOf(EventCall_%s)\r\n",pWindowInfo->GetName().c_str()); 1562 1587 i2+=lstrlen(buffer+i2); … … 1631 1656 { 1632 1657 extern HANDLE hHeap; 1633 extern MDIINFO MdiInfo[MAX_WNDNUM];1634 1658 int i,i2,size; 1635 1659 char *buffer,*temporary; … … 1638 1662 buffer=(char *)HeapAlloc(hHeap,0,GENERAL_SIZE*size); 1639 1663 i2=0; 1640 BOOST_FOREACH( ActiveBasic::PM::WindowInfo *pWindowInfo, projectInfo.windowInfos )1664 BOOST_FOREACH( ActiveBasic::PM::WindowInfo *pWindowInfo, windowInfos ) 1641 1665 { 1642 1666 sprintf(buffer+i2,"WINDOW:%s\r\n",pWindowInfo->GetName().c_str()); 1643 i2+=lstrlen(buffer+i2);1644 sprintf(buffer+i2," HANDLE = %s\r\n",pWindowInfo->GetHandleName().c_str());1645 1667 i2+=lstrlen(buffer+i2); 1646 1668 sprintf(buffer+i2," POINT = %d,%d\r\n",pWindowInfo->pos.x,pWindowInfo->pos.y); … … 1684 1706 sprintf(buffer+i2," CLASS = \"%s\"\r\n",pWindowInfo->GetClassName().c_str()); 1685 1707 i2+=lstrlen(buffer+i2); 1686 sprintf(buffer+i2," CALLBACK = %s\r\n",pWindowInfo->CallBackName); 1687 i2+=lstrlen(buffer+i2); 1688 sprintf(buffer+i2," TYPE = %d\r\n",pWindowInfo->type); 1689 i2+=lstrlen(buffer+i2); 1690 sprintf(buffer+i2," FILEPATH = %s\r\n",pWindowInfo->filepath); 1708 sprintf(buffer+i2," TYPE = %d\r\n",(DWORD)pWindowInfo->GetType()); 1691 1709 i2+=lstrlen(buffer+i2); 1692 1710 BOOST_FOREACH( const ActiveBasic::PM::ChildWindowInfo *pChildInfo, pWindowInfo->childWindowInfos ) … … 1887 1905 } 1888 1906 else if(lstrcmpi(temporary,"HANDLE")==0&&i3==1){ 1889 projectInfo.windowInfos.back()->SetHandleName( temp2 );1907 //無視 1890 1908 } 1891 1909 else if(lstrcmpi(temporary,"POINT")==0&&i3==1){ … … 1977 1995 } 1978 1996 } 1979 else if(lstrcmpi(temporary,"CALLBACK")==0&&i3==1) {1980 projectInfo.windowInfos.back()->CallBackName=(char *)HeapAlloc(hHeap,0,i2+1);1981 lstrcpy(projectInfo.windowInfos.back()->CallBackName,temp2);1997 else if(lstrcmpi(temporary,"CALLBACK")==0&&i3==1) 1998 { 1999 // 無視 1982 2000 } 1983 2001 1984 2002 //以前のバージョンとの互換用 1985 else if(lstrcmpi(temporary,"DLGTMP")==0&&i3==1) projectInfo.windowInfos.back()-> type=GetValue(temp2);1986 1987 else if(lstrcmpi(temporary,"TYPE")==0&&i3==1) projectInfo.windowInfos.back()-> type=GetValue(temp2);1988 else if(lstrcmpi(temporary,"FILEPATH")==0&&i3==1) {1989 projectInfo.windowInfos.back()->filepath=(char *)HeapAlloc(hHeap,0,i2+1);1990 lstrcpy(projectInfo.windowInfos.back()->filepath,temp2);2003 else if(lstrcmpi(temporary,"DLGTMP")==0&&i3==1) projectInfo.windowInfos.back()->SetType( (ActiveBasic::PM::WindowType::EnumType)GetValue(temp2) ); 2004 2005 else if(lstrcmpi(temporary,"TYPE")==0&&i3==1) projectInfo.windowInfos.back()->SetType( (ActiveBasic::PM::WindowType::EnumType)GetValue(temp2) ); 2006 else if(lstrcmpi(temporary,"FILEPATH")==0&&i3==1) 2007 { 2008 // 無視 1991 2009 } 1992 2010 else if(lstrcmpi(temporary,"ITEM")==0&&i3==1){ … … 2082 2100 struct NEW_WINDOW{ 2083 2101 char name[MAX_PATH]; 2084 char HandleName[MAX_PATH]; 2085 char CallBackName[MAX_PATH]; 2086 BOOL type; 2102 ActiveBasic::PM::WindowType::EnumType type; 2087 2103 }; 2088 2104 NEW_WINDOW NewWindow; … … 2092 2108 case WM_INITDIALOG: 2093 2109 SetPosCenter(hwnd); 2094 SendDlgItemMessage(hwnd,IDC_AUTOSET,BM_SETCHECK,BST_CHECKED,0);2095 SendMessage(hwnd,WM_COMMAND,IDC_AUTOSET,0);2096 2110 SendDlgItemMessage(hwnd,IDC_MODALDLG,BM_SETCHECK,BST_CHECKED,0); 2097 2111 break; … … 2100 2114 case IDOK: 2101 2115 GetDlgItemText(hwnd,IDC_WINDOWNAME,NewWindow.name,MAX_PATH); 2102 GetDlgItemText(hwnd,IDC_WINDOWHANDLE,NewWindow.HandleName,MAX_PATH);2103 GetDlgItemText(hwnd,IDC_WINDOWPROC,NewWindow.CallBackName,MAX_PATH);2104 2116 if(SendDlgItemMessage(hwnd,IDC_DEFWINDOW,BM_GETCHECK,0,0)) 2105 NewWindow.type=WNDTYPE_DEFAULT; 2117 { 2118 NewWindow.type = ActiveBasic::PM::WindowType::Default; 2119 } 2106 2120 else if(SendDlgItemMessage(hwnd,IDC_MODALDLG,BM_GETCHECK,0,0)) 2107 NewWindow.type=WNDTYPE_MODALDLG; 2121 { 2122 NewWindow.type = ActiveBasic::PM::WindowType::ModalDlg; 2123 } 2108 2124 else if(SendDlgItemMessage(hwnd,IDC_MODELESSDLG,BM_GETCHECK,0,0)) 2109 NewWindow.type=WNDTYPE_MODELESSDLG; 2125 { 2126 NewWindow.type = ActiveBasic::PM::WindowType::ModelessDlg; 2127 } 2110 2128 EndDialog(hwnd,1); 2111 2129 return 1; … … 2114 2132 return 1; 2115 2133 case IDC_WINDOWNAME: 2116 if(HIWORD(wParam)==EN_CHANGE) SendMessage(hwnd,WM_COMMAND,IDC_AUTOSET,0); 2117 return 1; 2118 case IDC_AUTOSET: 2119 if(SendDlgItemMessage(hwnd,IDC_AUTOSET,BM_GETCHECK,0,0)){ 2120 SendDlgItemMessage(hwnd,IDC_WINDOWHANDLE,EM_SETREADONLY,1,0); 2121 SendDlgItemMessage(hwnd,IDC_WINDOWPROC,EM_SETREADONLY,1,0); 2134 if(HIWORD(wParam)==EN_CHANGE) 2135 { 2122 2136 GetDlgItemText(hwnd,IDC_WINDOWNAME,temporary,MAX_PATH); 2123 2137 if(temporary[0]){ … … 2131 2145 SetDlgItemText(hwnd,IDC_WINDOWPROC,""); 2132 2146 } 2133 }2134 else{2135 SendDlgItemMessage(hwnd,IDC_WINDOWHANDLE,EM_SETREADONLY,0,0);2136 SendDlgItemMessage(hwnd,IDC_WINDOWPROC,EM_SETREADONLY,0,0);2137 2147 } 2138 2148 return 1; … … 2160 2170 void Project_Window_Insert(void){ 2161 2171 extern HANDLE hHeap; 2162 char temporary[MAX_PATH],temp2[1024] ,*pTemp;2172 char temporary[MAX_PATH],temp2[1024]; 2163 2173 2164 2174 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_PROJECT_NEWWINDOW),hOwner,(DLGPROC)DlgProject_NewWindow)) return; … … 2179 2189 return; 2180 2190 } 2181 if(lstrcmpi(NewWindow.HandleName,pWindowInfo->GetHandleName().c_str())==0){2182 //"\"%s\" ハンドルは既にプロジェクト内に存在します。"2183 sprintf(temporary,STRING_DUPLICATIONERROR_HANDLE_IN_PROJECT,pWindowInfo->GetHandleName().c_str());2184 MessageBox(hOwner,temporary,STRING_ERROR,MB_OK|MB_ICONEXCLAMATION);2185 return;2186 }2187 if(lstrcmpi(NewWindow.CallBackName,pWindowInfo->CallBackName)==0){2188 //"\"%s\" プロシージャは既にプロジェクト内に存在します。"2189 sprintf(temporary,STRING_DUPLICATIONERROR_PROC_IN_PROJECT,pWindowInfo->CallBackName);2190 MessageBox(hOwner,temporary,STRING_ERROR,MB_OK|MB_ICONEXCLAMATION);2191 return;2192 }2193 2191 } 2194 2192 … … 2202 2200 //ウィンドウ名 2203 2201 projectInfo.windowInfos.back()->SetName( NewWindow.name ); 2204 2205 //ハンドル名2206 projectInfo.windowInfos.back()->SetHandleName( NewWindow.HandleName );2207 2202 2208 2203 //位置情報 … … 2217 2212 //スタイル 2218 2213 switch(NewWindow.type){ 2219 case WNDTYPE_DEFAULT:2214 case ActiveBasic::PM::WindowType::Default: 2220 2215 //通常ウィンドウ 2221 2216 projectInfo.windowInfos.back()->SetStyle( WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX ); 2222 2217 break; 2223 case WNDTYPE_MODALDLG:2224 case WNDTYPE_MODELESSDLG:2218 case ActiveBasic::PM::WindowType::ModalDlg: 2219 case ActiveBasic::PM::WindowType::ModelessDlg: 2225 2220 //ダイアログ テンプレート(最大化、最小化ボタンをなくして、細枠にする) 2226 2221 projectInfo.windowInfos.back()->SetStyle( WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU ); … … 2247 2242 projectInfo.windowInfos.back()->SetClassName( temporary ); 2248 2243 2249 //コールバック関数名2250 projectInfo.windowInfos.back()->CallBackName=(char *)HeapAlloc(hHeap,0,lstrlen(NewWindow.CallBackName)+1);2251 lstrcpy(projectInfo.windowInfos.back()->CallBackName,NewWindow.CallBackName);2252 2253 2244 //タイプ識別 2254 projectInfo.windowInfos.back()->type=NewWindow.type; 2255 2256 2257 //メッセージ処理ファイル名 2258 sprintf(temporary,"%s.ab",projectInfo.windowInfos.back()->GetName().c_str()); 2259 projectInfo.windowInfos.back()->filepath=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1); 2260 lstrcpy(projectInfo.windowInfos.back()->filepath,temporary); 2245 projectInfo.windowInfos.back()->SetType( NewWindow.type ); 2246 2261 2247 2262 2248 … … 2265 2251 ////////////////////////// 2266 2252 2267 //テンプレートを読み込む 2268 const std::string newWindowTemplateSbpPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\new_window_template.sbp"; 2269 pTemp = ReadBuffer( newWindowTemplateSbpPath ); 2270 2271 //#name#をプロジェクト名に置換 2272 pTemp=PermutationWndPgmTemplate(pTemp, 2273 projectInfo.GetName().c_str(), 2274 NewWindow.name, 2275 NewWindow.HandleName, 2276 NewWindow.CallBackName); 2253 // テンプレートを使ってMainWnd.abを生成する 2254 const std::string resultStr = PermutationWndPgmTemplate( 2255 ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\new_window_template.sbp", 2256 projectInfo.GetName(), 2257 (std::string)NewWindow.name, 2258 (std::string)"h" + NewWindow.name, 2259 (std::string)NewWindow.name + "Proc" 2260 ); 2277 2261 2278 2262 sprintf(temporary,"%s%s.ab",projectInfo.GetWorkDir().GetPath().c_str(),projectInfo.windowInfos.back()->GetName().c_str()); 2279 2263 2280 2264 //書き込み 2281 WriteBuffer(temporary, pTemp,lstrlen(pTemp));2265 WriteBuffer(temporary,resultStr.c_str(),resultStr.size()); 2282 2266 Project_File_Insert(temporary); 2283 2267 2284 HeapDefaultFree(pTemp);2285 2268 2286 2269 … … 2309 2292 void Project_Window_Delete(int WndInfoNum){ 2310 2293 extern HANDLE hHeap; 2311 extern MDIINFO MdiInfo[MAX_WNDNUM];2312 2294 int i; 2313 2295 … … 2315 2297 2316 2298 //ウィンドウが開かれている場合は閉じる 2317 for(i=0;i<M AX_WNDNUM;i++){2318 if(MdiInfo[i].hwnd&&lstrcmpi(pWindowInfo->GetName().c_str(),MdiInfo[i].path )==0){2299 for(i=0;i<MdiInfo.size();i++){ 2300 if(MdiInfo[i].hwnd&&lstrcmpi(pWindowInfo->GetName().c_str(),MdiInfo[i].path.c_str())==0){ 2319 2301 SendMessage(MdiInfo[i].hwnd,WM_CLOSE,0,0); 2320 2302 break; 2321 2303 } 2322 2304 } 2323 2324 //ウィンドウ情報のメモリを解放2325 HeapDefaultFree(pWindowInfo->filepath);2326 HeapDefaultFree(pWindowInfo->CallBackName);2327 2305 2328 2306 //子ウィンドウのメモリを解放 -
trunk/ab5.0/abdev/abdev/abdev.cpp
r624 r625 99 99 int i; 100 100 if(!IsWindow(hChild)) return -1; 101 for(i=0;i<M AX_WNDNUM;i++){101 for(i=0;i<MdiInfo.size();i++){ 102 102 if(hChild==MdiInfo[i].hwnd) break; 103 103 } 104 if(i==M AX_WNDNUM) i=-1;104 if(i==MdiInfo.size()) i=-1; 105 105 return i; 106 106 } … … 119 119 projectInfo.pobj_DBFileInfo->ppobj_FileInfo[i]->GetFullPath(temporary); 120 120 121 if(lstrcmpi(MdiInfo[WndNum].path ,temporary)==0) return i;121 if(lstrcmpi(MdiInfo[WndNum].path.c_str(),temporary)==0) return i; 122 122 } 123 123 return -1; … … 643 643 } 644 644 WndNum=GetWndNum(hChild); 645 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){ 646 pobj_MainMenu->EnableItem(IDM_PAGESET,MF_BYCOMMAND|MF_ENABLED); 647 648 pobj_MainMenu->EnableItem(IDM_PREVIEW,MF_BYCOMMAND|MF_ENABLED); 649 650 pobj_MainMenu->EnableItem(IDM_PRINTOUT,MF_BYCOMMAND|MF_ENABLED); 651 } 652 else{ 653 pobj_MainMenu->EnableItem(IDM_PAGESET,MF_BYCOMMAND|MF_GRAYED); 654 655 pobj_MainMenu->EnableItem(IDM_PREVIEW,MF_BYCOMMAND|MF_GRAYED); 656 657 pobj_MainMenu->EnableItem(IDM_PRINTOUT,MF_BYCOMMAND|MF_GRAYED); 645 if( WndNum != -1 ) 646 { 647 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){ 648 pobj_MainMenu->EnableItem(IDM_PAGESET,MF_BYCOMMAND|MF_ENABLED); 649 650 pobj_MainMenu->EnableItem(IDM_PREVIEW,MF_BYCOMMAND|MF_ENABLED); 651 652 pobj_MainMenu->EnableItem(IDM_PRINTOUT,MF_BYCOMMAND|MF_ENABLED); 653 } 654 else{ 655 pobj_MainMenu->EnableItem(IDM_PAGESET,MF_BYCOMMAND|MF_GRAYED); 656 657 pobj_MainMenu->EnableItem(IDM_PREVIEW,MF_BYCOMMAND|MF_GRAYED); 658 659 pobj_MainMenu->EnableItem(IDM_PRINTOUT,MF_BYCOMMAND|MF_GRAYED); 660 } 658 661 } 659 662 } … … 722 725 void DuplicateTitleCheck(char *lpszTitle){ 723 726 int i; 724 for(i=0;i<M AX_WNDNUM;i++){727 for(i=0;i<MdiInfo.size();i++){ 725 728 if(MdiInfo[i].hwnd){ 726 729 if(lstrcmpi(MdiInfo[i].title,lpszTitle)==0){ … … 747 750 i=GetWndNum(hChild); 748 751 if(IS_DOCUMENT_TEXT(MdiInfo[i].DocType)){ 749 if(lstrcmpi(MdiInfo[i].path ,filepath)==0) break;752 if(lstrcmpi(MdiInfo[i].path.c_str(),filepath)==0) break; 750 753 } 751 754 hChild=GetNextWindow(hChild,GW_HWNDNEXT); … … 890 893 hChild,NULL,hInst,NULL); 891 894 895 892 896 //ウィンドウのID登録 893 for(i=0;i<MAX_WNDNUM;i++){894 if(MdiInfo[i].hwnd==0){895 896 897 DuplicateTitleCheck(str);898 MdiInfo[i].title=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(str)+1);899 lstrcpy(MdiInfo[i].title,str);900 if(filepath){901 MdiInfo[i].path=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(filepath)+1);902 lstrcpy(MdiInfo[i].path,filepath);903 }904 else{905 MdiInfo[i].path=(char *)GlobalAlloc(GPTR,1);906 }907 908 MdiInfo[i].pMdiTextEdit = new CMdiTextEdit( &MdiInfo[i] );909 910 MdiInfo[i].pMdiTextEdit->hEdit=hEdit;911 MdiInfo[i].pMdiTextEdit->pobj_WebResult=new CWebResult(hChild); 912 MdiInfo[i].pMdiTextEdit->pobj_Ruler=new CRuler(hChild,i);913 MdiInfo[i].pMdiTextEdit->hIcon=shfi.hIcon;914 MdiInfo[i].pMdiTextEdit->buffer=buffer;915 MdiInfo[i].pMdiTextEdit->pColorRef=(COLORREF *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,sizeof(COLORREF)*lstrlen(buffer));916 MdiInfo[i].pMdiTextEdit->iUnderStart=-1;917 MdiInfo[i].pMdiTextEdit->iUnderEnd=-1;918 MdiInfo[i].pMdiTextEdit->StartCaretPos.x=0;919 MdiInfo[i].pMdiTextEdit->StartCaretPos.y=0;920 MdiInfo[i].pMdiTextEdit->EndCaretPos.x=0;921 MdiInfo[i].pMdiTextEdit->EndCaretPos.y=0;922 MdiInfo[i].pMdiTextEdit->Temp_UpDown_CaretXPos=-1;923 MdiInfo[i].pMdiTextEdit->bAutoScroll=0;924 MdiInfo[i].pMdiTextEdit->iWidth_ControlTabSpace=925 GetControlTabSpace(i,&MdiInfo[i].pMdiTextEdit->iLineNumberTextCount);926 MdiInfo[i].pMdiTextEdit->iCharCode=iCharCode;927 MdiInfo[i].pMdiTextEdit->iLfCode=iLfCode;928 929 MdiInfo[i].IndentStr=0;930 931 int flag; 932 if(mdic.style&WS_MAXIMIZE) flag=SIZE_MAXIMIZED; 933 else flag=0;934 SendTextEditResizeEvent(hChild);935 break;936 }937 } 897 MdiInfo.push_back( MDIINFO() ); 898 i = MdiInfo.size()-1; 899 MdiInfo[i].hwnd=hChild; 900 MdiInfo[i].DocType=DocumentType; 901 MdiInfo[i].title=""; 902 DuplicateTitleCheck(str); 903 MdiInfo[i].title=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(str)+1); 904 lstrcpy(MdiInfo[i].title,str); 905 if(filepath) 906 { 907 MdiInfo[i].path = filepath; 908 } 909 else 910 { 911 MdiInfo[i].path = ""; 912 } 913 914 MdiInfo[i].pMdiTextEdit = new CMdiTextEdit( &MdiInfo[i] ); 915 916 MdiInfo[i].pMdiTextEdit->hEdit=hEdit; 917 MdiInfo[i].pMdiTextEdit->pobj_WebResult=new CWebResult(hChild); 918 MdiInfo[i].pMdiTextEdit->pobj_Ruler=new CRuler(hChild,i); 919 MdiInfo[i].pMdiTextEdit->hIcon=shfi.hIcon; 920 MdiInfo[i].pMdiTextEdit->buffer=buffer; 921 MdiInfo[i].pMdiTextEdit->pColorRef=(COLORREF *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,sizeof(COLORREF)*lstrlen(buffer)); 922 MdiInfo[i].pMdiTextEdit->iUnderStart=-1; 923 MdiInfo[i].pMdiTextEdit->iUnderEnd=-1; 924 MdiInfo[i].pMdiTextEdit->StartCaretPos.x=0; 925 MdiInfo[i].pMdiTextEdit->StartCaretPos.y=0; 926 MdiInfo[i].pMdiTextEdit->EndCaretPos.x=0; 927 MdiInfo[i].pMdiTextEdit->EndCaretPos.y=0; 928 MdiInfo[i].pMdiTextEdit->Temp_UpDown_CaretXPos=-1; 929 MdiInfo[i].pMdiTextEdit->bAutoScroll=0; 930 MdiInfo[i].pMdiTextEdit->iWidth_ControlTabSpace= 931 GetControlTabSpace(i,&MdiInfo[i].pMdiTextEdit->iLineNumberTextCount); 932 MdiInfo[i].pMdiTextEdit->iCharCode=iCharCode; 933 MdiInfo[i].pMdiTextEdit->iLfCode=iLfCode; 934 MdiInfo[i].IndentStr=0; 935 936 937 int flag; 938 if(mdic.style&WS_MAXIMIZE) flag=SIZE_MAXIMIZED; 939 else flag=0; 940 SendTextEditResizeEvent(hChild); 941 938 942 939 943 //ワードカラーをセット 940 if(IS_DOCUMENT_TEXT(DocumentType)) SetTextEditWordColor( i);944 if(IS_DOCUMENT_TEXT(DocumentType)) SetTextEditWordColor(MdiInfo.size()-1); 941 945 942 946 //Docコンボボックスに追加 … … 983 987 984 988 GlobalFree(MdiInfo[WndNum].title); 985 GlobalFree(MdiInfo[WndNum].path);986 989 987 990 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){ … … 1063 1066 HeapDefaultFree(MdiInfo[WndNum].MdiIconEditInfo); 1064 1067 } 1068 else 1069 { 1070 throw; 1071 } 1072 1073 Jenga::Common::EraseVectorItem<std::vector<MDIINFO>>( MdiInfo, WndNum ); 1065 1074 } 1066 1075 void ResizeTextEditWnd(HWND hwnd,int cx,int cy){ … … 1711 1720 if(!TranslateAccelerator(hOwner,hAccel,&msg)){ 1712 1721 if( projectInfo.IsOpened() ){ 1713 for(i=0,i2=0;i<M AX_WNDNUM;i++){1722 for(i=0,i2=0;i<MdiInfo.size();i++){ 1714 1723 if(MdiInfo[i].hwnd&&MdiInfo[i].DocType==WNDTYPE_RAD){ 1715 1724 if(IsDialogMessage(MdiInfo[i].MdiRadInfo->hProp_Dlg,&msg)) i2=1; -
trunk/ab5.0/abdev/abdev/abdev.h
r624 r625 48 48 HWND hClient; //MDIクライアントウィンドウ 49 49 HWND hStatusBar; //ステータスバー 50 MDIINFO MdiInfo[MAX_WNDNUM]; //MDIドキュメントウィンドウ情報50 std::vector<MDIINFO> MdiInfo; //MDIドキュメントウィンドウ情報 51 51 52 52 /* メニュー */ -
trunk/ab5.0/abdev/abdev/abdev.vcproj
r620 r625 433 433 > 434 434 </File> 435 <Filter 436 Name="PartialManager" 437 > 438 <File 439 RelativePath=".\src\WindowComponents\PartialManager\TextEditPartialManager.cpp" 440 > 441 </File> 442 </Filter> 435 443 </Filter> 436 444 <Filter … … 2768 2776 </Filter> 2769 2777 <Filter 2770 Name="Window 2778 Name="WindowComponents" 2771 2779 > 2772 2780 <File … … 2790 2798 > 2791 2799 </File> 2800 <Filter 2801 Name="PartialManager" 2802 > 2803 <File 2804 RelativePath=".\include\WindowComponents\PartialManager\PartialManager.h" 2805 > 2806 </File> 2807 <File 2808 RelativePath=".\include\WindowComponents\PartialManager\TextEditPartialManager.h" 2809 > 2810 </File> 2811 </Filter> 2792 2812 </Filter> 2793 2813 <Filter -
trunk/ab5.0/abdev/abdev/include/ProjectManager/WindowManager.h
r624 r625 105 105 }; 106 106 typedef std::vector<ChildWindowInfo *> ChildWindowInfos; 107 108 struct WindowType 109 { 110 enum EnumType 111 { 112 Default = 0, 113 ModalDlg = 1, 114 ModelessDlg = 3, 115 }; 116 }; 117 107 118 class WindowInfo 108 119 : public WindowInfoBase 109 120 { 110 121 public: 111 WindowInfo() 112 : WindowInfoBase()113 , CallBackName( NULL )114 {122 123 const std::string GetSourceFileName() const 124 { 125 return this->GetName() + ".ab"; 115 126 } 116 127 … … 124 135 } 125 136 126 const std::string &GetHandleName() const 127 { 128 return handleName; 129 } 130 void SetHandleName( const std::string &handleName ) 131 { 132 this->handleName = handleName; 137 const std::string GetHandleName() const 138 { 139 return "h" + this->GetName(); 140 } 141 142 const std::string GetCallbackName() const 143 { 144 return this->GetName() + "Proc"; 133 145 } 134 146 … … 166 178 { 167 179 return !iconResourceName.empty(); 180 } 181 182 WindowType::EnumType GetType() const 183 { 184 return type; 185 } 186 void SetType( WindowType::EnumType type ) 187 { 188 this->type = type; 189 } 190 bool IsDefaultWindow() const 191 { 192 return ( type == WindowType::Default ); 193 } 194 bool IsModalDlg() const 195 { 196 return ( type == WindowType::ModalDlg ); 197 } 198 bool IsModelessDlg() const 199 { 200 return ( type == WindowType::ModelessDlg ); 168 201 } 169 202 170 203 //ウィンドウデータ 171 204 LOGFONT LogFont; 172 char *CallBackName;173 long type;174 char *filepath;175 205 176 206 //子ウィンドウ管理 … … 186 216 int backgroundColor; 187 217 std::string iconResourceName; 218 WindowType::EnumType type; 188 219 }; 189 220 … … 211 242 { 212 243 WindowInfos::iterator it = this->begin(); 213 for( int i=0; i!=index ;i++, it++ ) 244 int i = 0; 245 while( i < index ) 214 246 { 215 delete *it; 247 i ++; 248 it ++; 216 249 } 217 250 this->erase( it ); -
trunk/ab5.0/abdev/abdev/nkf_class.cpp
r477 r625 156 156 157 157 BOOL CALLBACK nkfDlgCodeSave(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 158 extern MDIINFO MdiInfo[MAX_WNDNUM];159 158 static int WndNum; 160 159 HWND hList; -
trunk/ab5.0/abdev/abdev/src/MainFrame.cpp
r624 r625 316 316 mii.dwTypeData=temporary; 317 317 mii.fType=MFT_STRING; 318 if( MdiInfo[WndNum].path[0]){319 _splitpath(MdiInfo[WndNum].path ,NULL,NULL,temporary,temp2);318 if(!MdiInfo[WndNum].path.empty()){ 319 _splitpath(MdiInfo[WndNum].path.c_str(),NULL,NULL,temporary,temp2); 320 320 lstrcat(temporary,temp2); 321 321 lstrcat(temporary," を保存(&S)"); … … 329 329 /*「絶対パスをコピー」「フォルダを開く」「ファイルを削除」 330 330 コマンドを場合によって無効化にする */ 331 if( MdiInfo[WndNum].path[0]){331 if(!MdiInfo[WndNum].path.empty()){ 332 332 EnableMenuItem(hTabMenu,IDM_PATH_COPY,MF_BYCOMMAND|MF_ENABLED); 333 333 EnableMenuItem(hTabMenu,IDM_FOLDER_OPEN,MF_BYCOMMAND|MF_ENABLED); … … 383 383 WndNum=GetWndNum(hChild); 384 384 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){ 385 if(lstrcmpi(MdiInfo[WndNum].path ,temporary)==0) break;385 if(lstrcmpi(MdiInfo[WndNum].path.c_str(),temporary)==0) break; 386 386 } 387 387 hChild=::GetNextWindow(hChild,GW_HWNDNEXT); … … 548 548 void MainFrame::OnCmdAllSave( UINT uNotifyCode, int nID, CWindow wndCtl ) 549 549 { 550 for( int i=0;i<M AX_WNDNUM;i++){550 for( int i=0;i<MdiInfo.size();i++){ 551 551 if(MdiInfo[i].hwnd) SaveDocument(MdiInfo[i].hwnd,NULL); 552 552 } … … 585 585 if(!hChild) return; 586 586 int WndNum=GetWndNum(hChild); 587 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)) 587 if( IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType) ) 588 { 588 589 TextEdit_UndoCommand(WndNum); 589 else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD) 590 } 591 else if( MdiInfo[WndNum].DocType == WNDTYPE_RAD ) 592 { 590 593 Rad_UndoCommand(WndNum); 591 else if(MdiInfo[WndNum].DocType==WNDTYPE_ICONEDIT) 594 } 595 else if( MdiInfo[WndNum].DocType == WNDTYPE_ICONEDIT ) 596 { 592 597 IconEdit_UndoCommand(WndNum); 598 } 593 599 } 594 600 … … 986 992 if(!SetRunning(hChild)) return; 987 993 if(IsNeedCompile(MdiInfo[GetWndNum(hChild)].path,1)) 988 sprintf(temporary,"\"%s\" /debug /run /wnd:%08x",MdiInfo[GetWndNum(hChild)].path ,m_hWnd);994 sprintf(temporary,"\"%s\" /debug /run /wnd:%08x",MdiInfo[GetWndNum(hChild)].path.c_str(),m_hWnd); 989 995 else 990 sprintf(temporary,"\"%s\" /run /wnd:%08x",MdiInfo[GetWndNum(hChild)].path ,m_hWnd);996 sprintf(temporary,"\"%s\" /run /wnd:%08x",MdiInfo[GetWndNum(hChild)].path.c_str(),m_hWnd); 991 997 992 998 //ブレークポイントをセーブ … … 1051 1057 //単独ソースコード 1052 1058 if(!SetRunning(hChild)) return; 1053 sprintf(temporary,"\"%s\" /debug /wnd:%08x",MdiInfo[GetWndNum(hChild)].path ,m_hWnd);1059 sprintf(temporary,"\"%s\" /debug /wnd:%08x",MdiInfo[GetWndNum(hChild)].path.c_str(),m_hWnd); 1054 1060 } 1055 1061 … … 1165 1171 //単独ソースコード 1166 1172 if(!SetRunning(hChild)) return; 1167 sprintf(temporary,"\"%s\" /wnd:%08x",MdiInfo[GetWndNum(hChild)].path ,m_hWnd);1173 sprintf(temporary,"\"%s\" /wnd:%08x",MdiInfo[GetWndNum(hChild)].path.c_str(),m_hWnd); 1168 1174 } 1169 1175 … … 1224 1230 1225 1231 //単独ソースコード 1226 _splitpath(MdiInfo[GetWndNum(hChild)].path ,temporary,temp2,temp3,NULL);1232 _splitpath(MdiInfo[GetWndNum(hChild)].path.c_str(),temporary,temp2,temp3,NULL); 1227 1233 lstrcat(temporary,temp2); 1228 1234 lstrcat(temporary,temp3); … … 1403 1409 HWND hChild=::GetWindow(hClient,GW_CHILD); 1404 1410 int WndNum=GetWndNum(hChild); 1405 for(int i=0;i<M AX_WNDNUM;i++){1411 for(int i=0;i<MdiInfo.size();i++){ 1406 1412 if(i==WndNum) continue; 1407 1413 if(MdiInfo[i].hwnd) SendMessage(MdiInfo[i].hwnd,WM_CLOSE,0,0); … … 1415 1421 1416 1422 //絶対パスをコピー 1417 HGLOBAL hGlobal=(char *)GlobalAlloc(GMEM_MOVEABLE, lstrlen(MdiInfo[WndNum].path)+1);1423 HGLOBAL hGlobal=(char *)GlobalAlloc(GMEM_MOVEABLE,MdiInfo[WndNum].path.size()+1); 1418 1424 char *pTemp=(char *)GlobalLock(hGlobal); 1419 lstrcpy(pTemp,MdiInfo[WndNum].path );1425 lstrcpy(pTemp,MdiInfo[WndNum].path.c_str()); 1420 1426 GlobalUnlock(hGlobal); 1421 1427 … … 1433 1439 1434 1440 char temporary[1024], temp2[1024]; 1435 _splitpath(MdiInfo[WndNum].path ,temporary,temp2,NULL,NULL);1441 _splitpath(MdiInfo[WndNum].path.c_str(),temporary,temp2,NULL,NULL); 1436 1442 lstrcat(temporary,temp2); 1437 1443 … … 1445 1451 1446 1452 char temporary[1024], temp2[1024]; 1447 _splitpath(MdiInfo[WndNum].path ,NULL,NULL,temporary,temp2);1453 _splitpath(MdiInfo[WndNum].path.c_str(),NULL,NULL,temporary,temp2); 1448 1454 lstrcat(temporary,temp2); 1449 1455 … … 1455 1461 fo.hwnd=m_hWnd; 1456 1462 fo.wFunc=FO_DELETE; 1457 fo.pFrom =MdiInfo[WndNum].path ;1463 fo.pFrom =MdiInfo[WndNum].path.c_str(); 1458 1464 fo.pTo="\0"; 1459 1465 fo.fFlags =FOF_ALLOWUNDO|FOF_NOCONFIRMATION; -
trunk/ab5.0/abdev/abdev/src/ProjectManager/ProjectManager.cpp
r624 r625 267 267 void Project::Save() 268 268 { 269 extern MDIINFO MdiInfo[MAX_WNDNUM];270 269 int i,i2,i3,WndNum; 271 270 char temporary[MAX_PATH],buffer[32767]; … … 284 283 for(i=0;i<this->pobj_DBFileInfo->iNum;i++){ 285 284 this->pobj_DBFileInfo->ppobj_FileInfo[i]->GetFullPath(temporary); 286 if(lstrcmpi(MdiInfo[WndNum].path ,temporary)==0){285 if(lstrcmpi(MdiInfo[WndNum].path.c_str(),temporary)==0){ 287 286 SaveDocument(hChild,NULL); 288 287 break; … … 297 296 lstrcpy(temporary,resourceItem.filepath.c_str()); 298 297 lstrcpy( temporary, this->GetWorkDir().GetFullPath( temporary ).c_str() ); 299 if(lstrcmpi(MdiInfo[WndNum].path ,temporary)==0){298 if(lstrcmpi(MdiInfo[WndNum].path.c_str(),temporary)==0){ 300 299 SaveDocument(hChild,NULL); 301 300 break; … … 533 532 { 534 533 extern HANDLE hHeap; 535 extern MDIINFO MdiInfo[MAX_WNDNUM];536 534 int i,WndNum; 537 535 HWND hChild,hCloseChild; … … 553 551 for(i=0;i<this->pobj_DBFileInfo->iNum;i++){ 554 552 this->pobj_DBFileInfo->ppobj_FileInfo[i]->GetFullPath(temporary); 555 if(lstrcmpi(MdiInfo[WndNum].path ,temporary)==0){553 if(lstrcmpi(MdiInfo[WndNum].path.c_str(),temporary)==0){ 556 554 557 555 //変更フラグをオフにする … … 575 573 else if(MdiInfo[WndNum].DocType==WNDTYPE_MENU){ 576 574 for(i=0;i<this->NumberOfMenu;i++){ 577 if(lstrcmp(MdiInfo[WndNum].path,this->pMenuInfo[i].IdName)==0){ 575 if( MdiInfo[WndNum].path == this->pMenuInfo[i].IdName ) 576 { 578 577 SendMessage(hCloseChild,WM_CLOSE,0,0); 579 578 break; … … 585 584 lstrcpy(temporary,this->resourceManager.iconResources[i].filepath.c_str()); 586 585 lstrcpy( temporary, this->GetWorkDir().GetFullPath( temporary ).c_str() ); 587 if(lstrcmpi(MdiInfo[WndNum].path ,temporary)==0){586 if(lstrcmpi(MdiInfo[WndNum].path.c_str(),temporary)==0){ 588 587 SendMessage(hCloseChild,WM_CLOSE,0,0); 589 588 break; … … 602 601 BOOST_FOREACH( ActiveBasic::PM::WindowInfo *pWindowInfo, windowInfos ) 603 602 { 604 HeapDefaultFree(pWindowInfo->CallBackName);605 HeapDefaultFree(pWindowInfo->filepath);606 607 603 //子ウィンドウのメモリを解放 608 604 BOOST_FOREACH( ActiveBasic::PM::ChildWindowInfo *pChildWindowInfo, pWindowInfo->childWindowInfos ) -
trunk/ab5.0/abdev/res/res.rc
r606 r625 643 643 END 644 644 645 IDD_PROJECT_NEWWINDOW DIALOG 645 IDD_PROJECT_NEWWINDOW DIALOGEX 0, 0, 171, 153 646 646 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU 647 647 CAPTION "新規ウィンドウ" 648 FONT 9, "MS Pゴシック" 648 FONT 9, "MS Pゴシック", 0, 0, 0x0 649 649 BEGIN 650 650 LTEXT "ウィンドウ名:",IDC_STATIC,13,11,36,8 651 LTEXT "ハンドル:",IDC_STATIC,13, 60,26,8652 LTEXT "プロシージャ:",IDC_STATIC,13,7 7,39,8653 GROUPBOX "詳細",IDC_STATIC,7, 29,96,64651 LTEXT "ハンドル:",IDC_STATIC,13,54,26,8 652 LTEXT "プロシージャ:",IDC_STATIC,13,71,39,8 653 GROUPBOX "詳細",IDC_STATIC,7,33,96,56 654 654 GROUPBOX "タイプ",IDC_STATIC,7,99,157,47 655 655 EDITTEXT IDC_WINDOWNAME,56,7,40,14,ES_AUTOHSCROLL 656 CONTROL "自動設定",IDC_AUTOSET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,42,43,10 657 EDITTEXT IDC_WINDOWHANDLE,56,56,40,14,ES_AUTOHSCROLL 658 EDITTEXT IDC_WINDOWPROC,56,73,40,14,ES_AUTOHSCROLL 656 EDITTEXT IDC_WINDOWHANDLE,56,50,40,14,ES_AUTOHSCROLL | ES_READONLY 657 EDITTEXT IDC_WINDOWPROC,56,67,40,14,ES_AUTOHSCROLL | ES_READONLY 659 658 CONTROL "通常ウィンドウ",IDC_DEFWINDOW,"Button",BS_AUTORADIOBUTTON,13,111,57,10 660 659 CONTROL "ダイアログ テンプレート(モーダル)",IDC_MODALDLG,"Button",BS_AUTORADIOBUTTON,13,122,117,10 … … 736 735 END 737 736 738 IDD_RAD_PROP_WINDOW_RENAME DIALOG 737 IDD_RAD_PROP_WINDOW_RENAME DIALOGEX 0, 0, 170, 99 739 738 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU 740 739 CAPTION "識別設定" 741 FONT 9, "MS Pゴシック" 740 FONT 9, "MS Pゴシック", 0, 0, 0x0 742 741 BEGIN 743 742 LTEXT "ウィンドウ名:",IDC_STATIC,13,11,36,8 744 LTEXT "ハンドル:",IDC_STATIC,13, 60,26,8745 LTEXT "プロシージャ:",IDC_STATIC,13,7 7,39,8746 GROUPBOX "詳細",IDC_STATIC,7, 29,96,64743 LTEXT "ハンドル:",IDC_STATIC,13,53,26,8 744 LTEXT "プロシージャ:",IDC_STATIC,13,70,39,8 745 GROUPBOX "詳細",IDC_STATIC,7,33,96,56 747 746 EDITTEXT IDC_WINDOWNAME,56,7,40,14,ES_AUTOHSCROLL 748 CONTROL "自動設定",IDC_AUTOSET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,42,43,10 749 EDITTEXT IDC_WINDOWHANDLE,56,56,40,14,ES_AUTOHSCROLL 750 EDITTEXT IDC_WINDOWPROC,56,73,40,14,ES_AUTOHSCROLL 747 EDITTEXT IDC_WINDOWHANDLE,56,49,40,14,ES_AUTOHSCROLL | ES_READONLY 748 EDITTEXT IDC_WINDOWPROC,56,66,40,14,ES_AUTOHSCROLL | ES_READONLY 751 749 DEFPUSHBUTTON "OK",IDOK,113,7,50,14 752 750 PUSHBUTTON "キャンセル",IDCANCEL,113,24,50,14 -
trunk/ab5.0/abdev/res/resource.h
r606 r625 201 201 #define IDC_WINDOWPROC 1082 202 202 #define IDC_TOOL_HSCROLLBAR 1082 203 #define IDC_AUTOSET 1083204 203 #define IDC_TOOL_VSCROLLBAR 1083 205 204 #define IDC_TOOL_COMBOBOX 1084 -
trunk/ab5.0/jenga/include/jenga.h
r623 r625 11 11 #include "common/Hashmap.h" 12 12 #include "common/Path.h" 13 #include "common/SourceTemplate.h" 13 14 #include "common/String.h" 14 15 #include "common/VectorSupporter.h" -
trunk/ab5.0/jenga/projects/jenga/jenga.vcproj
r623 r625 299 299 <File 300 300 RelativePath="..\..\src\common\Path.cpp" 301 > 302 </File> 303 <File 304 RelativePath="..\..\src\common\SourceTemplate.cpp" 301 305 > 302 306 </File> … … 392 396 </File> 393 397 <File 398 RelativePath="..\..\include\common\SourceTemplate.h" 399 > 400 </File> 401 <File 394 402 RelativePath=".\stdafx.h" 395 403 >
Note:
See TracChangeset
for help on using the changeset viewer.