Changeset 99 in dev for ProjectEditor
- Timestamp:
- Apr 19, 2007, 3:09:55 AM (18 years ago)
- Location:
- ProjectEditor
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ProjectEditor/Backup.cpp
r24 r99 55 55 //ファイルを保存 56 56 sprintf(temporary,"%sdocument%02d.txt",szBackupDirPath,iNum); 57 WriteBuffer(temporary,MdiInfo[WndNum].pMdiTextEdit->buffer,lstrlen(MdiInfo[WndNum].pMdiTextEdit->buffer) );57 WriteBuffer(temporary,MdiInfo[WndNum].pMdiTextEdit->buffer,lstrlen(MdiInfo[WndNum].pMdiTextEdit->buffer), false); 58 58 59 59 //情報を追加 -
ProjectEditor/Common.h
r85 r99 66 66 #define APPLICATION_NAME "ActiveBasic 5.0" 67 67 #define VERSION_APPLI_NAME APPLICATION_NAME 68 #define VERSION_STRING "5.00.00 β rev. 194"68 #define VERSION_STRING "5.00.00 β rev.218" 69 69 70 70 #endif … … 780 780 char *ReadBuffer(char *path); 781 781 char *ReadBuffer_NonErrMsg(char *path); 782 _int8 WriteBuffer(char *path,char *buffer,int length );782 _int8 WriteBuffer(char *path,char *buffer,int length, bool isEnableError = true); 783 783 _int8 WriteBuffer_NonErrMsg(char *path,char *buffer,int length); 784 784 void GetRelationalPath(char *path,char *dir); -
ProjectEditor/FileOperation.cpp
r80 r99 55 55 return buffer; 56 56 } 57 _int8 WriteBuffer(char *path,char *buffer,int length ){57 _int8 WriteBuffer(char *path,char *buffer,int length, bool isEnableError){ 58 58 HANDLE hFile; 59 59 DWORD dw; … … 62 62 char temporary[MAX_PATH]; 63 63 64 //"\"%s\" ファイルへの書き込みに失敗しました。" 65 sprintf(temporary,STRING_ERROR_CANT_FILESAVE,path); 66 MessageBox(hOwner,temporary,STRING_ERROR,MB_OK|MB_ICONEXCLAMATION); 64 if( isEnableError ){ 65 //"\"%s\" ファイルへの書き込みに失敗しました。" 66 sprintf(temporary,STRING_ERROR_CANT_FILESAVE,path); 67 MessageBox(hOwner,temporary,STRING_ERROR,MB_OK|MB_ICONEXCLAMATION); 68 } 67 69 return 0; 68 70 } … … 72 74 } 73 75 _int8 WriteBuffer_NonErrMsg(char *path,char *buffer,int length){ 74 extern HWND hOwnerEditor; 75 HANDLE hFile; 76 DWORD dw; 77 hFile=CreateFile(path,GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL); 78 if(hFile==INVALID_HANDLE_VALUE){ 79 return 0; 80 } 81 if(length) WriteFile(hFile,buffer,length,&dw,NULL); 82 CloseHandle(hFile); 83 return 1; 76 return WriteBuffer( path, buffer, length, false ); 84 77 } 85 78 void GetRelationalPath(char *path,char *dir){
Note:
See TracChangeset
for help on using the changeset viewer.