I made a small video player and I want my video player to be the default program for opening video files.
Does the video file's name become the argument(char** argv) to my program? (Windows)
Jump to content
Posted 06 January 2013 - 01:08 PM
You would have to modify the registry to have it open with your program. You can do this yourself on your own machine you will need to create an installer program of some sort to do it on other people's machines (and in most cases may need to run the installer as admin to write to the correct registry locations.). When you create the registry entries you can set what arguments it will send to your program, I think the default setup if you just right click, open with your program would be the same as calling "C:\full\path\to\myprogram.exe C;\full\path\to\video.mpg" or whatever the case may be from the console (dos) window.
Digivance Game Studios Founder:
Dan Mayor - Dan@Digivance.com
Posted 06 January 2013 - 02:02 PM
Right click on a video file, hover over open with, choose your programs execution file, and check "Make this your default program". No need for registry editing !
Posted 06 January 2013 - 10:52 PM
Does the video file's name become the argument(char** argv) to my program? (Windows)If you compiled as a console program then your main function's prototype should be something like:
Posted 06 January 2013 - 11:49 PM
Create a batch file and write code like this
[Write all the extensions that your software supports
type YourVPlayer=[Your software exe file path]
save as anyname.bat
You can use in you vedio player setup file or SFX file and run it automatically after installation
I think usefull.