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"

To work on windows 98 to win7, preferably in VC6.

Thanks,
Hobnob