OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 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 |
| 5 #ifndef APP_WIN_HWND_UTIL_H_ |
| 6 #define APP_WIN_HWND_UTIL_H_ |
| 7 #pragma once |
| 8 |
| 9 #include <windows.h> |
| 10 |
| 11 #include "base/string16.h" |
| 12 |
| 13 namespace app { |
| 14 namespace win { |
| 15 |
| 16 // A version of the GetClassNameW API that returns the class name in an |
| 17 // string16. An empty result indicates a failure to get the class name. |
| 18 string16 GetClassName(HWND hwnd); |
| 19 |
| 20 // Useful for subclassing a HWND. Returns the previous window procedure. |
| 21 WNDPROC SetWindowProc(HWND hwnd, WNDPROC wndproc); |
| 22 |
| 23 // Pointer-friendly wrappers around Get/SetWindowLong(..., GWLP_USERDATA, ...) |
| 24 // Returns the previously set value. |
| 25 void* SetWindowUserData(HWND hwnd, void* user_data); |
| 26 void* GetWindowUserData(HWND hwnd); |
| 27 |
| 28 } // namespace win |
| 29 } // namespace app |
| 30 |
| 31 #endif // APP_WIN_HWND_UTIL_H_ |
OLD | NEW |