Ive got a small application which generates a textfile as a specific filetype. Im using wxWidgets 2.9.2 (Windows)
Is there a wxWidgets way to set my application as default for this filetype permanently?
i tried using wxMimeTypesManager with wxFileType and wxFileTypeInfo to set the default settings. But it doesnt really work.
The only thing which works, is to set the default filetype Icon.
Code: Select all
wxMimeTypesManager mgr;
wxFileType* pFileType = mgr.GetFileTypeFromExtension ("extension");
pFileType->SetDefaultIcon(icon.GetFullPath(),0);
mgr.Associate("extention");
which accured in an error / appcrash.
using the following
Code: Select all
static const wxFileTypeInfo fallbacks[] =
{
wxFileTypeInfo(wxT("extension"),
wxT("application.GetFullPath()"),
wxT("application.GetFullPath() -p %s"),
wxT("application info"),
wxT("extension"), wxNullPtr),
wxFileTypeInfo()
mgr.Associate(fallbacks);
};
Do i have to go thru the way to edit the registry?
With best regards.