Application Recognizing Registered File Double Clicked - Programmer

This is a discussion on Application Recognizing Registered File Double Clicked - Programmer ; Hi Everyone, First I hope I am posting this is the correct group, if I'm not I apologize for any inconvenience and hope someone can point me in the right direction. What I have is a file extension which has ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Application Recognizing Registered File Double Clicked

  1. Application Recognizing Registered File Double Clicked

    Hi Everyone,


    First I hope I am posting this is the correct group, if I'm not I
    apologize for any inconvenience and hope someone can point me in the
    right direction.

    What I have is a file extension which has been registered in the
    Registry, and when I double click the file with that particular
    extension my application is started. This part is working fine,
    however, there are 2 important pieces of data that I need from the
    file double clicked. Right my application is started, then the user
    needs to go to file open and select the file. Is there a way for my
    application to recognize that a file with a registered extension has
    been double clicked? Also, if this is possible, is the file and path
    that was double clicked sent to my application?

    If this doesn't make any sense please post any questions and I will
    try to elaborate as best I can on what I am trying to ask above.
    Thanks everyone and any response is greatly appreciated!


    Regards,


    CLR

  2. Re: Application Recognizing Registered File Double Clicked

    I forgot to add that I am using Borland C++ v6.0...

    Thanks!

    chris@dagran.com (Chris) wrote in message news:<736fadb1.0310160820.574b7a5a@posting.google.com>...
    > Hi Everyone,
    >
    >
    > First I hope I am posting this is the correct group, if I'm not I
    > apologize for any inconvenience and hope someone can point me in the
    > right direction.
    >
    > What I have is a file extension which has been registered in the
    > Registry, and when I double click the file with that particular
    > extension my application is started. This part is working fine,
    > however, there are 2 important pieces of data that I need from the
    > file double clicked. Right my application is started, then the user
    > needs to go to file open and select the file. Is there a way for my
    > application to recognize that a file with a registered extension has
    > been double clicked? Also, if this is possible, is the file and path
    > that was double clicked sent to my application?
    >
    > If this doesn't make any sense please post any questions and I will
    > try to elaborate as best I can on what I am trying to ask above.
    > Thanks everyone and any response is greatly appreciated!
    >
    >
    > Regards,
    >
    >
    > CLR


  3. Re: Application Recognizing Registered File Double Clicked

    On 16 Oct 2003 09:20:07 -0700, chris@dagran.com (Chris) wrote:
    >Also, if this is possible, is the file and path
    >that was double clicked sent to my application?


    http://msdn.microsoft.com/library/en...s/fa_verbs.asp

    (sorry that's a really long URL. Or you can google for "Verbs and
    File Associations".)

    Use %1 to specify where the filename should go.

  4. Re: Application Recognizing Registered File Double Clicked

    Chris wrote:
    > What I have is a file extension which has been registered in the
    > Registry, and when I double click the file with that particular
    > extension my application is started. This part is working fine,
    > however, there are 2 important pieces of data that I need from the
    > file double clicked. Right my application is started, then the user
    > needs to go to file open and select the file. Is there a way for my
    > application to recognize that a file with a registered extension has
    > been double clicked? Also, if this is possible, is the file and path
    > that was double clicked sent to my application?


    You can add "%1" at the end of the shell open command of your registered
    extension. This will make your program start with the full name and path
    of the file double-clicked at its command line. You can get the command
    line from WinMain's parameter, or use GetCommandLine() later.

    For example:

    HKCR\YourFileClass\shell\open\command
    @="C:\...\YourProgram.exe" %1

    Note, however, that this will cause your application to start a new
    instance for every file clicked. If you want all files to be opened on
    the same window (e.g. an MDI interface), you either have to use DDE or
    some sort of IPC to inform the previous instance of the new file.


  5. Re: Application Recognizing Registered File Double Clicked

    On Fri, 17 Oct 2003 02:47:07 +0300, "Elias Fotinis"
    wrote:
    >For example:
    >
    > HKCR\YourFileClass\shell\open\command
    > @="C:\...\YourProgram.exe" %1


    You probably should put quotation marks around the "%1" so your
    program will handle files which have spaces in the name.


  6. Re: Application Recognizing Registered File Double Clicked

    Thanks Everyone! I have my program doing exactly what I want!

    Regards!

    chris@dagran.com (Chris) wrote in message news:<736fadb1.0310160820.574b7a5a@posting.google.com>...
    > Hi Everyone,
    >
    >
    > First I hope I am posting this is the correct group, if I'm not I
    > apologize for any inconvenience and hope someone can point me in the
    > right direction.
    >
    > What I have is a file extension which has been registered in the
    > Registry, and when I double click the file with that particular
    > extension my application is started. This part is working fine,
    > however, there are 2 important pieces of data that I need from the
    > file double clicked. Right my application is started, then the user
    > needs to go to file open and select the file. Is there a way for my
    > application to recognize that a file with a registered extension has
    > been double clicked? Also, if this is possible, is the file and path
    > that was double clicked sent to my application?
    >
    > If this doesn't make any sense please post any questions and I will
    > try to elaborate as best I can on what I am trying to ask above.
    > Thanks everyone and any response is greatly appreciated!
    >
    >
    > Regards,
    >
    >
    > CLR


+ Reply to Thread