diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-25 21:10:32 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-25 21:10:32 +0000 |
commit | f5cb25824d8c48b0d79ac7ebc1726d135d8f1966 (patch) | |
tree | 0779ea31b9a7c377f6a02e508a27c76843f50810 /base/win_util.cc | |
parent | a19b192312a88561389ce827765e92c1ece16bf7 (diff) | |
download | chromium_src-f5cb25824d8c48b0d79ac7ebc1726d135d8f1966.zip chromium_src-f5cb25824d8c48b0d79ac7ebc1726d135d8f1966.tar.gz chromium_src-f5cb25824d8c48b0d79ac7ebc1726d135d8f1966.tar.bz2 |
Review URL: http://codereview.chromium.org/12434
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5990 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/win_util.cc')
-rw-r--r-- | base/win_util.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/win_util.cc b/base/win_util.cc index 37c5075..cfd7f2b 100644 --- a/base/win_util.cc +++ b/base/win_util.cc @@ -257,6 +257,12 @@ void* GetWindowUserData(HWND hwnd) { // installed. static const wchar_t* const kHandlerKey = L"__ORIGINAL_MESSAGE_HANDLER__"; +bool IsSubclassed(HWND window, WNDPROC subclass_proc) { + WNDPROC original_handler = + reinterpret_cast<WNDPROC>(GetWindowLongPtr(window, GWLP_WNDPROC)); + return original_handler == subclass_proc; +} + bool Subclass(HWND window, WNDPROC subclass_proc) { WNDPROC original_handler = reinterpret_cast<WNDPROC>(GetWindowLongPtr(window, GWLP_WNDPROC)); |