Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

open a program with associated file programmatically

Posted on 2006-11-28
3
Medium Priority
?
762 Views
Last Modified: 2013-11-20
Hi Experts,

When in windows exlorer, double clicking on any file opens up the associated program by its extension.  Is there a windows API call that I can use that just takes a full path to a file to open up the correct program for me with the file?

Thanks!
Mike
0
Comment
Question by:thready
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 5

Expert Comment

by:Alkali_Guy
ID: 18032273
ShellExecute
0
 
LVL 5

Accepted Solution

by:
Alkali_Guy earned 2000 total points
ID: 18032303
You can do:

ShellExecute(NULL, "open", "Foofile.txt", NULL, NULL, SW_SHOW);
0
 
LVL 1

Author Comment

by:thready
ID: 18032340
Thank you very kindly!  :-)
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question