0

I'm using this code

STARTUPINFO si;
    PROCESS_INFORMATION pi;
    ZeroMemory(&si, sizeof(si));
    si.cb = sizeof(si);
    ZeroMemory(&pi, sizeof(pi));
    CString commandLine = _T("explorer.exe ") + CPathName(destination).DirectoryPath();
    CreateProcess(NULL, commandLine.GetBuffer(), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);

to open the location of the exported file. Is there a way that the file can be selected so that I don't have to find it?

cosmotel
  • 83
  • 2
  • 10

1 Answers1

1

Your solution is too complex, you can just use

ShellExecute

A bunch of other solutions can be found here:

Programmatically selecting file in explorer

Community
  • 1
  • 1
demonplus
  • 5,613
  • 12
  • 49
  • 68