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
commit00b3aa66248169c36eb3a2bda588099497a07513 (patch)
tree1a3c282dd5e30a5f0b381599fc3a5c5c16c9dc16 /avmedia
parentf22a3f50ef309a89a5aa3158a0f75424bbf4b6b5 (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 2c315eae3947..a0c2b24ef899 100644
--- a/avmedia/source/win/window.cxx
+++ b/avmedia/source/win/window.cxx
@@ -323,11 +323,23 @@ 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 )
{
::SetWindowLong( (HWND) mnFrameWnd, 0, (DWORD) this );