Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Syntax Edit
  New Posts New Posts RSS Feed - Unable to open read only files
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Unable to open read only files

 Post Reply Post Reply
Author
Message
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Topic: Unable to open read only files
    Posted: 27 December 2006 at 10:10am
Hi;
 
When trying to open a readonly file with the provided MDITextEditor sample, the CXTPSyntaxEditDoc::OnOpenDocument() returns FALSE which fails to open the document.
This is because CXTPSyntaxeditDoc::SaveFileData() is called and the default implementation returns FALSE when files with readonly flags set are opened. I did not dig deeper into code, but it looks strange that immediately after opening a file its written back.
Is this behaviour really what codejock developers wanted to implement. For me it seems more obvious to be able to open readonly files without any change in code.
 
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.