This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
[PATCH setup 1/3] propsheet: drop support for Common Controls v4
- From: Yaakov Selkowitz <yselkowi at redhat dot com>
- To: cygwin-apps at cygwin dot com
- Date: Fri, 8 Jan 2016 14:32:35 -0600
- Subject: [PATCH setup 1/3] propsheet: drop support for Common Controls v4
- Authentication-results: sourceware.org; auth=none
- References: <1452285157-12712-1-git-send-email-yselkowi at redhat dot com>
This test was only needed for Windows 9x, as Windows 2000 shipped with
Internet Explorer 5.01 and Windows ME shipped with 5.5:
https://msdn.microsoft.com/en-us/library/windows/desktop/hh298349.aspx
* propsheet.cc (GetPROPSHEETHEADERSize): Remove.
(PropSheet::Create): Use sizeof (PROPSHEETHEADER) unconditionally.
* win32.h (_WIN32_IE): Remove.
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
---
propsheet.cc | 45 +--------------------------------------------
win32.h | 4 ----
2 files changed, 1 insertion(+), 48 deletions(-)
diff --git a/propsheet.cc b/propsheet.cc
index 976aefb..016f9d3 100644
--- a/propsheet.cc
+++ b/propsheet.cc
@@ -294,49 +294,6 @@ PropSheetProc (HWND hwndDlg, UINT uMsg, LPARAM lParam)
return TRUE;
}
-static DWORD
-GetPROPSHEETHEADERSize ()
-{
- // For compatibility with all versions of comctl32.dll, we have to do this.
-
- DLLVERSIONINFO vi;
- HMODULE mod;
- DLLGETVERSIONPROC DllGetVersion;
- DWORD retval = 0;
-
-
- // This 'isn't safe' in a DLL, according to MSDN
- mod = LoadLibrary ("comctl32.dll");
-
- DllGetVersion = (DLLGETVERSIONPROC) GetProcAddress (mod, "DllGetVersion");
- if (DllGetVersion == NULL)
- {
- // Something's wildly broken, punt.
- retval = PROPSHEETHEADER_V1_SIZE;
- }
- else
- {
- vi.cbSize = sizeof (DLLVERSIONINFO);
- DllGetVersion (&vi);
-
- if ((vi.dwMajorVersion < 4) ||
- ((vi.dwMajorVersion == 4) && (vi.dwMinorVersion < 71)))
- {
- // Recent.
- retval = sizeof (PROPSHEETHEADER);
- }
- else
- {
- // Old (== Win95/NT4 w/o IE 4 or better)
- retval = PROPSHEETHEADER_V1_SIZE;
- }
- }
-
- FreeLibrary (mod);
-
- return retval;
-}
-
bool
PropSheet::Create (const Window * Parent, DWORD Style)
{
@@ -344,7 +301,7 @@ PropSheet::Create (const Window * Parent, DWORD Style)
PageHandles = CreatePages ();
- p.dwSize = GetPROPSHEETHEADERSize ();
+ p.dwSize = sizeof (PROPSHEETHEADER);
p.dwFlags = PSH_NOAPPLYNOW | PSH_WIZARD | PSH_USECALLBACK
/*| PSH_MODELESS */ | PSH_USEICONID;
if (Parent != NULL)
diff --git a/win32.h b/win32.h
index d271748..a6b3316 100644
--- a/win32.h
+++ b/win32.h
@@ -49,10 +49,6 @@
#define DECLSPEC_IMPORT
#define WINBASEAPI
-/* Require at least Internet Explorer 3, in order to have access to
- * sufficient Windows Common Controls features from <commctrl.h> . */
-#define _WIN32_IE 0x0300
-
#include <windows.h>
/* FIXME: The use of _access(fname, 0) as an existence check should be
--
2.6.2