MFC, edit INI file using ShellExecute


/ Published in: C++
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.