How to force mru file to open? 
Author Message
 How to force mru file to open?

Can anyone tell me how to force the most recent file to open when the app
starts?  I would prefer to make this an option for the user.

Thanks.
Mark F.



Sat, 31 Aug 2002 03:00:00 GMT  
 How to force mru file to open?
Post a WM_COMMAND message to the main window with the value ID_FILE_MRU_FILE1


Sun, 01 Sep 2002 03:00:00 GMT  
 How to force mru file to open?
Try something like this:

BOOL CTestApp::InitInstance()
{
 // Standard initialization
 // etc.
  // Register the application's document templates.  Document templates
// etc.
  // Parse command line for standard shell commands, DDE, file open
  CCommandLineInfo commandLine;
  ParseCommandLine(commandLine);

  // If there is nothing on the command line, open the MRU database
  if (commandLine.m_strFileName.IsEmpty())
  {
   commandLine.m_strFileName = GetProfileString(_T("Recent File List"),
_T("File1"), _T(""));
   if (!commandLine.m_strFileName.IsEmpty())
    commandLine.m_nShellCommand = CCommandLineInfo::FileOpen;
  }

  // Dispatch commands specified on the command line
  if (ProcessShellCommand(commandLine))
  {

etc.


Quote:
> Can anyone tell me how to force the most recent file to open when the app
> starts?  I would prefer to make this an option for the user.

> Thanks.
> Mark F.



Mon, 02 Sep 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Difference between MRU File Open and Regular File Open

2. Opening file from MRU

3. Help: Auto open the MRU file

4. Open File Dialog after MRU failure

5. MRU file open fails ?

6. Force the closure of an open file?

7. Force File Open

8. Prevent certain document open failures from removing MRU

9. ?Problems when user chooses file from MRU list (on file menu)

10. can't open file: to many files open

11. How to force IExplorer to open a web page

12. Q: how to force ie to open a new window

 

 
Powered by phpBB® Forum Software