Remove MSW code targeted at versions prior to WinXP.
In 3.1 WinXP is required so remove checks and code for prior versions.
This commit is contained in:
@@ -1679,15 +1679,6 @@ static bool wxCheckWin32Permission(const wxString& path, DWORD access)
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( wxGetOsVersion() == wxOS_WINDOWS_9X )
|
||||
{
|
||||
// FAT directories always allow all access, even if they have the
|
||||
// readonly flag set, and FAT files can only be read-only
|
||||
return (dwAttr & FILE_ATTRIBUTE_DIRECTORY) ||
|
||||
(access != GENERIC_WRITE ||
|
||||
!(dwAttr & FILE_ATTRIBUTE_READONLY));
|
||||
}
|
||||
|
||||
HANDLE h = ::CreateFile
|
||||
(
|
||||
path.t_str(),
|
||||
|
@@ -2606,13 +2606,6 @@ bool wxFileName::SetTimes(const wxDateTime *dtAccess,
|
||||
int flags;
|
||||
if ( IsDir() )
|
||||
{
|
||||
if ( wxGetOsVersion() == wxOS_WINDOWS_9X )
|
||||
{
|
||||
wxLogError(_("Setting directory access times is not supported "
|
||||
"under this OS version"));
|
||||
return false;
|
||||
}
|
||||
|
||||
path = GetPath();
|
||||
flags = FILE_FLAG_BACKUP_SEMANTICS;
|
||||
}
|
||||
|
@@ -300,19 +300,6 @@ bool wxPenRefData::Alloc()
|
||||
const COLORREF col = m_colour.GetPixel();
|
||||
|
||||
#ifdef wxHAVE_EXT_CREATE_PEN
|
||||
// Only NT can display dashed or dotted lines with width > 1
|
||||
static const int os = wxGetOsVersion();
|
||||
if ( os != wxOS_WINDOWS_NT &&
|
||||
(m_style == wxPENSTYLE_DOT ||
|
||||
m_style == wxPENSTYLE_LONG_DASH ||
|
||||
m_style == wxPENSTYLE_SHORT_DASH ||
|
||||
m_style == wxPENSTYLE_DOT_DASH ||
|
||||
m_style == wxPENSTYLE_USER_DASH) &&
|
||||
m_width > 1 )
|
||||
{
|
||||
m_width = 1;
|
||||
}
|
||||
|
||||
// check if it's a standard kind of pen which can be created with just
|
||||
// CreatePen()
|
||||
if ( m_join == wxJOIN_ROUND &&
|
||||
|
@@ -1341,15 +1341,7 @@ bool wxTopLevelWindowMSW::SetTransparent(wxByte alpha)
|
||||
|
||||
bool wxTopLevelWindowMSW::CanSetTransparent()
|
||||
{
|
||||
// The API is available on win2k and above
|
||||
|
||||
static int os_type = -1;
|
||||
static int ver_major = -1;
|
||||
|
||||
if (os_type == -1)
|
||||
os_type = ::wxGetOsVersion(&ver_major);
|
||||
|
||||
return (os_type == wxOS_WINDOWS_NT && ver_major >= 5);
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxTopLevelWindowMSW::DoFreeze()
|
||||
|
@@ -891,8 +891,6 @@ bool wxShutdown(int WXUNUSED_IN_WINCE(flags))
|
||||
#else
|
||||
bool bOK = true;
|
||||
|
||||
if ( wxGetOsVersion(NULL, NULL) == wxOS_WINDOWS_NT ) // if is NT or 2K
|
||||
{
|
||||
// Get a token for this process.
|
||||
HANDLE hToken;
|
||||
bOK = ::OpenProcessToken(GetCurrentProcess(),
|
||||
@@ -921,7 +919,6 @@ bool wxShutdown(int WXUNUSED_IN_WINCE(flags))
|
||||
|
||||
::CloseHandle(hToken);
|
||||
}
|
||||
}
|
||||
|
||||
if ( bOK )
|
||||
{
|
||||
|
@@ -761,8 +761,7 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler,
|
||||
DWORD dwFlags = CREATE_SUSPENDED;
|
||||
|
||||
#ifndef __WXWINCE__
|
||||
if ( (flags & wxEXEC_MAKE_GROUP_LEADER) &&
|
||||
(wxGetOsVersion() == wxOS_WINDOWS_NT) )
|
||||
if ( (flags & wxEXEC_MAKE_GROUP_LEADER) )
|
||||
dwFlags |= CREATE_NEW_PROCESS_GROUP;
|
||||
|
||||
dwFlags |= CREATE_DEFAULT_ERROR_MODE ;
|
||||
|
@@ -916,24 +916,11 @@ void wxWindowMSW::WarpPointer(int x, int y)
|
||||
}
|
||||
|
||||
void wxWindowMSW::MSWUpdateUIState(int action, int state)
|
||||
{
|
||||
// WM_CHANGEUISTATE only appeared in Windows 2000 so it can do us no good
|
||||
// to use it on older systems -- and could possibly do some harm
|
||||
static int s_needToUpdate = -1;
|
||||
if ( s_needToUpdate == -1 )
|
||||
{
|
||||
int verMaj, verMin;
|
||||
s_needToUpdate = wxGetOsVersion(&verMaj, &verMin) == wxOS_WINDOWS_NT &&
|
||||
verMaj >= 5;
|
||||
}
|
||||
|
||||
if ( s_needToUpdate )
|
||||
{
|
||||
// we send WM_CHANGEUISTATE so if nothing needs changing then the system
|
||||
// won't send WM_UPDATEUISTATE
|
||||
::SendMessage(GetHwnd(), WM_CHANGEUISTATE, MAKEWPARAM(action, state), 0);
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// scrolling stuff
|
||||
|
Reference in New Issue
Block a user