0

I'm working with a simple program that has to read data from a txt file and than display it. The thing is that i would like to read a specified extension files (for example .log) automatically.

So, i would like to do it as a simple Windows user - double click file and than the program opens. The problem is that this program is working but it's nor loading the file on start and tbh i have no idea if I should program it somehow? Any hints?

Thanks!

  • http://stackoverflow.com/questions/2681878/associate-file-extension-with-application – DLeh Mar 26 '14 at 15:03

2 Answers2

0

Sound like you want to associate file type with your application. This is done via windows registers. Try for example this article http://msdn.microsoft.com/en-us/library/windows/desktop/hh127451(v=vs.85).aspx

Ondrej Svejdar
  • 21,349
  • 5
  • 54
  • 89
0

The easiest way to make it load the file automatically is to allow it accept the file path as a parameter and then do a load operation. As for having your program open automatically when a user double clicks on that file type I would recommend checking out this CodeProject

Christopher B. Adkins
  • 3,499
  • 2
  • 26
  • 29