In stead of opening the program first and then selecting a file to open; how can I implement it in C++ so that I can right-click a file and choose "Open with.." => "program name" and the program loads it when it opens?