1 // Copyright 2018 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef BASE_WIN_WINDOWSX_SHIM_H_ 6 #define BASE_WIN_WINDOWSX_SHIM_H_ 7 8 // The Win32 platform header <windowsx.h> contains some macros for 9 // common function names. To work around that, windowsx.h is not to be 10 // included directly, and instead this file should be included. If one 11 // of the removed Win32 macros is wanted, use the expanded form 12 // manually instead. 13 14 #ifdef _INC_WINDOWS_X 15 #error "There is an include of windowsx.h in the code. Use windowsx_shim.h" 16 #endif // _INC_WINDOWS_X 17 18 #include <windowsx.h> 19 20 #undef GetNextSibling // Same as GetWindow(hwnd, GW_HWNDNEXT) 21 #undef GetFirstChild // Same as GetTopWindow(hwnd) 22 #undef IsMaximized // Defined to IsZoomed, use IsZoomed directly instead 23 #undef IsMinimized // Defined to IsIconic, use IsIconic directly instead 24 #undef IsRestored // Macro to check that neither WS_MINIMIZE, nor 25 // WS_MAXIMIZE is set in the GetWindowStyle return 26 // value. 27 28 #endif // BASE_WIN_WINDOWSX_SHIM_H_ 29