Posted By

jimfred on 03/01/10


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

khouser


MFC, edit INI file using ShellExecute


 / Published in: C++
 

  1. CString strDirectory;
  2. CString iniFile;
  3.  
  4. GetCurrentDirectory( _MAX_PATH, strDirectory.GetBufferSetLength( _MAX_PATH ) );
  5. strDirectory.ReleaseBuffer( );
  6.  
  7. iniFile.Format( "%s\\%s%s", strDirectory, AfxGetApp()->m_pszExeName, ".ini" );
  8.  
  9.  
  10. ShellExecute(NULL, NULL, "notepad", iniFile, strDirectory, SW_SHOWNORMAL);

Report this snippet  

You need to login to post a comment.