windowsx_shim.h 1.1 KB

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