summaryrefslogtreecommitdiff
path: root/avmedia
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-09-29 11:39:44 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-09-29 11:39:44 +0000
commit9b81feb1b76d2389cf725cd05578e3ce4b62dbe5 (patch)
tree4491c85d73031790bc421cd72186c2ab2422c2da /avmedia
parent0056e03d5aff6c661fb5b0f6783574c387348f16 (diff)
CWS-TOOLING: integrate CWS impress160_DEV300
Diffstat (limited to 'avmedia')
-rw-r--r--avmedia/source/win/window.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/avmedia/source/win/window.cxx b/avmedia/source/win/window.cxx
index ca697ad7f8..b771504f7d 100644
--- a/avmedia/source/win/window.cxx
+++ b/avmedia/source/win/window.cxx
@@ -323,10 +323,22 @@ bool Window::create( const uno::Sequence< uno::Any >& rArguments )
rArguments[ 1 ] >>= aRect;
mnParentWnd = static_cast<int>(nWnd);
+
mnFrameWnd = (int) ::CreateWindow( mpWndClass->lpszClassName, NULL,
WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
aRect.X, aRect.Y, aRect.Width, aRect.Height,
(HWND) mnParentWnd, NULL, mpWndClass->hInstance, 0 );
+
+ // if the last CreateWindow failed...
+ if( mnFrameWnd == 0 )
+ {
+ // try again and this time assume that mnParent is indeed a dc
+ mnParentWnd = reinterpret_cast<int>(::WindowFromDC( (HDC)mnParentWnd ));
+ mnFrameWnd = (int) ::CreateWindow( mpWndClass->lpszClassName, NULL,
+ WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
+ aRect.X, aRect.Y, aRect.Width, aRect.Height,
+ (HWND)mnParentWnd , NULL, mpWndClass->hInstance, 0 );
+ }
if( mnFrameWnd )
{