Changeset 639
- Timestamp:
- 11/02/06 18:20:46 (2 years ago)
- Files:
-
- 1 modified
-
trunk/win/Leocad.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/win/Leocad.cpp
r559 r639 68 68 { 69 69 if(HttpQueryInfo(hHttpFile,HTTP_QUERY_CONTENT_LENGTH, szSizeBuffer, &dwLengthSizeBuffer, NULL)) 70 { 70 { 71 71 dwFileSize = atol(szSizeBuffer); 72 LPSTR szContents = Contents.GetBuffer(dwFileSize); 73 72 LPSTR szContents = Contents.GetBuffer(dwFileSize+1); 73 szContents[dwFileSize] = 0; 74 74 75 if (InternetReadFile(hHttpFile, szContents, dwFileSize, &dwBytesRead)) 75 76 { … … 77 78 int lib; 78 79 79 if (sscanf (szContents, "%f %d", &ver, &lib) == 2)80 if (sscanf(szContents, "%f %d", &ver, &lib) == 2) 80 81 { 81 82 CString str; … … 178 179 179 180 char app[LC_MAXPATH], *ptr; 180 GetModuleFileName (NULL, app, LC_MAXPATH);181 GetModuleFileName(NULL, app, LC_MAXPATH); 181 182 ptr = strrchr(app,'\\'); 182 183 if (ptr) … … 227 228 { 228 229 char out[_MAX_PATH]; 229 GetTempPath (_MAX_PATH, out);230 strcat (out, "~LC*.lcd");230 GetTempPath(_MAX_PATH, out); 231 strcat(out, "~LC*.lcd"); 231 232 232 233 WIN32_FIND_DATA fd; … … 234 235 if (fh != INVALID_HANDLE_VALUE) 235 236 { 236 if (char *ptr = strrchr (out, '\\')) *(ptr+1) = 0;237 strcat (out, fd.cFileName);238 if (AfxMessageBox (_T("LeoCAD found a file that was being edited while the program exited unexpectdly. Do you want to load it ?"), MB_YESNO) == IDNO)237 if (char *ptr = strrchr(out, '\\')) *(ptr+1) = 0; 238 strcat(out, fd.cFileName); 239 if (AfxMessageBox(_T("LeoCAD found a file that was being edited while the program exited unexpectdly. Do you want to load it ?"), MB_YESNO) == IDNO) 239 240 { 240 if (AfxMessageBox (_T("Delete file ?"), MB_YESNO) == IDYES)241 DeleteFile (out);241 if (AfxMessageBox(_T("Delete file ?"), MB_YESNO) == IDYES) 242 DeleteFile(out); 242 243 } 243 244 else … … 263 264 lcGetActiveProject()->UpdateInterface(); 264 265 265 main_window->UpdateMRU ();266 main_window->UpdateMRU(); 266 267 267 268 // Enable drag/drop open
