Fix for Bugzilla Entry 330: Correctly handle WM_COMMAND messages in web windows without web control

svn path=/trunk/; revision=18379
This commit is contained in:
Martin Fuchs 2005-10-09 15:16:41 +00:00
parent 3edf5a41cc
commit f8879f3de8

View file

@ -247,46 +247,47 @@ LRESULT WebChildWindow::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
return TRUE; return TRUE;
case PM_DISPATCH_COMMAND: { case PM_DISPATCH_COMMAND: {
if (_control) { if (!_control)
HRESULT hr = E_FAIL; return FALSE;
switch(LOWORD(wparam)) { HRESULT hr = E_FAIL;
case ID_GO_BACK:
hr = _control->GoBack();
break;
case ID_GO_FORWARD: switch(LOWORD(wparam)) {
hr = _control->GoForward(); case ID_GO_BACK:
break; hr = _control->GoBack();
break;
case ID_GO_UP: case ID_GO_FORWARD:
///@todo hr = _control->GoForward();
break; break;
case ID_GO_HOME: case ID_GO_UP:
hr = _control->GoHome(); ///@todo
break; break;
case ID_GO_SEARCH: case ID_GO_HOME:
hr = _control->GoSearch(); hr = _control->GoHome();
break; break;
case ID_REFRESH: case ID_GO_SEARCH:
hr = _control->Refresh(); hr = _control->GoSearch();
break; break;
case ID_STOP: case ID_REFRESH:
hr = _control->Stop(); hr = _control->Refresh();
break; break;
default: case ID_STOP:
return super::WndProc(nmsg, wparam, lparam); hr = _control->Stop();
} break;
if (FAILED(hr) && hr!=E_FAIL) default:
THROW_EXCEPTION(hr); return super::WndProc(nmsg, wparam, lparam);
} }
if (FAILED(hr) && hr!=E_FAIL)
THROW_EXCEPTION(hr);
return TRUE;} return TRUE;}
default: default: