During the course of my education in programming, there has been one question that's been bugging me. How can you create a program with a function that will open a program from Windows explorer. I can open a file from within my program, but what I don't know how to do is make it so that when I assign a certain file type to open automatically with my program, to code a function that is run to open the file clicked on in the explorer. For example, Windows stores the fact that Microsoft Word is the default program for opening .doc files, but what I don't know is how to write the function that would register with Windows as the one for opening the file. If anyone could help me, it would be greatly appreciated.
rubiksnut 0
Newbie Poster
Recommended Answers
Jump to PostThe file type ascociation is handled by the OS, not the program.
What you must do is create your program with a bit of code that allows for the file path to be passed as an argument.
Then ascociate the compiled executable with the filetype you will be using.
think …
All 4 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.