public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Yaakov Selkowitz <yselkowi@redhat.com>
To: cygwin-apps@cygwin.com
Subject: [PATCH setup 1/3] propsheet: drop support for Common Controls v4
Date: Fri, 08 Jan 2016 20:33:00 -0000	[thread overview]
Message-ID: <1452285157-12712-2-git-send-email-yselkowi@redhat.com> (raw)
In-Reply-To: <1452285157-12712-1-git-send-email-yselkowi@redhat.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

  reply	other threads:[~2016-01-08 20:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-08 20:33 [PATCH setup 0/3] Drop Windows 9x-related code Yaakov Selkowitz
2016-01-08 20:33 ` Yaakov Selkowitz [this message]
2016-01-08 20:33 ` [PATCH setup 2/3] nio-ie5: drop unnecessary LoadLibrary call Yaakov Selkowitz
2016-01-08 20:33 ` [PATCH setup 3/3] Use Winsock 2 throughout Yaakov Selkowitz
2016-01-09 13:54 ` [PATCH setup 0/3] Drop Windows 9x-related code Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1452285157-12712-2-git-send-email-yselkowi@redhat.com \
    --to=yselkowi@redhat.com \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).