Open jpg file using shellexecute

I'm working on a deck shuffler. As a card is drawn the jpg file will be opened in a new window. I'm trying to use ShellExecuteA. My code compiles but the file does not open. The path is correct. I'm not sure what is wrong. I don't have a lot of experience with ShellExecute. draw is an int. The file name is Mythos-1, Mythos-23, ect. Any suggestions? Thanks!

std:string file = "C:\\Arkham Horror\Mythos\Deck\Mythos-"+draw;
ShellExecuteA(0,"open", file.c_str(), NULL, NULL, SW_NORMAL);
Last edited on
Topic archived. No new replies allowed.