Thread: c++ program autosave web page

  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    3

    c++ program autosave web page

    Does anyone know how to automatically save a web page to disk? I want my program to do the equivalent of file, save page as, web page complete, save. Is this possible in c++ ? I would think it would be in visual c++ because windows components are supposed to be in that software. Anyone have any ideas? I would prefer to do it c++ or c.

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Of course it's possible. Doing it is another thing, however.
    Basically, just grab whatever contents is in the file and save it.
    If you want to use it completely offline, you will have to grab whatever images or embedded media or such things it refers to.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User
    Join Date
    Nov 2008
    Posts
    3
    I found this link on google and it vaguely describes how to do it visual c++, can anyone expand on what they are saying ? http://support.microsoft.com/kb/292485

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Well, it's COM.
    It's quite simple.
    First you create an IWebBrowser2 interface, then query the IHTMLDocument2 interface and after that query the IPersistFile interface. After that you call the save method to save the file to disk.

    This probably means nothing to you, so I would suggest you read up a little on how COM works. Then it should be easy as pie.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #5
    Registered User
    Join Date
    Nov 2008
    Posts
    3
    can you give me a good reference to COM

  6. #6
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Nay, I cannot. I don't know of one.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 12:27 PM
  2. How can I incorporate this code into a web page?
    By MisterRob in forum C Programming
    Replies: 6
    Last Post: 11-02-2005, 05:43 PM
  3. Trying to capture POST method from Web Page
    By nice_guy_mel in forum Networking/Device Communication
    Replies: 8
    Last Post: 04-01-2005, 06:57 AM