OS question

  • Thread starter ramollari
  • Start date
  • #1
437
1
Modern operating systems are file oriented, so in Windows you can access documents just by double clicking them without having to worry about opening the program. But I don't know how this is achieved. Is is done entirely by the OS or does the application program itself play a role? So suppose I want to develop a simple text editor that reads .txt files. Then if I specify that a .txt file be opened with that editor, will the latter be able automatically to deal with this request, or do I have to write special code for it?
 

Answers and Replies

  • #2
223
0
What do you mean by "OS" there are different layers of the OS, opening a file via the GUI uses a few... Anyway I think your assumtion is correct, as long as you associated your program with the .txt files within the OS then every time you open an .txt file your application or .exe will open it
 
  • #3
591
0
You don't have to write any code to get Windows to run your program for .txt files, just set the file association. But all Windows does is run your program with the .txt filename as a command-line parameter. You still have to open the file yourself.
 

Related Threads on OS question

  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
12
Views
3K
P
  • Poll
  • Last Post
2
Replies
41
Views
5K
  • Last Post
Replies
21
Views
4K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
3
Views
4K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
13
Views
3K
  • Poll
  • Last Post
Replies
7
Views
2K
N
Top