Ignore:
Timestamp:
May 27, 2008, 9:17:34 PM (16 years ago)
Author:
dai_9181
Message:

・WindowInfoクラスをリファクタリング
・MdiInfoを単純配列からvectorに変更した。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/abdev/SubOperation.cpp

    r523 r625  
    891891    if(bRedraw){
    892892        //再描画
    893         extern MDIINFO MdiInfo[MAX_WNDNUM];
    894893        int i;
    895         for(i=0;i<MAX_WNDNUM;i++){
     894        for(i=0;i<MdiInfo.size();i++){
    896895            if(MdiInfo[i].hwnd){
    897896                if(IS_DOCUMENT_TEXT(MdiInfo[i].DocType)){
     
    14561455//実行コマンド
    14571456BOOL SetRunning(HWND hChild){
    1458     extern MDIINFO MdiInfo[MAX_WNDNUM];
    14591457    extern LPSTR DefFileFilter;
    14601458    int WndNum;
     
    14741472    WndNum=GetWndNum(hChild);
    14751473    if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){
    1476         if(MdiInfo[WndNum].path[0]=='\0'){
     1474        if(MdiInfo[WndNum].path.empty()){
    14771475            //"保存先のファイルを指定してください"
    14781476            if(!GetFilePathDialog(hOwner,temp2,DefFileFilter,STRING_FILESAVETITLE_DEFAULT,0)) return FALSE;
     
    14851483            }
    14861484            else{
    1487                 if(hFind=FindFirstFile(MdiInfo[WndNum].path,&wfd)){
     1485                if(hFind=FindFirstFile(MdiInfo[WndNum].path.c_str(),&wfd)){
    14881486                    if(hFind==INVALID_HANDLE_VALUE){
    14891487                        if(!SaveDocument(hChild,NULL)) return 0;
     
    14971495}
    14981496
    1499 BOOL IsNeedCompile(char *FileName,BOOL bDebug){
     1497BOOL IsNeedCompile( const std::string &filepath, BOOL bDebug )
     1498{
    15001499    char temporary[MAX_PATH],temp2[MAX_PATH],temp3[MAX_PATH];
    15011500    HANDLE hFind,hFile;
     
    15031502    FILETIME SourceTime,ExeTime;
    15041503
    1505     _splitpath(FileName,temporary,temp2,temp3,NULL);
     1504    _splitpath(filepath.c_str(),temporary,temp2,temp3,NULL);
    15061505    lstrcat(temporary,temp2);
    15071506    lstrcat(temporary,temp3);
     
    15131512    FindClose(hFind);
    15141513
    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);
    15161515    GetFileTime(hFile,NULL,NULL,&SourceTime);
    15171516    CloseHandle(hFile);
Note: See TracChangeset for help on using the changeset viewer.