Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine file association options?
Message
From
14/11/2001 05:16:49
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
13/11/2001 17:44:55
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00581203
Message ID:
00581378
Views:
25
This message has been marked as the solution to the initial question of the thread.
>When you right click on a file in Explorer, Explorer presents you with a list of options dependent on the file extension of the file you clicked on. For example, clicking on a Word document will typically show the following options at the top of the right click menu (this list will be be dependent on the OS and applications installed on one's workstation)
>
>Open
>New
>Print
>Open With
>etc.
>
>Is there a way to determine which options (Open, New, Print ...) are associated with a particular file extension so we could provide users with a similar list of options if they right click on a file within our application? Or is there a way to 'summon' the Explorer equivalent of this right click menu via Windows API voodoo?
>
>For anyone following this thread, Daniel Gramunt was gracious enough to explain how to verify that a valid application is associated with a specific file extension - see thread 581172 for Dan's help (Thanks!)

Malcolm,
In solution app there is a sample code for file associations. It basically shows how to open and read a reg key. From extension if you read class, under HKCR you can find that class and under it Shell key has 'open', 'print' etc supported items.
Now for 'Open with' I don't think you could do it in any OS. It's new to w2000 AFAIK. Registries of w9x and w2K are different and I don't think this key exists in w9x :
HKCU\Sofware\Microsoft\windows\currentversion\explorer\FileExts

Under this key there is a list for each extension. ie: .csv and under it 'OpenWithList'.

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform