Commit 3755fe14 authored by Robert Liao's avatar Robert Liao Committed by Commit Bot

Jumbo Build Fix: Fix windowsx.h Conflict with HwndMessageHandler::IsMaximized...

Jumbo Build Fix: Fix windowsx.h Conflict with HwndMessageHandler::IsMaximized and HwndMessageHandler::IsMinimized

windowsx.h defines the following which break HwndMessageHandler:

BUG=
TBR=sky@chromium.org
Windows jumbo build break.

Change-Id: Icc2feeb8496ee80fa59f40b2f21850af1197fdd0
Reviewed-on: https://chromium-review.googlesource.com/c/1263115Reviewed-by: default avatarRobert Liao <robliao@chromium.org>
Commit-Queue: Robert Liao <robliao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596912}
parent 677fa16d
......@@ -4,9 +4,6 @@
#include "ui/views/corewm/tooltip_win.h"
#include <windowsx.h>
#include <winuser.h>
#include "base/debug/stack_trace.h"
#include "base/i18n/rtl.h"
#include "base/logging.h"
......@@ -21,6 +18,22 @@
namespace views {
namespace corewm {
namespace {
// Substitute GetWindowFont() from windowsx.h.
// Do not include windowsx.h as its macros break the views jumbo build.
HFONT GetWindowFont(HWND hwnd) {
return reinterpret_cast<HFONT>(::SendMessage(hwnd, WM_GETFONT, 0, 0));
}
// Substitute SetWindowFont() from windowsx.h.
// Do not include windowsx.h as its macros break the views jumbo build.
void SetWindowFont(HWND hwnd, HFONT hfont, BOOL fRedraw) {
::SendMessage(hwnd, WM_SETFONT, reinterpret_cast<WPARAM>(hfont), fRedraw);
}
} // namespace
TooltipWin::TooltipWin(HWND parent)
: parent_hwnd_(parent),
tooltip_hwnd_(NULL),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment