mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 17:52:56 +00:00
explorer: handle child window creation errors
svn path=/trunk/; revision=24143
This commit is contained in:
parent
bb1f92d0d3
commit
a06bdc9503
1 changed files with 9 additions and 1 deletions
|
@ -246,9 +246,12 @@ FileChildWindow::FileChildWindow(HWND hwnd, const FileChildWndInfo& info)
|
||||||
|
|
||||||
_header_wdths_ok = false;
|
_header_wdths_ok = false;
|
||||||
|
|
||||||
|
if (!_left_hwnd && !_right_hwnd)
|
||||||
|
return;
|
||||||
|
|
||||||
if (entry)
|
if (entry)
|
||||||
set_curdir(entry);
|
set_curdir(entry);
|
||||||
else
|
else if (_root._entry)
|
||||||
set_curdir(_root._entry);
|
set_curdir(_root._entry);
|
||||||
|
|
||||||
if (_left_hwnd) {
|
if (_left_hwnd) {
|
||||||
|
@ -391,6 +394,11 @@ FileChildWindow* FileChildWindow::create(const FileChildWndInfo& info)
|
||||||
FileChildWindow* child = static_cast<FileChildWindow*>(
|
FileChildWindow* child = static_cast<FileChildWindow*>(
|
||||||
create_mdi_child(info, mcs, WINDOW_CREATOR_INFO(FileChildWindow,FileChildWndInfo)));
|
create_mdi_child(info, mcs, WINDOW_CREATOR_INFO(FileChildWindow,FileChildWndInfo)));
|
||||||
|
|
||||||
|
if (!child->_left_hwnd && !child->_right_hwnd) {
|
||||||
|
SendMessage(info._hmdiclient, WM_MDIDESTROY, (WPARAM)child->_hwnd, 0);
|
||||||
|
MessageBox(info._hmdiclient, TEXT("Error opening child window"), TEXT("ROS Explorer"), MB_OK);
|
||||||
|
}
|
||||||
|
|
||||||
return child;
|
return child;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue