Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opening a picture

Status
Not open for further replies.

Oolong

Programmer
Apr 10, 2002
13
0
0
US
How do you open a picture in C++. All I need is to have it find the picture in its directory and just have it pop up.
 
For a Windows-based program, I use ShellExecute() with "open" as the verb.
 
I used ShellExecute() with open as the verb, but I get three errors. The errors are that it says undeclared identifiers. Are there any header files that I have to #include or is there something else?
 
Yes, I forgot to mention that.

#include <shlwapi.h> (I think that's the one)
 
Nope, I got the header wrong. Instead:

#include <shellapi.h>
 
And make sure you link to shell32.lib, I don't think VC++ links to that one by default.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top