diff options
Diffstat (limited to 'views/widget')
-rw-r--r-- | views/widget/widget_win.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc index a2075c1..76f58e4 100644 --- a/views/widget/widget_win.cc +++ b/views/widget/widget_win.cc @@ -470,7 +470,9 @@ void WidgetWin::OnCommand(UINT notification_code, int command_id, HWND window) { } LRESULT WidgetWin::OnCreate(CREATESTRUCT* create_struct) { - SetNativeWindowProperty(kWidgetKey, this); + // Widget::GetWidgetFromNativeView expects the contents of this property + // to be of type Widget, so the cast is necessary. + SetNativeWindowProperty(kWidgetKey, static_cast<Widget*>(this)); return 0; } |