Merge branch 'hotfix-1.4.1' into develop

This commit is contained in:
Jinhao 2017-03-20 06:39:24 +08:00
commit afc97ab230
2 changed files with 4 additions and 1 deletions

View File

@ -181,7 +181,7 @@ namespace API
template<typename Widget=::nana::widget, typename EnumFunction>
void enum_widgets(window wd, bool recursive, EnumFunction && fn)
{
static_assert(std::is_convertible<Widget, ::nana::widget>::value, "enum_widgets<Widget>: The specified Widget is not a widget type.");
static_assert(std::is_convertible<typename std::decay<Widget>::type*, ::nana::widget*>::value, "enum_widgets<Widget>: The specified Widget is not a widget type.");
detail::enum_widgets_function<Widget, EnumFunction> enum_fn(static_cast<EnumFunction&&>(fn));
enum_fn.enum_widgets(wd, recursive);

View File

@ -997,6 +997,9 @@ namespace nana
OPENFILENAME ofn;
memset(&ofn, 0, sizeof ofn);
internal_scope_guard lock;
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = reinterpret_cast<HWND>(API::root(impl_->owner));
ofn.lpstrFile = &(wfile[0]);