|
From: Keith M. <no...@so...> - 2016-11-26 22:37:52
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-org-wsl".
The branch, 5.0-active has been updated
via d03bac43951c5b26c4e7a4db2b9362ec9f65f653 (commit)
via 8d57d999b93b2bc755e94ca9841a3536cfc86aa6 (commit)
from ae89720834d70256a18af17ca64ff49892431c63 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sf.net/p/mingw/mingw-org-wsl/ci/d03bac43951c5b26c4e7a4db2b9362ec9f65f653/
commit d03bac43951c5b26c4e7a4db2b9362ec9f65f653
Author: Keith Marshall <kei...@us...>
Date: Sat Nov 26 22:35:10 2016 +0000
Deprecate obsolete <winable.h> and <pbt.h> headers.
diff --git a/w32api/ChangeLog b/w32api/ChangeLog
index bae99c6..8313972 100644
--- a/w32api/ChangeLog
+++ b/w32api/ChangeLog
@@ -1,3 +1,17 @@
+2016-11-26 Keith Marshall <kei...@us...>
+
+ Deprecate obsolete <winable.h> and <pbt.h> headers.
+
+ * Makefile.in (%.h.in): Generalize vpath definition.
+ (obsolete_headers, obsolete_header_script, w32api_dist_headers)
+ (w32api_generated_headers, replace_headers, macro_name): New macros.
+ (install-w32api-headers): Add dependency on w32api_dist_headers.
+ (%.h): New static pattern rule; it generates generic dependants of...
+ * include/obsolete.h.in: ...this new template for obsolete headers.
+
+ * include/winable.h include/pbt.h: Delete them; they are obsolete;
+ replace them by install-time generated generic stubs.
+
2016-11-25 Keith Marshall <kei...@us...>
Update <winuser.h> and <dbt.h>; fix issue [#2317].
diff --git a/w32api/Makefile.in b/w32api/Makefile.in
index 97d28b1..da832cc 100644
--- a/w32api/Makefile.in
+++ b/w32api/Makefile.in
@@ -120,8 +120,7 @@ ${top_srcdir}/%: ${top_srcdir}/../%
# Propagate package version, as configured, consistently throughout
# the package build.
#
-vpath w32api.h.in ${top_srcdir}/include
-vpath _mingw.h.in ${mingwrt_srcdir}/include
+vpath %.h.in ${top_srcdir}/include ${mingwrt_srcdir}/include
w32api.h _mingw.h: configure.ac
@@ -264,8 +263,28 @@ w32api-include-dirs: includedir
w32api-lib-dirs: libdir
install-headers: install-w32api-headers
-install-w32api-headers: w32api.h w32api-include-dirs
- $(call INSTALL_DATA,w32api.h ${srcdir}/include/*.h,${includedir})
+
+obsolete_headers := winable.h pbt.h
+winable.h pbt.h: replacement = winuser.h
+
+$(obsolete_headers): %.h: obsolete.h.in
+ $(if $(subst ./,,$(dir $@)),mkdir -p $(@D))
+ $(obsolete_header_script) $< > $@
+
+obsolete_header_script = sed -e 's,%HEADER%,$@,' \
+ -e "s,%PACKAGE%,$(call macro_name,$(PACKAGE_TARNAME))," \
+ -e 's,<REPLACEMENT>,$(call replace_header,$(replacement)),' \
+ -e "s,%GUARD_MACRO%,$(call macro_name,$@)," \
+ -e 's,%REPLACEMENT%,$(replacement),'
+
+replace_header = $(if $(subst ./,,$(dir $1)),<$1>,"$1")
+macro_name = `echo $1 | tr .a-z- _A-Z_`
+
+w32api_generated_headers := w32api.h $(obsolete_headers)
+w32api_dist_headers := $(w32api_generated_headers) ${srcdir}/include/*.h
+
+install-w32api-headers: $(w32api_dist_headers) w32api-include-dirs
+ $(call INSTALL_DATA,$(w32api_dist_headers),${includedir})
for dir in $(w32api_extra_include_dirs); do \
$(call INSTALL_DATA,${srcdir}/include/$$dir/*.h,${includedir}); \
done
diff --git a/w32api/include/obsolete.h.in b/w32api/include/obsolete.h.in
new file mode 100644
index 0000000..a69b561
--- /dev/null
+++ b/w32api/include/obsolete.h.in
@@ -0,0 +1,50 @@
+/*
+ * %HEADER%
+ *
+ * Obsolete header replaced by <%REPLACEMENT%>; this stub is retained for
+ * backward compatibility only.
+ *
+ * $Id$
+ *
+ * Written by Keith Marshall <kei...@us...>
+ * Copyright (C) 2016, MinGW.org Project
+ *
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice, this permission notice, and the following
+ * disclaimer shall be included in all copies or substantial portions of
+ * the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+#ifndef _%GUARD_MACRO%
+#pragma GCC system_header
+#define _%GUARD_MACRO%
+
+/* Header <%HEADER%> is obsolete, and we would like to advise the user to
+ * use <%REPLACEMENT%> instead; however...
+ */
+#ifndef __IN_%PACKAGE%_TESTSUITE__
+/* ...this warning may interfere with any testsuite results, so display it
+ * only in normal use, (i.e. suppress it when running the testsuite)...
+ */
+#warning "<%HEADER%> is obsolete; please use <%REPLACEMENT%> instead."
+#endif
+/* ...always including the appropriate replacement header, regardless.
+ */
+#include <REPLACEMENT>
+
+#endif /* !_%GUARD_MACRO%: $RCSfile$: end of file */
diff --git a/w32api/include/pbt.h b/w32api/include/pbt.h
deleted file mode 100644
index 21cb1cd..0000000
--- a/w32api/include/pbt.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef _PBT_H
-#define _PBT_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-/* Also in winuser.h */
-#define PBT_APMQUERYSUSPEND 0
-#define PBT_APMQUERYSTANDBY 1
-#define PBT_APMQUERYSUSPENDFAILED 2
-#define PBT_APMQUERYSTANDBYFAILED 3
-#define PBT_APMSUSPEND 4
-#define PBT_APMSTANDBY 5
-#define PBT_APMRESUMECRITICAL 6
-#define PBT_APMRESUMESUSPEND 7
-#define PBT_APMRESUMESTANDBY 8
-#define PBT_APMBATTERYLOW 9
-#define PBT_APMPOWERSTATUSCHANGE 10
-#define PBT_APMOEMEVENT 11
-#define PBT_APMRESUMEAUTOMATIC 18
-
-#define PBTF_APMRESUMEFROMFAILURE 1
-
-#endif
diff --git a/w32api/include/winable.h b/w32api/include/winable.h
deleted file mode 100644
index 0228293..0000000
--- a/w32api/include/winable.h
+++ /dev/null
@@ -1,99 +0,0 @@
-#ifndef _WINABLE_H
-#define _WINABLE_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if (_WIN32_WINNT < 0x0403)
-#define INPUT_MOUSE 0x00000000
-#define INPUT_KEYBOARD 0x00000001
-#define INPUT_HARDWARE 0x00000002
-#endif /* (_WIN32_WINNT < 0x04030) */
-#if (WINVER < 0x0500)
-#define CHILDID_SELF 0
-#define OBJID_WINDOW 0x00000000
-#define OBJID_SYSMENU 0xFFFFFFFF
-#define OBJID_TITLEBAR 0xFFFFFFFE
-#define OBJID_MENU 0xFFFFFFFD
-#define OBJID_CLIENT 0xFFFFFFFC
-#define OBJID_VSCROLL 0xFFFFFFFB
-#define OBJID_HSCROLL 0xFFFFFFFA
-#define OBJID_SIZEGRIP 0xFFFFFFF9
-#define OBJID_CARET 0xFFFFFFF8
-#define OBJID_CURSOR 0xFFFFFFF7
-#define OBJID_ALERT 0xFFFFFFF6
-#define OBJID_SOUND 0xFFFFFFF5
-#define GUI_CARETBLINKING 0x00000001
-#define GUI_INMOVESIZE 0x00000002
-#define GUI_INMENUMODE 0x00000004
-#define GUI_SYSTEMMENUMODE 0x00000008
-#define GUI_POPUPMENUMODE 0x00000010
-#define WINEVENT_OUTOFCONTEXT 0x0000
-#define WINEVENT_SKIPOWNTHREAD 0x0001
-#define WINEVENT_SKIPOWNPROCESS 0x0002
-#define WINEVENT_INCONTEXT 0x0004
-#endif /* (WINVER < 0x0500) */
-#if (_WIN32_WINNT < 0x0403)
-typedef struct tagMOUSEINPUT {
- LONG dx;
- LONG dy;
- DWORD mouseData;
- DWORD dwFlags;
- DWORD time;
- ULONG_PTR dwExtraInfo;
-} MOUSEINPUT,*PMOUSEINPUT;
-typedef struct tagKEYBDINPUT {
- WORD wVk;
- WORD wScan;
- DWORD dwFlags;
- DWORD time;
- ULONG_PTR dwExtraInfo;
-} KEYBDINPUT,*PKEYBDINPUT;
-typedef struct tagHARDWAREINPUT {
- DWORD uMsg;
- WORD wParamL;
- WORD wParamH;
-} HARDWAREINPUT,*PHARDWAREINPUT;
-typedef struct tagINPUT {
- DWORD type;
- _ANONYMOUS_UNION union {
- MOUSEINPUT mi;
- KEYBDINPUT ki;
- HARDWAREINPUT hi;
- } DUMMYUNIONNAME;
-} INPUT,*PINPUT,*LPINPUT;
-#endif /* (_WIN32_WINNT < 0x0403) */
-#if (WINVER < 0x0500)
-typedef VOID (*WINEVENTPROC)(HWINEVENTHOOK,DWORD,HWND,LONG,LONG,DWORD,DWORD);
-typedef struct tagGUITHREADINFO {
- DWORD cbSize;
- DWORD flags;
- HWND hwndActive;
- HWND hwndFocus;
- HWND hwndCapture;
- HWND hwndMenuOwner;
- HWND hwndMoveSize;
- HWND hwndCaret;
- RECT rcCaret;
-} GUITHREADINFO,*PGUITHREADINFO,*LPGUITHREADINFO;
-#endif /* (WINVER < 0x0500) */
-
-BOOL WINAPI BlockInput(BOOL);
-#if (_WIN32_WINNT < 0x0403)
-UINT WINAPI SendInput(UINT,LPINPUT,int);
-#endif
-#if (WINVER < 0x0500)
-BOOL WINAPI GetGUIThreadInfo(DWORD,LPGUITHREADINFO);
-void WINAPI NotifyWinEvent(DWORD,HWND,LONG,LONG);
-HWINEVENTHOOK WINAPI SetWinEventHook(UINT,UINT,HMODULE,WINEVENTPROC,DWORD,DWORD,UINT);
-BOOL WINAPI UnhookWinEvent(HWINEVENTHOOK);
-#endif /* (WINVER < 0x0500) */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
https://sf.net/p/mingw/mingw-org-wsl/ci/8d57d999b93b2bc755e94ca9841a3536cfc86aa6/
commit 8d57d999b93b2bc755e94ca9841a3536cfc86aa6
Author: Keith Marshall <kei...@us...>
Date: Fri Nov 25 21:29:02 2016 +0000
Update <winuser.h> and <dbt.h>; fix issue [#2317].
diff --git a/w32api/ChangeLog b/w32api/ChangeLog
index e599aa4..bae99c6 100644
--- a/w32api/ChangeLog
+++ b/w32api/ChangeLog
@@ -1,3 +1,41 @@
+2016-11-25 Keith Marshall <kei...@us...>
+
+ Update <winuser.h> and <dbt.h>; fix issue [#2317].
+
+ * include/winuser.h: Tidy layout; add copyright notice.
+ [WINVER, _WIN32_WINDOWS, _WIN32_WINNT]: Compare them symbolically.
+ (__WINUSER_H_SOURCED__): New internal macro; define it, to facilitate
+ selective inclusion of content from other headers; delete when done.
+ (BSM_ALLCOMPONENTS, BSF_ALLOWSFW, BSM_APPLICATIONS, BSM_ALLDESKTOPS)
+ (BSM_INSTALLABLEDRIVERS, BSM_NETDRIVER, BSM_VXDS, BSF_FLUSHDISK)
+ (BSF_FORCEIFHUNG, BSF_IGNORECURRENTTASK, BSF_LUID, BSF_NOHANG)
+ (BSF_NOTIMEOUTIFNOTHUNG, BSF_POSTMESSAGE, BSF_QUERY, BSF_RETURNHDESK)
+ (BSF_SENDNOTIFYMESSAGE): Delete; do not define them locally; retrieve
+ them selectively from <dbt.h>, where they are properly defined.
+ [WINVER >= WIN2K/WIN98] (BlockInput): Add missing declaration.
+ (KillTimer, TIMERPROC): Declare timer event parameters as UINT_PTR;
+ formerly UINT, which doesn't match 64-bit size required for Win64.
+ (SetTimer): Likewise; also declare similar return type.
+ (WINEVENTPROC): Add missing CALLBACK attribute.
+ (_BEGIN_C_DECLS, _END_C_DECLS): Use them.
+
+ * include/w32api.h (__AW_ALIAS__): New macro; define it.
+ * include/sdkddkver.h (_WIN32_WINNT_NT4SP3): New macro; define it.
+
+ * include/dbt.h: Tidy layout; add copyright notice.
+ (_BEGIN_C_DECLS, _END_C_DECLS): Also prefer them here.
+ [__WINUSER_H_SOURCED__] (_DBT_H): Do not define; expose only...
+ (BSM_ALLCOMPONENTS, BSF_ALLOWSFW, BSM_APPLICATIONS, BSM_ALLDESKTOPS)
+ (BSM_INSTALLABLEDRIVERS, BSM_NETDRIVER, BSM_VXDS, BSF_FLUSHDISK)
+ (BSF_FORCEIFHUNG, BSF_IGNORECURRENTTASK, BSF_LUID, BSF_NOHANG)
+ (BSF_NOTIMEOUTIFNOTHUNG, BSF_POSTMESSAGE, BSF_QUERY, BSF_RETURNHDESK)
+ (BSF_SENDNOTIFYMESSAGE): ...these, to be duplicated in <winuser.h>
+ (__AW_ALIAS__): Use it to define ANSI/UNICODE specific aliases for...
+ (DEV_BROADCAST_PORT, DEV_BROADCAST_DEVICEINTERFACE): ...these generic
+ structure typedef names, and their respectively corresponding...
+ (PDEV_BROADCAST_PORT, PDEV_BROADCAST_DEVICEINTERFACE): ...pointer
+ type names.
+
2016-09-17 Keith Marshall <kei...@us...>
Fix a minor ISO-C++11 conformity issue.
diff --git a/w32api/include/dbt.h b/w32api/include/dbt.h
index 69c15af..0e6e3d6 100644
--- a/w32api/include/dbt.h
+++ b/w32api/include/dbt.h
@@ -1,154 +1,211 @@
+/*
+ * dbt.h
+ *
+ * Device management API manifest constants and type definitions.
+ *
+ * $Id$
+ *
+ * Written by Anders Norlander <ano...@he...>
+ * Copyright (C) 1998, 1999, 2002-2004, 2016, MinGW.org Project
+ *
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
#ifndef _DBT_H
-#define _DBT_H
-#if __GNUC__ >=3
#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define DBT_NO_DISK_SPACE 0x47
-#define DBT_CONFIGMGPRIVATE 0x7FFF
-#define DBT_DEVICEARRIVAL 0x8000
-#define DBT_DEVICEQUERYREMOVE 0x8001
-#define DBT_DEVICEQUERYREMOVEFAILED 0x8002
-#define DBT_DEVICEREMOVEPENDING 0x8003
-#define DBT_DEVICEREMOVECOMPLETE 0x8004
-#define DBT_DEVICETYPESPECIFIC 0x8005
-#define DBT_DEVTYP_OEM 0
-#define DBT_DEVTYP_DEVNODE 1
-#define DBT_DEVTYP_VOLUME 2
-#define DBT_DEVTYP_PORT 3
-#define DBT_DEVTYP_NET 4
-#if (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500)
-#define DBT_DEVTYP_DEVICEINTERFACE 5
-#define DBT_DEVTYP_HANDLE 6
-#endif /* (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500) */
-#define DBT_APPYBEGIN 0
-#define DBT_APPYEND 1
-#define DBT_DEVNODES_CHANGED 7
-#define DBT_QUERYCHANGECONFIG 0x17
-#define DBT_CONFIGCHANGED 0x18
-#define DBT_CONFIGCHANGECANCELED 0x19
-#define DBT_MONITORCHANGE 0x1B
-#define DBT_SHELLLOGGEDON 32
-#define DBT_CONFIGMGAPI32 34
-#define DBT_VXDINITCOMPLETE 35
-#define DBT_VOLLOCKQUERYLOCK 0x8041
-#define DBT_VOLLOCKLOCKTAKEN 0x8042
-#define DBT_VOLLOCKLOCKFAILED 0x8043
-#define DBT_VOLLOCKQUERYUNLOCK 0x8044
-#define DBT_VOLLOCKLOCKRELEASED 0x8045
-#define DBT_VOLLOCKUNLOCKFAILED 0x8046
-#define DBT_USERDEFINED 0xFFFF
-#define DBTF_MEDIA 1
-#define DBTF_NET 2
-
-/* Also defined in winuser.h */
-#define BSM_ALLCOMPONENTS 0
-#define BSM_APPLICATIONS 8
-#define BSM_ALLDESKTOPS 16
-#define BSM_INSTALLABLEDRIVERS 4
-#define BSM_NETDRIVER 2
-#define BSM_VXDS 1
-#define BSF_FLUSHDISK 0x00000004
-#define BSF_FORCEIFHUNG 0x00000020
-#define BSF_IGNORECURRENTTASK 0x00000002
-#define BSF_NOHANG 0x00000008
-#define BSF_NOTIMEOUTIFNOTHUNG 0x00000040
-#define BSF_POSTMESSAGE 0x00000010
-#define BSF_QUERY 0x00000001
-#if (_WIN32_WINNT >= 0x0500)
-#define BSF_ALLOWSFW 0x00000080
-#define BSF_SENDNOTIFYMESSAGE 0x00000100
-#endif /* (_WIN32_WINNT >= 0x0500) */
-#if (_WIN32_WINNT >= 0x0501)
-#define BSF_LUID 0x00000400
-#define BSF_RETURNHDESK 0x00000200
-#endif /* (_WIN32_WINNT >= 0x0501) */
-
-#define BSF_MSGSRV32ISOK_BIT 31
-#define BSF_MSGSRV32ISOK 0x80000000
-
-typedef struct _DEV_BROADCAST_HDR {
- DWORD dbch_size;
- DWORD dbch_devicetype;
- DWORD dbch_reserved;
-} DEV_BROADCAST_HDR,*PDEV_BROADCAST_HDR;
-typedef struct _DEV_BROADCAST_OEM {
- DWORD dbco_size;
- DWORD dbco_devicetype;
- DWORD dbco_reserved;
- DWORD dbco_identifier;
- DWORD dbco_suppfunc;
-} DEV_BROADCAST_OEM,*PDEV_BROADCAST_OEM;
-typedef struct _DEV_BROADCAST_PORT_A {
- DWORD dbcp_size;
- DWORD dbcp_devicetype;
- DWORD dbcp_reserved;
- char dbcp_name[1];
+
+#ifndef __WINUSER_H_SOURCED__
+/* Part of <dbt.h> is made available for selective inclusion by <winuser.h>;
+ * define the <dbt.h> multiple inclusion guard only when NOT included as an
+ * adjunct to <winuser.h>
+ */
+#define _DBT_H
+
+/* When including <dbt.h> in its own right, ensure that the standard set of
+ * W32API utility macros and data types is defined.
+ */
+#include <windef.h>
+
+_BEGIN_C_DECLS
+
+#define DBT_NO_DISK_SPACE 0x47
+#define DBT_CONFIGMGPRIVATE 0x7FFF
+#define DBT_DEVICEARRIVAL 0x8000
+#define DBT_DEVICEQUERYREMOVE 0x8001
+#define DBT_DEVICEQUERYREMOVEFAILED 0x8002
+#define DBT_DEVICEREMOVEPENDING 0x8003
+#define DBT_DEVICEREMOVECOMPLETE 0x8004
+#define DBT_DEVICETYPESPECIFIC 0x8005
+#define DBT_DEVTYP_OEM 0
+#define DBT_DEVTYP_DEVNODE 1
+#define DBT_DEVTYP_VOLUME 2
+#define DBT_DEVTYP_PORT 3
+#define DBT_DEVTYP_NET 4
+
+#if _WIN32_WINDOWS >= _WIN32_WINDOWS_98 || _WIN32_WINNT >= _WIN32_WINNT_WIN2K
+#define DBT_DEVTYP_DEVICEINTERFACE 5
+#define DBT_DEVTYP_HANDLE 6
+#endif /* >= _WIN32_WINDOWS_98 || >= _WIN32_WINNT_WIN2K */
+
+#define DBT_APPYBEGIN 0
+#define DBT_APPYEND 1
+#define DBT_DEVNODES_CHANGED 7
+#define DBT_QUERYCHANGECONFIG 0x17
+#define DBT_CONFIGCHANGED 0x18
+#define DBT_CONFIGCHANGECANCELED 0x19
+#define DBT_MONITORCHANGE 0x1B
+#define DBT_SHELLLOGGEDON 32
+#define DBT_CONFIGMGAPI32 34
+#define DBT_VXDINITCOMPLETE 35
+#define DBT_VOLLOCKQUERYLOCK 0x8041
+#define DBT_VOLLOCKLOCKTAKEN 0x8042
+#define DBT_VOLLOCKLOCKFAILED 0x8043
+#define DBT_VOLLOCKQUERYUNLOCK 0x8044
+#define DBT_VOLLOCKLOCKRELEASED 0x8045
+#define DBT_VOLLOCKUNLOCKFAILED 0x8046
+#define DBT_USERDEFINED 0xFFFF
+#define DBTF_MEDIA 1
+#define DBTF_NET 2
+
+#endif /* !__WINUSER_H_SOURCED__ */
+/* The following definitions are shared with <winuser.h>; thus, we
+ * ALWAYS define them, whether within the __WINUSER_H_SOURCED__ scope,
+ * or regular inclusion of <dbt.h>
+ */
+#define BSM_ALLCOMPONENTS 0
+#define BSM_APPLICATIONS 8
+#define BSM_ALLDESKTOPS 16
+#define BSM_INSTALLABLEDRIVERS 4
+#define BSM_NETDRIVER 2
+#define BSM_VXDS 1
+#define BSF_FLUSHDISK 0x00000004
+#define BSF_FORCEIFHUNG 0x00000020
+#define BSF_IGNORECURRENTTASK 0x00000002
+#define BSF_NOHANG 0x00000008
+#define BSF_NOTIMEOUTIFNOTHUNG 0x00000040
+#define BSF_POSTMESSAGE 0x00000010
+#define BSF_QUERY 0x00000001
+
+#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K
+#define BSF_ALLOWSFW 0x00000080
+#define BSF_SENDNOTIFYMESSAGE 0x00000100
+
+#if _WIN32_WINNT >= _WIN32_WINNT_WINXP
+#define BSF_LUID 0x00000400
+#define BSF_RETURNHDESK 0x00000200
+
+#endif /* >= _WIN32_WINNT_WINXP */
+#endif /* >= _WIN32_WINNT_WIN2K */
+
+#ifndef __WINUSER_H_SOURCED__
+/* The remaining definitions are NOT shared with <winuser.h>, so are
+ * NOT defined within the __WINUSER_H_SOURCED__ scope.
+ */
+#define BSF_MSGSRV32ISOK_BIT 31
+#define BSF_MSGSRV32ISOK 0x80000000
+
+typedef struct _DEV_BROADCAST_HDR
+{ DWORD dbch_size;
+ DWORD dbch_devicetype;
+ DWORD dbch_reserved;
+} DEV_BROADCAST_HDR, *PDEV_BROADCAST_HDR;
+
+typedef struct _DEV_BROADCAST_OEM
+{ DWORD dbco_size;
+ DWORD dbco_devicetype;
+ DWORD dbco_reserved;
+ DWORD dbco_identifier;
+ DWORD dbco_suppfunc;
+} DEV_BROADCAST_OEM, *PDEV_BROADCAST_OEM;
+
+typedef struct _DEV_BROADCAST_PORT_A
+{ DWORD dbcp_size;
+ DWORD dbcp_devicetype;
+ DWORD dbcp_reserved;
+ char dbcp_name[1];
} DEV_BROADCAST_PORT_A, *PDEV_BROADCAST_PORT_A;
-typedef struct _DEV_BROADCAST_PORT_W {
- DWORD dbcp_size;
- DWORD dbcp_devicetype;
- DWORD dbcp_reserved;
- wchar_t dbcp_name[1];
+
+typedef struct _DEV_BROADCAST_PORT_W
+{ DWORD dbcp_size;
+ DWORD dbcp_devicetype;
+ DWORD dbcp_reserved;
+ wchar_t dbcp_name[1];
} DEV_BROADCAST_PORT_W, *PDEV_BROADCAST_PORT_W;
-typedef struct _DEV_BROADCAST_USERDEFINED {
- struct _DEV_BROADCAST_HDR dbud_dbh;
- char dbud_szName[1];
+
+/* Map generic type name references for UNICODE/non-UNICODE usage
+ * of the preceding pair of structured data types.
+ */
+typedef __AW_ALIAS__(DEV_BROADCAST_PORT);
+typedef __AW_ALIAS__(PDEV_BROADCAST_PORT);
+
+typedef struct _DEV_BROADCAST_USERDEFINED
+{ struct _DEV_BROADCAST_HDR dbud_dbh;
+ char dbud_szName[1];
} DEV_BROADCAST_USERDEFINED;
-typedef struct _DEV_BROADCAST_VOLUME {
- DWORD dbcv_size;
- DWORD dbcv_devicetype;
- DWORD dbcv_reserved;
- DWORD dbcv_unitmask;
- WORD dbcv_flags;
-} DEV_BROADCAST_VOLUME,*PDEV_BROADCAST_VOLUME;
-
-#ifdef UNICODE
-typedef DEV_BROADCAST_PORT_W DEV_BROADCAST_PORT, *PDEV_BROADCAST_PORT;
-#else
-typedef DEV_BROADCAST_PORT_A DEV_BROADCAST_PORT, *PDEV_BROADCAST_PORT;
-#endif
-
-#if (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500)
-typedef struct _DEV_BROADCAST_DEVICEINTERFACE_A {
- DWORD dbcc_size;
- DWORD dbcc_devicetype;
- DWORD dbcc_reserved;
- GUID dbcc_classguid;
- char dbcc_name[1];
+
+typedef struct _DEV_BROADCAST_VOLUME
+{ DWORD dbcv_size;
+ DWORD dbcv_devicetype;
+ DWORD dbcv_reserved;
+ DWORD dbcv_unitmask;
+ WORD dbcv_flags;
+} DEV_BROADCAST_VOLUME, *PDEV_BROADCAST_VOLUME;
+
+#if _WIN32_WINDOWS >= _WIN32_WINDOWS_98 || _WIN32_WINNT >= _WIN32_WINNT_WIN2K
+
+typedef struct _DEV_BROADCAST_DEVICEINTERFACE_A
+{ DWORD dbcc_size;
+ DWORD dbcc_devicetype;
+ DWORD dbcc_reserved;
+ GUID dbcc_classguid;
+ char dbcc_name[1];
} DEV_BROADCAST_DEVICEINTERFACE_A, *PDEV_BROADCAST_DEVICEINTERFACE_A;
-typedef struct _DEV_BROADCAST_DEVICEINTERFACE_W {
- DWORD dbcc_size;
- DWORD dbcc_devicetype;
- DWORD dbcc_reserved;
- GUID dbcc_classguid;
- wchar_t dbcc_name[1];
+
+typedef struct _DEV_BROADCAST_DEVICEINTERFACE_W
+{ DWORD dbcc_size;
+ DWORD dbcc_devicetype;
+ DWORD dbcc_reserved;
+ GUID dbcc_classguid;
+ wchar_t dbcc_name[1];
} DEV_BROADCAST_DEVICEINTERFACE_W, *PDEV_BROADCAST_DEVICEINTERFACE_W;
-#ifdef UNICODE
-typedef DEV_BROADCAST_DEVICEINTERFACE_W DEV_BROADCAST_DEVICEINTERFACE;
-typedef PDEV_BROADCAST_DEVICEINTERFACE_W PDEV_BROADCAST_DEVICEINTERFACE;
-#else
-typedef DEV_BROADCAST_DEVICEINTERFACE_A DEV_BROADCAST_DEVICEINTERFACE;
-typedef PDEV_BROADCAST_DEVICEINTERFACE_A PDEV_BROADCAST_DEVICEINTERFACE;
-#endif
-
-typedef struct _DEV_BROADCAST_HANDLE {
- DWORD dbch_size;
- DWORD dbch_devicetype;
- DWORD dbch_reserved;
- HANDLE dbch_handle;
- DWORD dbch_hdevnotify;
- GUID dbch_eventguid;
- LONG dbch_nameoffset;
- BYTE dbch_data[1];
+/* Map generic type name references for UNICODE/non-UNICODE usage
+ * of the preceding pair of structured data types.
+ */
+typedef __AW_ALIAS__(DEV_BROADCAST_DEVICEINTERFACE);
+typedef __AW_ALIAS__(PDEV_BROADCAST_DEVICEINTERFACE);
+
+typedef struct _DEV_BROADCAST_HANDLE
+{ DWORD dbch_size;
+ DWORD dbch_devicetype;
+ DWORD dbch_reserved;
+ HANDLE dbch_handle;
+ DWORD dbch_hdevnotify;
+ GUID dbch_eventguid;
+ LONG dbch_nameoffset;
+ BYTE dbch_data[1];
} DEV_BROADCAST_HANDLE, *PDEV_BROADCAST_HANDLE;
-#endif /* (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500) */
+#endif /* >= _WIN32_WINDOWS_98 || >= _WIN32_WINNT_WIN2K */
+
+_END_C_DECLS
-#ifdef __cplusplus
-}
-#endif
-#endif
+#endif /* !__WINUSER_H_SOURCED__ */
+#endif /* !_DBT_H: $RCSfile$: end of file */
diff --git a/w32api/include/sdkddkver.h b/w32api/include/sdkddkver.h
index 2e448a3..d82e417 100644
--- a/w32api/include/sdkddkver.h
+++ b/w32api/include/sdkddkver.h
@@ -61,6 +61,7 @@
*/
#define _WIN32_WINNT_NT4 0x0400 /* Windows NT4 */
#define _WIN32_WINNT_NT4E 0x0401 /* Windows NT4E */
+#define _WIN32_WINNT_NT4SP3 0x0403 /* Windows NT4 + ServicePack 3 */
#define _WIN32_WINDOWS_95 0x0400 /* Windows 95 */
#define _WIN32_WINDOWS_98 0x0410 /* Windows 98 */
#define _WIN32_WINDOWS_ME 0x0490 /* Windows Millenium Edition */
diff --git a/w32api/include/w32api.h.in b/w32api/include/w32api.h.in
index e7ebf5b..2e07447 100644
--- a/w32api/include/w32api.h.in
+++ b/w32api/include/w32api.h.in
@@ -170,6 +170,12 @@
#define __AW__WCHAR_T__(__TEXT__) __AW_STRING_A__(L##__TEXT__)
#define __AW_STRING_W__(__TEXT__) __AW__WCHAR_T__(__TEXT__)
+/* A further use of __AW_EXTENDED__, encapsulated in __AW_ALIAS__,
+ * provides a convenient generic mapping for type names which have
+ * alternative representations for UNICODE and non-UNICODE usage.
+ */
+#define __AW_ALIAS__(__NAME__) __AW_EXTENDED__(__NAME__) __NAME__
+
#ifdef __cplusplus
/* When compiling C++ code, these macros provide a convenient notation
* for designating those sections of system header files which declare
diff --git a/w32api/include/winuser.h b/w32api/include/winuser.h
index 2938dce..024438a 100644
--- a/w32api/include/winuser.h
+++ b/w32api/include/winuser.h
@@ -1,3417 +1,3691 @@
+/*
+ * winuser.h
+ *
+ * General user interface manifest constants, type definitions, and
+ * function declarations.
+ *
+ * $Id$
+ *
+ * Written by Anders Norlander <ano...@he...>
+ * Copyright (C) 1998-2012, 2016, MinGW.org Project
+ *
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
#ifndef _WINUSER_H
-#define _WINUSER_H
-#if __GNUC__ >= 3
#pragma GCC system_header
-#endif
+#define _WINUSER_H
-#ifdef __cplusplus
-extern "C" {
-#endif
+/* Define a temporary inclusion guard macro, to permit selective inclusion
+ * of formerly duplicated content from its primary source headers.
+ */
+#define __WINUSER_H_SOURCED__
+
+_BEGIN_C_DECLS
#ifndef WINUSERAPI
#ifdef __W32API_USE_DLLIMPORT__
-#define WINUSERAPI DECLSPEC_IMPORT
+#define WINUSERAPI DECLSPEC_IMPORT
#else
#define WINUSERAPI
#endif
#endif
-#define MNGO_NOINTERFACE 0x00
-#define MNGO_NOERROR 0x01
-#define MNGOF_TOPGAP 0x01
-#define MNGOF_BOTTOMGAP 0x02
-
-#define WC_DIALOG MAKEINTATOM(0x8002)
-#define FALT 16
-#define FCONTROL 8
-#define FNOINVERT 2
-#define FSHIFT 4
-#define FVIRTKEY 1
-#define ATF_TIMEOUTON 1
-#define ATF_ONOFFFEEDBACK 2
-#define ATF_AVAILABLE 4 /* May be obsolete. Not in recent MS docs. */
-#define WH_MIN (-1)
-#define WH_MSGFILTER (-1)
-#define WH_JOURNALRECORD 0
-#define WH_JOURNALPLAYBACK 1
-#define WH_KEYBOARD 2
-#define WH_GETMESSAGE 3
-#define WH_CALLWNDPROC 4
-#define WH_CBT 5
-#define WH_SYSMSGFILTER 6
-#define WH_MOUSE 7
-#define WH_HARDWARE 8
-#define WH_DEBUG 9
-#define WH_SHELL 10
-#define WH_FOREGROUNDIDLE 11
-#define WH_CALLWNDPROCRET 12
-#define WH_KEYBOARD_LL 13
-#define WH_MOUSE_LL 14
-#define WH_MAX 14
-#define WH_MINHOOK WH_MIN
-#define WH_MAXHOOK WH_MAX
-#define HC_ACTION 0
-#define HC_GETNEXT 1
-#define HC_SKIP 2
-#define HC_NOREMOVE 3
-#define HC_NOREM 3
-#define HC_SYSMODALON 4
-#define HC_SYSMODALOFF 5
-#define HCBT_MOVESIZE 0
-#define HCBT_MINMAX 1
-#define HCBT_QS 2
-#define HCBT_CREATEWND 3
-#define HCBT_DESTROYWND 4
-#define HCBT_ACTIVATE 5
-#define HCBT_CLICKSKIPPED 6
-#define HCBT_KEYSKIPPED 7
-#define HCBT_SYSCOMMAND 8
-#define HCBT_SETFOCUS 9
-#define CF_TEXT 1
-#define CF_BITMAP 2
-#define CF_METAFILEPICT 3
-#define CF_SYLK 4
-#define CF_DIF 5
-#define CF_TIFF 6
-#define CF_OEMTEXT 7
-#define CF_DIB 8
-#define CF_PALETTE 9
-#define CF_PENDATA 10
-#define CF_RIFF 11
-#define CF_WAVE 12
-#define CF_UNICODETEXT 13
-#define CF_ENHMETAFILE 14
-#define CF_HDROP 15
-#define CF_LOCALE 16
-#if (_WIN32_WINNT >= 0x0500)
-#define CF_DIBV5 17
-#define CF_MAX 18
+#define MNGO_NOINTERFACE 0x00
+#define MNGO_NOERROR 0x01
+#define MNGOF_TOPGAP 0x01
+#define MNGOF_BOTTOMGAP 0x02
+
+#define WC_DIALOG MAKEINTATOM(0x8002)
+#define FALT 16
+#define FCONTROL 8
+#define FNOINVERT 2
+#define FSHIFT 4
+#define FVIRTKEY 1
+#define ATF_TIMEOUTON 1
+#define ATF_ONOFFFEEDBACK 2
+#define ATF_AVAILABLE 4 /* may be obsolete */
+#define WH_MIN (-1)
+#define WH_MSGFILTER (-1)
+#define WH_JOURNALRECORD 0
+#define WH_JOURNALPLAYBACK 1
+#define WH_KEYBOARD 2
+#define WH_GETMESSAGE 3
+#define WH_CALLWNDPROC 4
+#define WH_CBT 5
+#define WH_SYSMSGFILTER 6
+#define WH_MOUSE 7
+#define WH_HARDWARE 8
+#define WH_DEBUG 9
+#define WH_SHELL 10
+#define WH_FOREGROUNDIDLE 11
+#define WH_CALLWNDPROCRET 12
+#define WH_KEYBOARD_LL 13
+#define WH_MOUSE_LL 14
+#define WH_MAX 14
+#define WH_MINHOOK WH_MIN
+#define WH_MAXHOOK WH_MAX
+#define HC_ACTION 0
+#define HC_GETNEXT 1
+#define HC_SKIP 2
+#define HC_NOREMOVE 3
+#define HC_NOREM 3
+#define HC_SYSMODALON 4
+#define HC_SYSMODALOFF 5
+#define HCBT_MOVESIZE 0
+#define HCBT_MINMAX 1
+#define HCBT_QS 2
+#define HCBT_CREATEWND 3
+#define HCBT_DESTROYWND 4
+#define HCBT_ACTIVATE 5
+#define HCBT_CLICKSKIPPED 6
+#define HCBT_KEYSKIPPED 7
+#define HCBT_SYSCOMMAND 8
+#define HCBT_SETFOCUS 9
+#define CF_TEXT 1
+#define CF_BITMAP 2
+#define CF_METAFILEPICT 3
+#define CF_SYLK 4
+#define CF_DIF 5
+#define CF_TIFF 6
+#define CF_OEMTEXT 7
+#define CF_DIB 8
+#define CF_PALETTE 9
+#define CF_PENDATA 10
+#define CF_RIFF 11
+#define CF_WAVE 12
+#define CF_UNICODETEXT 13
+#define CF_ENHMETAFILE 14
+#define CF_HDROP 15
+#define CF_LOCALE 16
+
+#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K
+#define CF_DIBV5 17
+#define CF_MAX 18
#else
-#define CF_MAX 17
+#define CF_MAX 17
#endif
-#define CF_OWNERDISPLAY 128
-#define CF_DSPTEXT 129
-#define CF_DSPBITMAP 130
-#define CF_DSPMETAFILEPICT 131
-#define CF_DSPENHMETAFILE 142
-#define CF_PRIVATEFIRST 512
-#define CF_PRIVATELAST 767
-#define CF_GDIOBJFIRST 768
-#define CF_GDIOBJLAST 1023
-#define HKL_NEXT 1
-#define HKL_PREV 0
-#define KLF_ACTIVATE 1
-#define KLF_SUBSTITUTE_OK 2
-#define KLF_UNLOADPREVIOUS 4
-#define KLF_REORDER 8
-#define KLF_REPLACELANG 16
-#define KLF_NOTELLSHELL 128
-#define KLF_SETFORPROCESS 256
-#define KL_NAMELENGTH 9
-#define MF_ENABLED 0
-#define MF_GRAYED 1
-#define MF_DISABLED 2
-#define MF_BITMAP 4
-#define MF_CHECKED 8
-#define MF_MENUBARBREAK 32
-#define MF_MENUBREAK 64
-#define MF_OWNERDRAW 256
-#define MF_POPUP 16
-#define MF_SEPARATOR 0x800
-#define MF_STRING 0
-#define MF_UNCHECKED 0
-#define MF_DEFAULT 4096
-#define MF_SYSMENU 0x2000
-#define MF_HELP 0x4000
-#define MF_END 128
-#define MF_RIGHTJUSTIFY 0x4000
-#define MF_MOUSESELECT 0x8000
-#define MF_INSERT 0
-#define MF_CHANGE 128
-#define MF_APPEND 256
-#define MF_DELETE 512
-#define MF_REMOVE 4096
-#define MF_USECHECKBITMAPS 512
-#define MF_UNHILITE 0
-#define MF_HILITE 128
-
-/* Also defined in dbt.h */
-#define BSM_ALLCOMPONENTS 0
-#define BSM_APPLICATIONS 8
-#define BSM_ALLDESKTOPS 16
-#define BSM_INSTALLABLEDRIVERS 4
-#define BSM_NETDRIVER 2
-#define BSM_VXDS 1
-#define BSF_FLUSHDISK 0x00000004
-#define BSF_FORCEIFHUNG 0x00000020
-#define BSF_IGNORECURRENTTASK 0x00000002
-#define BSF_NOHANG 0x00000008
-#define BSF_NOTIMEOUTIFNOTHUNG 0x00000040
-#define BSF_POSTMESSAGE 0x00000010
-#define BSF_QUERY 0x00000001
-#if (_WIN32_WINNT >= 0x0500)
-#define BSF_ALLOWSFW 0x00000080
-#define BSF_SENDNOTIFYMESSAGE 0x00000100
-#endif /* (_WIN32_WINNT >= 0x0500) */
-#if (_WIN32_WINNT >= 0x0501)
-#define BSF_LUID 0x00000400
-#define BSF_RETURNHDESK 0x00000200
-#endif /* (_WIN32_WINNT >= 0x0501) */
-
-#define BROADCAST_QUERY_DENY 1112363332
-#define ENUM_CURRENT_SETTINGS ((DWORD)-1)
-#define ENUM_REGISTRY_SETTINGS ((DWORD)-2)
-#define CDS_UPDATEREGISTRY 1
-#define CDS_TEST 2
-#define CDS_FULLSCREEN 4
-#define CDS_GLOBAL 8
-#define CDS_SET_PRIMARY 16
-#define CDS_RESET 0x40000000
-#define CDS_SETRECT 0x20000000
-#define CDS_NORESET 0x10000000
-#define DISP_CHANGE_SUCCESSFUL 0
-#define DISP_CHANGE_RESTART 1
-#define DISP_CHANGE_FAILED (-1)
-#define DISP_CHANGE_BADMODE (-2)
-#define DISP_CHANGE_NOTUPDATED (-3)
-#define DISP_CHANGE_BADFLAGS (-4)
-#define DISP_CHANGE_BADPARAM (-5)
-#define DISP_CHANGE_BADDUALVIEW (-6)
-#define BST_CHECKED 1
-#define BST_INDETERMINATE 2
-#define BST_UNCHECKED 0
-#define BST_FOCUS 8
-#define BST_PUSHED 4
-#define MF_BYCOMMAND 0
-#define MF_BYPOSITION 1024
-#define MF_UNCHECKED 0
-#define MF_HILITE 128
-#define MF_UNHILITE 0
-#define CWP_ALL 0
-#define CWP_SKIPINVISIBLE 1
-#define CWP_SKIPDISABLED 2
-#define CWP_SKIPTRANSPARENT 4
-#define IMAGE_BITMAP 0
-#define IMAGE_ICON 1
-#define IMAGE_CURSOR 2
-#define IMAGE_ENHMETAFILE 3
-#define DF_ALLOWOTHERACCOUNTHOOK 1
-#define DESKTOP_CREATEMENU 4
-#define DESKTOP_CREATEWINDOW 2
-#define DESKTOP_ENUMERATE 64
-#define DESKTOP_HOOKCONTROL 8
-#define DESKTOP_JOURNALPLAYBACK 32
-#define DESKTOP_JOURNALRECORD 16
-#define DESKTOP_READOBJECTS 1
-#define DESKTOP_SWITCHDESKTOP 256
-#define DESKTOP_WRITEOBJECTS 128
-#define CW_USEDEFAULT 0x80000000
-#define WS_BORDER 0x800000
-#define WS_CAPTION 0xc00000
-#define WS_CHILD 0x40000000
-#define WS_CHILDWINDOW 0x40000000
-#define WS_CLIPCHILDREN 0x2000000
-#define WS_CLIPSIBLINGS 0x4000000
-#define WS_DISABLED 0x8000000
-#define WS_DLGFRAME 0x400000
-#define WS_GROUP 0x20000
-#define WS_HSCROLL 0x100000
-#define WS_ICONIC 0x20000000
-#define WS_MAXIMIZE 0x1000000
-#define WS_MAXIMIZEBOX 0x10000
-#define WS_MINIMIZE 0x20000000
-#define WS_MINIMIZEBOX 0x20000
-#define WS_OVERLAPPED 0
-#define WS_OVERLAPPEDWINDOW 0xcf0000
-#define WS_POPUP 0x80000000
-#define WS_POPUPWINDOW 0x80880000
-#define WS_SIZEBOX 0x40000
-#define WS_SYSMENU 0x80000
-#define WS_TABSTOP 0x10000
-#define WS_THICKFRAME 0x40000
-#define WS_TILED 0
-#define WS_TILEDWINDOW 0xcf0000
-#define WS_VISIBLE 0x10000000
-#define WS_VSCROLL 0x200000
-#define MDIS_ALLCHILDSTYLES 1
-#define BS_3STATE 5
-#define BS_AUTO3STATE 6
-#define BS_AUTOCHECKBOX 3
-#define BS_AUTORADIOBUTTON 9
-#define BS_BITMAP 128
-#define BS_BOTTOM 0x800
-#define BS_CENTER 0x300
-#define BS_CHECKBOX 2
-#define BS_DEFPUSHBUTTON 1
-#define BS_GROUPBOX 7
-#define BS_ICON 64
-#define BS_LEFT 256
-#define BS_LEFTTEXT 32
-#define BS_MULTILINE 0x2000
-#define BS_NOTIFY 0x4000
-#define BS_OWNERDRAW 0xb
-#define BS_PUSHBUTTON 0
-#define BS_PUSHLIKE 4096
-#define BS_RADIOBUTTON 4
-#define BS_RIGHT 512
-#define BS_RIGHTBUTTON 32
-#define BS_TEXT 0
-#define BS_TOP 0x400
-#define BS_USERBUTTON 8
-#define BS_VCENTER 0xc00
-#define BS_FLAT 0x8000
-#define CBS_AUTOHSCROLL 64
-#define CBS_DISABLENOSCROLL 0x800
-#define CBS_DROPDOWN 2
-#define CBS_DROPDOWNLIST 3
-#define CBS_HASSTRINGS 512
-#define CBS_LOWERCASE 0x4000
-#define CBS_NOINTEGRALHEIGHT 0x400
-#define CBS_OEMCONVERT 128
-#define CBS_OWNERDRAWFIXED 16
-#define CBS_OWNERDRAWVARIABLE 32
-#define CBS_SIMPLE 1
-#define CBS_SORT 256
-#define CBS_UPPERCASE 0x2000
-#define ES_AUTOHSCROLL 128
-#define ES_AUTOVSCROLL 64
-#define ES_CENTER 1
-#define ES_LEFT 0
-#define ES_LOWERCASE 16
-#define ES_MULTILINE 4
-#define ES_NOHIDESEL 256
-#define ES_NUMBER 0x2000
-#define ES_OEMCONVERT 0x400
-#define ES_PASSWORD 32
-#define ES_READONLY 0x800
-#define ES_RIGHT 2
-#define ES_UPPERCASE 8
-#define ES_WANTRETURN 4096
-#define LBS_DISABLENOSCROLL 4096
-#define LBS_EXTENDEDSEL 0x800
-#define LBS_HASSTRINGS 64
-#define LBS_MULTICOLUMN 512
-#define LBS_MULTIPLESEL 8
-#define LBS_NODATA 0x2000
-#define LBS_NOINTEGRALHEIGHT 256
-#define LBS_NOREDRAW 4
-#define LBS_NOSEL 0x4000
-#define LBS_NOTIFY 1
-#define LBS_OWNERDRAWFIXED 16
-#define LBS_OWNERDRAWVARIABLE 32
-#define LBS_SORT 2
-#define LBS_STANDARD 0xa00003
-#define LBS_USETABSTOPS 128
-#define LBS_WANTKEYBOARDINPUT 0x400
-#define SBS_BOTTOMALIGN 4
-#define SBS_HORZ 0
-#define SBS_LEFTALIGN 2
-#define SBS_RIGHTALIGN 4
-#define SBS_SIZEBOX 8
-#define SBS_SIZEBOXBOTTOMRIGHTALIGN 4
-#define SBS_SIZEBOXTOPLEFTALIGN 2
-#define SBS_SIZEGRIP 16
-#define SBS_TOPALIGN 2
-#define SBS_VERT 1
-#define SS_BITMAP 14
-#define SS_BLACKFRAME 7
-#define SS_BLACKRECT 4
-#define SS_CENTER 1
-#define SS_CENTERIMAGE 512
-#define SS_ENHMETAFILE 15
-#define SS_ETCHEDFRAME 18
-#define SS_ETCHEDHORZ 16
-#define SS_ETCHEDVERT 17
-#define SS_GRAYFRAME 8
-#define SS_GRAYRECT 5
-#define SS_ICON 3
-#define SS_LEFT 0
-#define SS_LEFTNOWORDWRAP 0xc
-#define SS_NOPREFIX 128
-#define SS_NOTIFY 256
-#define SS_OWNERDRAW 0xd
-#define SS_REALSIZEIMAGE 0x800
-#define SS_RIGHT 2
-#define SS_RIGHTJUST 0x400
-#define SS_SIMPLE 11
-#define SS_SUNKEN 4096
-#define SS_WHITEFRAME 9
-#define SS_WHITERECT 6
-#define SS_USERITEM 10
-#define SS_TYPEMASK 0x0000001FL
-#define SS_ENDELLIPSIS 0x00004000L
-#define SS_PATHELLIPSIS 0x00008000L
-#define SS_WORDELLIPSIS 0x0000C000L
-#define SS_ELLIPSISMASK 0x0000C000L
-#define DS_3DLOOK 4
-#define DS_ABSALIGN 1
-#define DS_CENTER 0x800
-#define DS_CENTERMOUSE 4096
-#define DS_CONTEXTHELP 0x2000
-#define DS_CONTROL 0x400
-#define DS_FIXEDSYS 8
-#define DS_LOCALEDIT 32
-#define DS_MODALFRAME 128
-#define DS_NOFAILCREATE 16
-#define DS_NOIDLEMSG 256
-#define DS_SETFONT 64
-#define DS_SETFOREGROUND 512
-#define DS_SYSMODAL 2
-#define DS_SHELLFONT (DS_SETFONT | DS_FIXEDSYS)
-#define WS_EX_ACCEPTFILES 16
-#define WS_EX_APPWINDOW 0x40000
-#define WS_EX_CLIENTEDGE 512
-#define WS_EX_COMPOSITED 0x2000000 /* XP */
-#define WS_EX_CONTEXTHELP 0x400
-#define WS_EX_CONTROLPARENT 0x10000
-#define WS_EX_DLGMODALFRAME 1
-#define WS_EX_LAYERED 0x80000 /* w2k */
-#define WS_EX_LAYOUTRTL 0x400000 /* w98, w2k */
-#define WS_EX_LEFT 0
-#define WS_EX_LEFTSCROLLBAR 0x4000
-#define WS_EX_LTRREADING 0
-#define WS_EX_MDICHILD 64
-#define WS_EX_NOACTIVATE 0x8000000 /* w2k */
-#define WS_EX_NOINHERITLAYOUT 0x100000 /* w2k */
-#define WS_EX_NOPARENTNOTIFY 4
-#define WS_EX_OVERLAPPEDWINDOW 0x300
-#define WS_EX_PALETTEWINDOW 0x188
-#define WS_EX_RIGHT 0x1000
-#define WS_EX_RIGHTSCROLLBAR 0
-#define WS_EX_RTLREADING 0x2000
-#define WS_EX_STATICEDGE 0x20000
-#define WS_EX_TOOLWINDOW 128
-#define WS_EX_TOPMOST 8
-#define WS_EX_TRANSPARENT 32
-#define WS_EX_WINDOWEDGE 256
-#define WINSTA_ALL_ACCESS 895
-#define WINSTA_ACCESSCLIPBOARD 4
-#define WINSTA_ACCESSGLOBALATOMS 32
-#define WINSTA_CREATEDESKTOP 8
-#define WINSTA_ENUMDESKTOPS 1
-#define WINSTA_ENUMERATE 256
-#define WINSTA_EXITWINDOWS 64
-#define WINSTA_READATTRIBUTES 2
-#define WINSTA_READSCREEN 512
-#define WINSTA_WRITEATTRIBUTES 16
-#define DDL_READWRITE 0
-#define DDL_READONLY 1
-#define DDL_HIDDEN 2
-#define DDL_SYSTEM 4
-#define DDL_DIRECTORY 16
-#define DDL_ARCHIVE 32
-#define DDL_POSTMSGS 8192
-#define DDL_DRIVES 16384
-#define DDL_EXCLUSIVE 32768
-#define DC_ACTIVE 0x00000001
-#define DC_SMALLCAP 0x00000002
-#define DC_ICON 0x00000004
-#define DC_TEXT 0x00000008
-#define DC_INBUTTON 0x00000010
-#if (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500)
-#define DC_GRADIENT 0x00000020
+
+#define CF_OWNERDISPLAY 128
+#define CF_DSPTEXT 129
+#define CF_DSPBITMAP 130
+#define CF_DSPMETAFILEPICT 131
+#define CF_DSPENHMETAFILE 142
+#define CF_PRIVATEFIRST 512
+#define CF_PRIVATELAST 767
+#define CF_GDIOBJFIRST 768
+#define CF_GDIOBJLAST 1023
+#define HKL_NEXT 1
+#define HKL_PREV 0
+#define KLF_ACTIVATE 1
+#define KLF_SUBSTITUTE_OK 2
+#define KLF_UNLOADPREVIOUS 4
+#define KLF_REORDER 8
+#define KLF_REPLACELANG 16
+#define KLF_NOTELLSHELL 128
+#define KLF_SETFORPROCESS 256
+#define KL_NAMELENGTH 9
+#define MF_ENABLED 0
+#define MF_GRAYED 1
+#define MF_DISABLED 2
+#define MF_BITMAP 4
+#define MF_CHECKED 8
+#define MF_MENUBARBREAK 32
+#define MF_MENUBREAK 64
+#define MF_OWNERDRAW 256
+#define MF_POPUP 16
+#define MF_SEPARATOR 0x800
+#define MF_STRING 0
+#define MF_UNCHECKED 0
+#define MF_DEFAULT 4096
+#define MF_SYSMENU 0x2000
+#define MF_HELP 0x4000
+#define MF_END 128
+#define MF_RIGHTJUSTIFY 0x4000
+#define MF_MOUSESELECT 0x8000
+#define MF_INSERT 0
+#define MF_CHANGE 128
+#define MF_APPEND 256
+#define MF_DELETE 512
+#define MF_REMOVE 4096
+#define MF_USECHECKBITMAPS 512
+#define MF_UNHILITE 0
+#define MF_HILITE 128
+
+/* To reduce maintainence, and to avoid any possibility that we might
+ * introduce inconsistent definitions, we selectively...
+ */
+#include <dbt.h>
+/*
+ * ...to obtain definitions for:
+ *
+ * BSM_ALLCOMPONENTS, BSM_APPLICATIONS, BSM_ALLDESKTOPS,
+ * BSM_INSTALLABLEDRIVERS, BSM_NETDRIVER, BSM_VXDS, BSF_FLUSHDISK,
+ * BSF_FORCEIFHUNG, BSF_IGNORECURRENTTASK, BSF_NOHANG,
+ * BSF_NOTIMEOUTIFNOTHUNG, BSF_POSTMESSAGE, BSF_QUERY,
+ *
+ * with the addition of this pair, which require Win2K or later:
+ *
+ * BSF_ALLOWSFW, BSF_SENDNOTIFYMESSAGE,
+ *
+ * and these, which require WinXP or later:
+ *
+ * BSF_LUID, and BSF_RETURNHDESK
+ *
+ * (end of selective <dpt.h> inclusion).
+ *
+ */
+#define BROADCAST_QUERY_DENY 1112363332
+#define ENUM_CURRENT_SETTINGS ((DWORD)(-1))
+#define ENUM_REGISTRY_SETTINGS ((DWORD)(-2))
+#define CDS_UPDATEREGISTRY 1
+#define CDS_TEST 2
+#define CDS_FULLSCREEN 4
+#define CDS_GLOBAL 8
+#define CDS_SET_PRIMARY 16
+#define CDS_RESET 0x40000000
+#define CDS_SETRECT 0x20000000
+#define CDS_NORESET 0x10000000
+#define DISP_CHANGE_SUCCESSFUL 0
+#define DISP_CHANGE_RESTART 1
+#define DISP_CHANGE_FAILED (-1)
+#define DISP_CHANGE_BADMODE (-2)
+#define DISP_CHANGE_NOTUPDATED (-3)
+#define DISP_CHANGE_BADFLAGS (-4)
+#define DISP_CHANGE_BADPARAM (-5)
+#define DISP_CHANGE_BADDUALVIEW (-6)
+#define BST_CHECKED 1
+#define BST_INDETERMINATE 2
+#define BST_UNCHECKED 0
+#define BST_FOCUS 8
+#define BST_PUSHED 4
+#define MF_BYCOMMAND 0
+#define MF_BYPOSITION 1024
+#define MF_UNCHECKED 0
+#define MF_HILITE 128
+#define MF_UNHILITE 0
+#define CWP_ALL 0
+#define CWP_SKIPINVISIBLE 1
+#define CWP_SKIPDISABLED 2
+#define CWP_SKIPTRANSPARENT 4
+#define IMAGE_BITMAP 0
+#define IMAGE_ICON 1
+#define IMAGE_CURSOR 2
+#define IMAGE_ENHMETAFILE 3
+#define DF_ALLOWOTHERACCOUNTHOOK 1
+#define DESKTOP_CREATEMENU 4
+#define DESKTOP_CREATEWINDOW 2
+#define DESKTOP_ENUMERATE 64
+#define DESKTOP_HOOKCONTROL 8
+#define DESKTOP_JOURNALPLAYBACK 32
+#define DESKTOP_JOURNALRECORD 16
+#define DESKTOP_READOBJECTS 1
+#define DESKTOP_SWITCHDESKTOP 256
+#define DESKTOP_WRITEOBJECTS 128
+#define CW_USEDEFAULT 0x80000000
+#define WS_BORDER 0x800000
+#define WS_CAPTION 0xC00000
+#define WS_CHILD 0x40000000
+#define WS_CHILDWINDOW 0x40000000
+#define WS_CLIPCHILDREN 0x2000000
+#define WS_CLIPSIBLINGS 0x4000000
+#define WS_DISABLED 0x8000000
+#define WS_DLGFRAME 0x400000
+#define WS_GROUP 0x20000
+#define WS_HSCROLL 0x100000
+#define WS_ICONIC 0x20000000
+#define WS_MAXIMIZE 0x1000000
+#define WS_MAXIMIZEBOX 0x10000
+#define WS_MINIMIZE 0x20000000
+#define WS_MINIMIZEBOX 0x20000
+#define WS_OVERLAPPED 0
+#define WS_OVERLAPPEDWINDOW 0xCF0000
+#define WS_POPUP 0x80000000
+#define WS_POPUPWINDOW 0x80880000
+#define WS_SIZEBOX 0x40000
+#define WS_SYSMENU 0x80000
+#define WS_TABSTOP 0x10000
+#define WS_THICKFRAME 0x40000
+#define WS_TILED 0
+#define WS_TILEDWINDOW 0xCF0000
+#define WS_VISIBLE 0x10000000
+#define WS_VSCROLL 0x200000
+#define MDIS_ALLCHILDSTYLES 1
+#define BS_3STATE 5
+#define BS_AUTO3STATE 6
+#define BS_AUTOCHECKBOX 3
+#define BS_AUTORADIOBUTTON 9
+#define BS_BITMAP 128
+#define BS_BOTTOM 0x800
+#define BS_CENTER 0x300
+#define BS_CHECKBOX 2
+#define BS_DEFPUSHBUTTON 1
+#define BS_GROUPBOX 7
+#define BS_ICON 64
+#define BS_LEFT 256
+#define BS_LEFTTEXT 32
+#define BS_MULTILINE 0x2000
+#define BS_NOTIFY 0x4000
+#define BS_OWNERDRAW 0xB
+#define BS_PUSHBUTTON 0
+#define BS_PUSHLIKE 4096
+#define BS_RADIOBUTTON 4
+#define BS_RIGHT 512
+#define BS_RIGHTBUTTON 32
+#define BS_TEXT 0
+#define BS_TOP 0x400
+#define BS_USERBUTTON 8
+#define BS_VCENTER 0xC00
+#define BS_FLAT 0x8000
+#define CBS_AUTOHSCROLL 64
+#define CBS_DISABLENOSCROLL 0x800
+#define CBS_DROPDOWN 2
+#define CBS_DROPDOWNLIST 3
+#define CBS_HASSTRINGS 512
+#define CBS_LOWERCASE 0x4000
+#define CBS_NOINTEGRALHEIGHT 0x400
+#define CBS_OEMCONVERT 128
+#define CBS_OWNERDRAWFIXED 16
+#define CBS_OWNERDRAWVARIABLE 32
+#define CBS_SIMPLE 1
+#define CBS_SORT 256
+#define CBS_UPPERCASE 0x2000
+#define ES_AUTOHSCROLL 128
+#define ES_AUTOVSCROLL 64
+#define ES_CENTER 1
+#define ES_LEFT 0
+#define ES_LOWERCASE 16
+#define ES_MULTILINE 4
+#define ES_NOHIDESEL 256
+#define ES_NUMBER 0x2000
+#define ES_OEMCONVERT 0x400
+#define ES_PASSWORD 32
+#define ES_READONLY 0x800
+#define ES_RIGHT 2
+#define ES_UPPERCASE 8
+#define ES_WANTRETURN 4096
+#define LBS_DISABLENOSCROLL 4096
+#define LBS_EXTENDEDSEL 0x800
+#define LBS_HASSTRINGS 64
+#define LBS_MULTICOLUMN 512
+#define LBS_MULTIPLESEL 8
+#define LBS_NODATA 0x2000
+#define LBS_NOINTEGRALHEIGHT 256
+#define LBS_NOREDRAW 4
+#define LBS_NOSEL 0x4000
+#define LBS_NOTIFY 1
+#define LBS_OWNERDRAWFIXED 16
+#define LBS_OWNERDRAWVARIABLE 32
+#define LBS_SORT 2
+#define LBS_STANDARD 0xA00003
+#define LBS_USETABSTOPS 128
+#define LBS_WANTKEYBOARDINPUT 0x400
+#define SBS_BOTTOMALIGN 4
+#define SBS_HORZ 0
+#define SBS_LEFTALIGN 2
+#define SBS_RIGHTALIGN 4
+#define SBS_SIZEBOX 8
+#define SBS_SIZEBOXBOTTOMRIGHTALIGN 4
+#define SBS_SIZEBOXTOPLEFTALIGN 2
+#define SBS_SIZEGRIP 16
+#define SBS_TOPALIGN 2
+#define SBS_VERT 1
+#define SS_BITMAP 14
+#define SS_BLACKFRAME 7
+#define SS_BLACKRECT 4
+#define SS_CENTER 1
+#define SS_CENTERIMAGE 512
+#define SS_ENHMETAFILE 15
+#define SS_ETCHEDFRAME 18
+#define SS_ETCHEDHORZ 16
+#define SS_ETCHEDVERT 17
+#define SS_GRAYFRAME 8
+#define SS_GRAYRECT 5
+#define SS_ICON 3
+#define SS_LEFT 0
+#define SS_LEFTNOWORDWRAP 0xC
+#define SS_NOPREFIX 128
+#define SS_NOTIFY 256
+#define SS_OWNERDRAW 0xD
+#define SS_REALSIZEIMAGE 0x800
+#define SS_RIGHT 2
+#define SS_RIGHTJUST 0x400
+#define SS_SIMPLE 11
+#define SS_SUNKEN 4096
+#define SS_WHITEFRAME 9
+#define SS_WHITERECT 6
+#define SS_USERITEM 10
+#define SS_TYPEMASK 0x0000001FL
+#define SS_ENDELLIPSIS 0x00004000L
+#define SS_PATHELLIPSIS 0x00008000L
+#define SS_WORDELLIPSIS 0x0000C000L
+#define SS_ELLIPSISMASK 0x0000C000L
+#define DS_3DLOOK 4
+#define DS_ABSALIGN 1
+#define DS_CENTER 0x800
+#define DS_CENTERMOUSE 4096
+#define DS_CONTEXTHELP 0x2000
+#define DS_CONTROL 0x400
+#define DS_FIXEDSYS 8
+#define DS_LOCALEDIT 32
+#define DS_MODALFRAME 128
+#define DS_NOFAILCREATE 16
+#define DS_NOIDLEMSG 256
+#define DS_SETFONT 64
+#define DS_SETFOREGROUND 512
+#define DS_SYSMODAL 2
+#define DS_SHELLFONT (DS_SETFONT | DS_FIXEDSYS)
+#define WS_EX_ACCEPTFILES 16
+#define WS_EX_APPWINDOW 0x40000
+#define WS_EX_CLIENTEDGE 512
+#define WS_EX_COMPOSITED 0x2000000 /* XP */
+#define WS_EX_CONTEXTHELP 0x400
+#define WS_EX_CONTROLPARENT 0x10000
+#define WS_EX_DLGMODALFRAME 1
+#define WS_EX_LAYERED 0x80000 /* W2K */
+#define WS_EX_LAYOUTRTL 0x400000 /* W98, W2K */
+#define WS_EX_LEFT 0
+#define WS_EX_LEFTSCROLLBAR 0x4000
+#define WS_EX_LTRREADING 0
+#define WS_EX_MDICHILD 64
+#define WS_EX_NOACTIVATE 0x8000000 /* W2K */
+#define WS_EX_NOINHERITLAYOUT 0x100000 /* W2K */
+#define WS_EX_NOPARENTNOTIFY 4
+#define WS_EX_OVERLAPPEDWINDOW 0x300
+#define WS_EX_PALETTEWINDOW 0x188
+#define WS_EX_RIGHT 0x1000
+#define WS_EX_RIGHTSCROLLBAR 0
+#define WS_EX_RTLREADING 0x2000
+#define WS_EX_STATICEDGE 0x20000
+#define WS_EX_TOOLWINDOW 128
+#define WS_EX_TOPMOST 8
+#define WS_EX_TRANSPARENT 32
+#define WS_EX_WINDOWEDGE 256
+#define WINSTA_ALL_ACCESS 895
+#define WINSTA_ACCESSCLIPBOARD 4
+#define WINSTA_ACCESSGLOBALATOMS 32
+#define WINSTA_CREATEDESKTOP 8
+#define WINSTA_ENUMDESKTOPS 1
+#define WINSTA_ENUMERATE 256
+#define WINSTA_EXITWINDOWS 64
+#define WINSTA_READATTRIBUTES 2
+#define WINSTA_READSCREEN 512
+#define WINSTA_WRITEATTRIBUTES 16
+#define DDL_READWRITE 0
+#define DDL_READONLY 1
+#define DDL_HIDDEN 2
+#define DDL_SYSTEM 4
+#define DDL_DIRECTORY 16
+#define DDL_ARCHIVE 32
+#define DDL_POSTMSGS 8192
+#define DDL_DRIVES 16384
+#define DDL_EXCLUSIVE 32768
+#define DC_ACTIVE 0x00000001
+#define DC_SMALLCAP 0x00000002
+#define DC_ICON 0x00000004
+#define DC_TEXT 0x00000008
+#define DC_INBUTTON 0x00000010
+
+#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K || _WIN32_WINDOWS >= _WIN32_WINDOWS_98
+#define DC_GRADIENT 0x00000020
#endif
-#if (_WIN32_WINNT >= 0x0501)
-#define DC_BUTTONS 0x00001000
+
+#if _WIN32_WINNT >= _WIN32_WINNT_WINXP
+#define DC_BUTTONS 0x00001000
#endif
+
/* Where are these documented? */
-#define DC_CAPTION (DC_ICON|DC_TEXT|DC_BUTTONS)
-#define DC_NC (DC_CAPTION|DC_FRAME)
-
-#define BDR_RAISEDOUTER 1
-#define BDR_SUNKENOUTER 2
-#define BDR_RAISEDINNER 4
-#define BDR_SUNKENINNER 8
-#define BDR_OUTER 3
-#define BDR_INNER 0xc
-#define BDR_RAISED 5
-#define BDR_SUNKEN 10
-#define EDGE_RAISED (BDR_RAISEDOUTER|BDR_RAISEDINNER)
-#define EDGE_SUNKEN (BDR_SUNKENOUTER|BDR_SUNKENINNER)
-#define EDGE_ETCHED (BDR_SUNKENOUTER|BDR_RAISEDINNER)
-#define EDGE_BUMP (BDR_RAISEDOUTER|BDR_SUNKENINNER)
-#define BF_LEFT 1
-#define BF_TOP 2
-#define BF_RIGHT 4
-#define BF_BOTTOM 8
-#define BF_TOPLEFT (BF_TOP|BF_LEFT)
-#define BF_TOPRIGHT (BF_TOP|BF_RIGHT)
-#define BF_BOTTOMLEFT (BF_BOTTOM|BF_LEFT)
-#define BF_BOTTOMRIGHT (BF_BOTTOM|BF_RIGHT)
-#define BF_RECT (BF_LEFT|BF_TOP|BF_RIGHT|BF_BOTTOM)
-#define BF_DIAGONAL 16
-#define BF_DIAGONAL_ENDTOPRIGHT (BF_DIAGONAL|BF_TOP|BF_RIGHT)
-#define BF_DIAGONAL_ENDTOPLEFT (BF_DIAGONAL|BF_TOP|BF_LEFT)
-#define BF_DIAGONAL_ENDBOTTOMLEFT (BF_DIAGONAL|BF_BOTTOM|BF_LEFT)
-#define BF_DIAGONAL_ENDBOTTOMRIGHT (BF_DIAGONAL|BF_BOTTOM|BF_RIGHT)
-#define BF_MIDDLE 0x800
-#define BF_SOFT 0x1000
-#define BF_ADJUST 0x2000
-#define BF_FLAT 0x4000
-#define BF_MONO 0x8000
-#define DFC_CAPTION 1
-#define DFC_MENU 2
-#define DFC_SCROLL 3
-#define DFC_BUTTON 4
-#if (WINVER >= 0x0500)
-#define DFC_POPUPMENU 5
-#endif /* WINVER >= 0x0500 */
-#define DFCS_CAPTIONCLOSE 0
-#define DFCS_CAPTIONMIN 1
-#define DFCS_CAPTIONMAX 2
-#define DFCS_CAPTIONRESTORE 3
-#define DFCS_CAPTIONHELP 4
-#define DFCS_MENUARROW 0
-#define DFCS_MENUCHECK 1
-#define DFCS_MENUBULLET 2
-#define DFCS_MENUARROWRIGHT 4
-#define DFCS_SCROLLUP 0
-#define DFCS_SCROLLDOWN 1
-#define DFCS_SCROLLLEFT 2
-#define DFCS_SCROLLRIGHT 3
-#define DFCS_SCROLLCOMBOBOX 5
-#define DFCS_SCROLLSIZEGRIP 8
-#define DFCS_SCROLLSIZEGRIPRIGHT 16
-#define DFCS_BUTTONCHECK 0
-#define DFCS_BUTTONRADIOIMAGE 1
-#define DFCS_BUTTONRADIOMASK 2
-#define DFCS_BUTTONRADIO 4
-#define DFCS_BUTTON3STATE 8
-#define DFCS_BUTTONPUSH 16
-#define DFCS_INACTIVE 256
-#define DFCS_PUSHED 512
-#define DFCS_CHECKED 1024
-#if (WINVER >= 0x0500)
-#define DFCS_TRANSPARENT 0x800
-#define DFCS_HOT 0x1000
+#define DC_CAPTION (DC_ICON | DC_TEXT | DC_BUTTONS)
+#define DC_NC (DC_CAPTION | DC_FRAME)
+
+#define BDR_RAISEDOUTER 1
+#define BDR_SUNKENOUTER 2
+#define BDR_RAISEDINNER 4
+#define BDR_SUNKENINNER 8
+#define BDR_OUTER 3
+#define BDR_INNER 0xC
+#define BDR_RAISED 5
+#define BDR_SUNKEN 10
+#define EDGE_RAISED (BDR_RAISEDOUTER | BDR_RAISEDINNER)
+#define EDGE_SUNKEN (BDR_SUNKENOUTER | BDR_SUNKENINNER)
+#define EDGE_ETCHED (BDR_SUNKENOUTER | BDR_RAISEDINNER)
+#define EDGE_BUMP (BDR_RAISEDOUTER | BDR_SUNKENINNER)
+#define BF_LEFT 1
+#define BF_TOP 2
+#define BF_RIGHT 4
+#define BF_BOTTOM 8
+#define BF_TOPLEFT (BF_TOP | BF_LEFT)
+#define BF_TOPRIGHT (BF_TOP | BF_RIGHT)
+#define BF_BOTTOMLEFT (BF_BOTTOM | BF_LEFT)
+#define BF_BOTTOMRIGHT (BF_BOTTOM | BF_RIGHT)
+#define BF_RECT (BF_LEFT | BF_TOP | BF_RIGHT | BF_BOTTOM)
+#define BF_DIAGONAL 16
+#define BF_DIAGONAL_ENDTOPRIGHT (BF_DIAGONAL | BF_TOP | BF_RIGHT)
+#define BF_DIAGONAL_ENDTOPLEFT (BF_DIAGONAL | BF_TOP | BF_LEFT)
+#define BF_DIAGONAL_ENDBOTTOMLEFT (BF_DIAGONAL | BF_BOTTOM | BF_LEFT)
+#define BF_DIAGONAL_ENDBOTTOMRIGHT (BF_DIAGONAL | BF_BOTTOM | BF_RIGHT)
+#define BF_MIDDLE 0x800
+#define BF_SOFT 0x1000
+#define BF_ADJUST 0x2000
+#define BF_FLAT 0x4000
+#define BF_MONO 0x8000
+#define DFC_CAPTION 1
+#define DFC_MENU 2
+#define DFC_SCROLL 3
+#define DFC_BUTTON 4
+
+#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K
+#define DFC_POPUPMENU 5
+#endif /* >= _WIN32_WINNT_WIN2K */
+
+#define DFCS_CAPTIONCLOSE 0
+#define DFCS_CAPTIONMIN 1
+#define DFCS_CAPTIONMAX 2
+#define DFCS_CAPTIONRESTORE 3
+#define DFCS_CAPTIONHELP 4
+#define DFCS_MENUARROW 0
+#define DFCS_MENUCHECK 1
+#define DFCS_MENUBULLET 2
+#define DFCS_MENUARROWRIGHT 4
+#define DFCS_SCROLLUP 0
+#define DFCS_SCROLLDOWN 1
+#define DFCS_SCROLLLEFT 2
+#define DFCS_SCROLLRIGHT 3
+#define DFCS_SCROLLCOMBOBOX 5
+#define DFCS_SCROLLSIZEGRIP 8
+#define DFCS_SCROLLSIZEGRIPRIGHT 16
+#define DFCS_BUTTONCHECK 0
+#define DFCS_BUTTONRADIOIMAGE 1
+#define DFCS_BUTTONRADIOMASK 2
+#define DFCS_BUTTONRADIO 4
+#define DFCS_BUTTON3STATE 8
+#define DFCS_BUTTONPUSH 16
+#define DFCS_INACTIVE 256
+#define DFCS_PUSHED 512
+#define DFCS_CHECKED 1024
+
+#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K
+#define DFCS_TRANSPARENT 0x800
+#define DFCS_HOT 0x1000
#endif
-#define DFCS_ADJUSTRECT 0x2000
-#define DFCS_FLAT 0x4000
-#define DFCS_MONO 0x8000
-#define DST_COMPLEX 0
-#define DST_TEXT 1
-#define DST_PREFIXTEXT 2
-#define DST_ICON 3
-#define DST_BITMAP 4
-#define DSS_NORMAL 0
-#define DSS_UNION 16
-#define DSS_DISABLED 32
-#define DSS_MONO 128
-#define DSS_RIGHT 0x8000
-#define DT_BOTTOM 8
-#define DT_CALCRECT 1024
-#define DT_CENTER 1
-#define DT_EDITCONTROL 8192
-#define DT_END_ELLIPSIS 32768
-#define DT_PATH_ELLIPSIS 16384
-#define DT_WORD_ELLIPSIS 0x40000
-#define DT_EXPANDTABS 64
-#define DT_EXTERNALLEADING 512
-#define DT_LEFT 0
-#define DT_MODIFYSTRING 65536
-#define DT_NOCLIP 256
-#define DT_NOPREFIX 2048
-#define DT_RIGHT 2
-#define DT_RTLREADING 131072
-#define DT_SINGLELINE 32
-#define DT_TABSTOP 128
-#define DT_TOP 0
-#define DT_VCENTER 4
-#define DT_WORDBREAK 16
-#define DT_INTERNAL 4096
-#define WB_ISDELIMITER 2
-#define WB_LEFT 0
-#define WB_RIGHT 1
-#define SB_HORZ 0
-#define SB_VERT 1
-#define SB_CTL 2
-#define SB_BOTH 3
-#define ESB_DISABLE_BOTH 3
-#define ESB_DISABLE_DOWN 2
-#define ESB_DISABLE_LEFT 1
-#define ESB_DISABLE_LTUP 1
-#define ESB_DISABLE_RIGHT 2
-#define ESB_DISABLE_RTDN 2
-#define ESB_DISABLE_UP 1
-#define ESB_ENABLE_BOTH 0
-#define SB_LINEUP 0
-#define SB_LINEDOWN 1
-#define SB_LINELEFT 0
-#define SB_LINERIGHT 1
-#define SB_PAGEUP 2
-#define SB_PAGEDOWN 3
-#define SB_PAGELEFT 2
-#define SB_PAGERIGHT 3
-#define SB_THUMBPOSITION 4
-#define SB_THUMBTRACK 5
-#define SB_ENDSCROLL 8
-#define SB_LEFT 6
-#define SB_RIGHT 7
-#define SB_BOTTOM 7
-#define SB_TOP 6
-#define IS_INTRESOURCE(i) (((ULONG_PTR)(i) >> 16) == 0)
-#define MAKEINTRESOURCEA(i) (LPSTR)((DWORD)((WORD)(i)))
-#define MAKEINTRESOURCEW(i) (LPWSTR)((DWORD)((WORD)(i)))
+
+#define DFCS_ADJUSTRECT 0x2000
+#define DFCS_FLAT 0x4000
+#define DFCS_MONO 0x8000
+#define DST_COMPLEX 0
+#define DST_TEXT 1
+#define DST_PREFIXTEXT 2
+#define DST_ICON 3
+#define DST_BITMAP 4
+#define DSS_NORMAL 0
+#define DSS_UNION 16
+#define DSS_DISABLED 32
+#define DSS_MONO 128
+#define DSS_RIGHT 0x8000
+#define DT_BOTTOM 8
+#define DT_CALCRECT 1024
+#define DT_CENTER 1
+#define DT_EDITCONTROL 8192
+#define DT_END_ELLIPSIS 32768
+#define DT_PATH_ELLIPSIS 16384
+#define DT_WORD_ELLIPSIS 0x40000
+#define DT_EXPANDTABS 64
+#define DT_EXTERNALLEADING 512
+#define DT_LEFT 0
+#define DT_MODIFYSTRING 65536
+#define DT_NOCLIP 256
+#define DT_NOPREFIX 2048
+#define DT_RIGHT 2
+#define DT_RTLREADING 131072
+#define DT_SINGLELINE 32
+#define DT_TABSTOP 128
+#define DT_TOP 0
+#define DT_VCENTER 4
+#define DT_WORDBREAK 16
+#define DT_INTERNAL 4096
+#define WB_ISDELIMITER 2
+#define WB_LEFT 0
+#define WB_RIGHT 1
+#define SB_HORZ 0
+#define SB_VERT 1
+#define SB_CTL 2
+#define SB_BOTH 3
+#define ESB_DISABLE_BOTH 3
+#define ESB_DISABLE_DOWN 2
+#define ESB_DISABLE_LEFT 1
+#define ESB_DISABLE_LTUP 1
+#define ESB_DISABLE_RIGHT 2
+#define ESB_DISABLE_RTDN 2
+#define ESB_DISABLE_UP 1
+#define ESB_ENABLE_BOTH 0
+#define SB_LINEUP 0
+#define SB_LINEDOWN 1
+#define SB_LINELEFT 0
+#define SB_LINERIGHT 1
+#define SB_PAGEUP 2
+#define SB_PAGEDOWN 3
+#define SB_PAGELEFT 2
+#define SB_PAGERIGHT 3
+#define SB_THUMBPOSITION 4
+#define SB_THUMBTRACK 5
+#define SB_ENDSCROLL 8
+#define SB_LEFT 6
+#define SB_RIGHT 7
+#define SB_BOTTOM 7
+#define SB_TOP 6
+#define IS_INTRESOURCE(i) (((ULONG_PTR)(i) >> 16) == 0)
+#define MAKEINTRESOURCEA(i) (LPSTR)((DWORD)((WORD)(i)))
+#define MAKEINTRESOURCEW(i) (LPWSTR)((DWORD)((WORD)(i)))
+
#ifndef XFree86Server
-# define RT_CURSOR MAKEINTRESOURCE(1)
-# define RT_FONT MAKEINTRESOURCE(8)
-#endif /* ndef XFree86Server */
-#define RT_BITMAP MAKEINTRESOURCE(2)
-#define RT_ICON MAKEINTRESOURCE(3)
-#define RT_MENU MAKEINTRESOURCE(4)
-#define RT_DIALOG MAKEINTRESOURCE(5)
-#defi...
[truncated message content] |