CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 1999
    Posts
    1

    Controlling programs with right mouse

    I want to open files with my application when rightclicking on the file in windows. Like winzip works (add x to x.zip). What do I need to do? Thanks Henrik


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: Controlling programs with right mouse

    create REG file that looks similar to the one below and run it via regedit or by double-clicking it in explorer:

    REGEDIT4

    ; This adds the ability to Right-Click on a .dll or .ocx
    ; and get the Register / UnRegister options.
    ;
    ; If it doesn't work for you, mail me and tell me about it.
    ; Jon Evans <[email protected]>

    ; ==========
    ; .DLL files
    ; ==========

    [HKEY_CLASSES_ROOT\.dll]
    "Content Type"="application/x-msdownload"
    @="dllfile"

    [HKEY_CLASSES_ROOT\dllfile]
    @="Application Extension"

    [HKEY_CLASSES_ROOT\dllfile\Shell\Register\command]
    @="regsvr32.exe \"%1\""

    [HKEY_CLASSES_ROOT\dllfile\Shell\UnRegister\command]
    @="regsvr32.exe /u \"%1\""


    The sample creates a new item in the contextmenu for DLLs and ocxs.
    Adapt it to your needs.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured