#if wxUSE_MIMETYPE
-// Doesn't compile in WIN16 mode
-#ifndef __WIN16__
-
#ifndef WX_PRECOMP
#include "wx/string.h"
#if wxUSE_GUI
strKey << wxT("\\shell\\") << verb;
wxRegKey key(wxRegKey::HKCR, strKey + _T("\\command"));
wxString command;
- if ( key.Open() ) {
+ if ( key.Open(wxRegKey::Read) ) {
// it's the default value of the key
if ( key.QueryValue(wxEmptyString, command) ) {
bool foundFilename = CanonicalizeParams(command);
// (and not just launch it)
strKey += _T("\\DDEExec");
wxRegKey keyDDE(wxRegKey::HKCR, strKey);
- if ( keyDDE.Open() ) {
+ if ( keyDDE.Open(wxRegKey::Read) ) {
wxString ddeCommand, ddeServer, ddeTopic;
keyDDE.QueryValue(wxEmptyString, ddeCommand);
ddeCommand.Replace(_T("%1"), _T("%s"));
wxLogNull nolog;
wxRegKey key(wxRegKey::HKCR, m_ext);
- return key.Open() && key.QueryValue(wxT("Content Type"), *mimeType);
+ return key.Open(wxRegKey::Read) &&
+ key.QueryValue(wxT("Content Type"), *mimeType);
}
bool wxFileTypeImpl::GetMimeTypes(wxArrayString& mimeTypes) const
wxLogNull nolog;
wxRegKey key(wxRegKey::HKCR, strIconKey);
- if ( key.Open() ) {
+ if ( key.Open(wxRegKey::Read) ) {
wxString strIcon;
// it's the default value of the key
if ( key.QueryValue(wxEmptyString, strIcon) ) {
wxLogNull nolog;
wxRegKey key(wxRegKey::HKCR, m_strFileType);
- if ( key.Open() ) {
+ if ( key.Open(wxRegKey::Read) ) {
// it's the default value of the key
if ( key.QueryValue(wxEmptyString, *desc) ) {
return TRUE;
wxString strFileType;
wxRegKey key(wxRegKey::HKCR, str);
- if ( key.Open() ) {
+ if ( key.Open(wxRegKey::Read) ) {
// it's the default value of the key
if ( key.QueryValue(wxEmptyString, strFileType) ) {
// create the new wxFileType object
wxString ext;
wxRegKey key(wxRegKey::HKCR, strKey);
- if ( key.Open() ) {
+ if ( key.Open(wxRegKey::Read) ) {
if ( key.QueryValue(wxT("Extension"), ext) ) {
return GetFileTypeFromExtension(ext);
}
return !rkey.Exists() || rkey.DeleteSelf();
}
-#endif
- // __WIN16__
-
#endif // wxUSE_MIMETYPE