summaryrefslogtreecommitdiffstats
path: root/ui/base/clipboard/clipboard_win.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/base/clipboard/clipboard_win.cc')
-rw-r--r--ui/base/clipboard/clipboard_win.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
index 8b2eaea..3fa071f 100644
--- a/ui/base/clipboard/clipboard_win.cc
+++ b/ui/base/clipboard/clipboard_win.cc
@@ -188,12 +188,13 @@ Clipboard::FormatType Clipboard::FormatType::Deserialize(
Clipboard::Clipboard() : create_window_(false) {
if (MessageLoop::current()->type() == MessageLoop::TYPE_UI) {
// Make a dummy HWND to be the clipboard's owner.
- WNDCLASSEX wcex = {0};
- wcex.cbSize = sizeof(WNDCLASSEX);
- wcex.lpfnWndProc = base::win::WrappedWindowProc<ClipboardOwnerWndProc>;
- wcex.hInstance = GetModuleHandle(NULL);
- wcex.lpszClassName = L"ClipboardOwnerWindowClass";
- ::RegisterClassEx(&wcex);
+ WNDCLASSEX window_class;
+ base::win::InitializeWindowClass(
+ L"ClipboardOwnerWindowClass",
+ &base::win::WrappedWindowProc<ClipboardOwnerWndProc>,
+ 0, 0, 0, NULL, NULL, NULL, NULL, NULL,
+ &window_class);
+ ::RegisterClassEx(&window_class);
create_window_ = true;
}