From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61976 invoked by alias); 8 Jan 2016 20:33:14 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 61822 invoked by uid 89); 8 Jan 2016 20:33:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.3 required=5.0 tests=AWL,BAYES_20,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Style, 55, sk:yselkow, 5.5 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 08 Jan 2016 20:33:10 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 6E53CC0B591D for ; Fri, 8 Jan 2016 20:33:09 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-42.rdu2.redhat.com [10.10.116.42]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u08KX7PB002874 (version=TLSv1/SSLv3 cipher=AES256-SHA256 bits=256 verify=NO) for ; Fri, 8 Jan 2016 15:33:09 -0500 From: Yaakov Selkowitz 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 Message-Id: <1452285157-12712-2-git-send-email-yselkowi@redhat.com> In-Reply-To: <1452285157-12712-1-git-send-email-yselkowi@redhat.com> References: <1452285157-12712-1-git-send-email-yselkowi@redhat.com> X-SW-Source: 2016-01/txt/msg00008.txt.bz2 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 --- 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 . */ -#define _WIN32_IE 0x0300 - #include /* FIXME: The use of _access(fname, 0) as an existence check should be -- 2.6.2