Link to home
Start Free TrialLog in
Avatar of nunnbetter
nunnbetter

asked on

Reopen a textfile passed as an argument via a timer.

I used the appwizard to create an SDI where I changed the base class of CView to CEditView.  So, a text file passed as a command-line argument will display and be editable(by default).  I have a text file that is accessed and changed from other sources on my network.  I have the timer in MainFrm set to go off every 3 secs.  I need to know how and where to close the file, so that the timer can reload it.
ASKER CERTIFIED SOLUTION
Avatar of danny_pav
danny_pav

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nunnbetter
nunnbetter

ASKER

Well, the document will be read-only in the client area.  Strictly for viewing the file.  About the other, I am kind of confused.  Could you give me an example.  I used the class wizard to add the OnOpenDocument in the CMyDoc.  But, not sure what else to do.  Thanks.
Get the name of the file to open--use CDocument::GetPathName
and use it as the argument to OnOpenDocument()