How do you command the DS to open a C++ graphic file?



  • I can't open a graphic file. First tried it:

    #define FNAME "D:/Scream297and396.jpg"              
    ...            
    int main() { char fname [50] =FNAME;        
    FILE *fout;            
    fout = fopen(FNAME,"r");           
    return 0; }
    

    ...but there's nothing going on when this program starts, the file doesn't open. More specifically, it may still be open, but to read the file itself by the same program.

    I need to open the file. programmefor the usera default in the operating system. In this case, the file D:/Scream297and396.jpg shall be opened in the screener with the pictures prescribed for *.jpg

    How do you do that?



  • I think you need something like that:

    ShellExecute(handle, "open", "D:\\Scream297and396.jpg", nullptr, nullptr, SW_SHOWNORMAL);
    

    Details of opportunities ShellExecute read it. https://msdn.microsoft.com/ru-ru/library/windows/desktop/bb762153(v=vs.85).aspx




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2