Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/ieframe/oleobject.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/dlls/ieframe/oleobject.c b/dlls/ieframe/oleobject.c index 5c49845aa7..b0e166897a 100644 --- a/dlls/ieframe/oleobject.c +++ b/dlls/ieframe/oleobject.c @@ -740,6 +740,22 @@ static HRESULT WINAPI OleObject_SetExtent(IOleObject *iface, DWORD dwDrawAspect,
TRACE("(%p)->(%x %p)\n", This, dwDrawAspect, psizel);
+ if(This->shell_embedding_hwnd) { + LONG dpi_x, dpi_y, width, height; + HDC hdc; + + hdc = GetDC(0); + dpi_x = GetDeviceCaps(hdc, LOGPIXELSX); + dpi_y = GetDeviceCaps(hdc, LOGPIXELSY); + ReleaseDC(0, hdc); + + width = MulDiv(psizel->cx, dpi_x, 2540); + height = MulDiv(psizel->cy, dpi_y, 2540); + + SetWindowPos(This->shell_embedding_hwnd, NULL, + 0, 0, width, height, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE); + } + /* Tests show that dwDrawAspect is ignored */ This->extent = *psizel; return S_OK;