Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: ui/base/win/window_impl.cc

Issue 6880201: Scrap WNDCLASSEX.hCursor, update GetCursorForPoint, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use brace style struct init for WNDCLASSEX |class_ex|, fix comment. Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/content_setting_bubble_contents.cc ('k') | views/controls/link.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/win/window_impl.cc
diff --git a/ui/base/win/window_impl.cc b/ui/base/win/window_impl.cc
index d265621de07f51e4550e241fdcc5c53fd39ce6a8..7c4a6cde14312705b207a911b83d869afd3962d8 100644
--- a/ui/base/win/window_impl.cc
+++ b/ui/base/win/window_impl.cc
@@ -197,20 +197,23 @@ std::wstring WindowImpl::GetWindowClassName() {
if (ClassRegistrar::GetInstance()->RetrieveClassName(class_info, &name))
return name;
+ HICON icon = GetDefaultWindowIcon();
+
// No class found, need to register one.
- WNDCLASSEX class_ex;
- class_ex.cbSize = sizeof(WNDCLASSEX);
- class_ex.style = class_info.style;
- class_ex.lpfnWndProc = base::win::WrappedWindowProc<&WindowImpl::WndProc>;
- class_ex.cbClsExtra = 0;
- class_ex.cbWndExtra = 0;
- class_ex.hInstance = NULL;
- class_ex.hIcon = GetDefaultWindowIcon();
- class_ex.hCursor = LoadCursor(NULL, IDC_ARROW);
- class_ex.hbrBackground = reinterpret_cast<HBRUSH>(class_info.background + 1);
- class_ex.lpszMenuName = NULL;
- class_ex.lpszClassName = name.c_str();
- class_ex.hIconSm = class_ex.hIcon;
+ WNDCLASSEX class_ex = {
+ sizeof(WNDCLASSEX),
+ class_info.style,
+ base::win::WrappedWindowProc<&WindowImpl::WndProc>,
+ 0,
+ 0,
+ NULL,
+ icon,
+ NULL,
+ reinterpret_cast<HBRUSH>(class_info.background + 1),
+ NULL,
+ name.c_str(),
+ icon
+ };
ATOM atom = RegisterClassEx(&class_ex);
CHECK(atom) << GetLastError();
« no previous file with comments | « chrome/browser/ui/views/content_setting_bubble_contents.cc ('k') | views/controls/link.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698