how to get file association of a file type for open and print
Scratching my head here trying to find out how best this is done, seen projects to setup an assocation but not to read the association from the registry, anyone have any simple code to get the file assocation for a file by using the file extension e.g. looking for something like this:-
CString fileAssoc = GetFileOpenAssocation("txt");
returns e.g. "NOTEPAD.EXE"
also for "print" assoaction e.g.
CString filePrintAssoc = GetFileOpenAssocation("pdf");
return's e.g. "AcroRd32.exe"
Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
Convenience and productivity tools for Microsoft Visual Studio: FeinViewer - an integrated GDI objects viewer for Visual C++ Debugger, and more...
Re: how to get file association of a file type for open and print
Sure that's better - worked on a more slick way without the lastest sdk libs and headers by calling the DLL shlwapi directly, this way is more OS platform friendly.
Bookmarks