diff options
author | Tino Rachui <tra@openoffice.org> | 2001-07-09 11:57:23 +0000 |
---|---|---|
committer | Tino Rachui <tra@openoffice.org> | 2001-07-09 11:57:23 +0000 |
commit | 099c4fe04c39af1ccecdeec0652fef05fbe16ea0 (patch) | |
tree | 9948b251a21b810d5ea64396dfda84625e2cd259 /fpicker/source/win32/filepicker/dibpreview.hxx | |
parent | b522a925fb15f5a01ec885fc7ae8f4e52681acf6 (diff) |
now multi-instance able
Diffstat (limited to 'fpicker/source/win32/filepicker/dibpreview.hxx')
-rw-r--r-- | fpicker/source/win32/filepicker/dibpreview.hxx | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/fpicker/source/win32/filepicker/dibpreview.hxx b/fpicker/source/win32/filepicker/dibpreview.hxx index f710e00195d6..b108b33af20b 100644 --- a/fpicker/source/win32/filepicker/dibpreview.hxx +++ b/fpicker/source/win32/filepicker/dibpreview.hxx @@ -2,9 +2,9 @@ * * $RCSfile: dibpreview.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: tra $ $Date: 2001-06-28 11:13:03 $ + * last change: $Author: tra $ $Date: 2001-07-09 12:57:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -74,6 +74,10 @@ #include <com/sun/star/uno/Sequence.hxx> #endif +#ifndef _OSL_MUTEX_HXX_ +#include <osl/mutex.hxx> +#endif + #include <windows.h> //--------------------------------------------- @@ -130,17 +134,25 @@ public: private: virtual void SAL_CALL onPaint( HWND hWnd, HDC hDC ); + + ATOM SAL_CALL RegisterDibPreviewWindowClass( ); + void SAL_CALL UnregisterDibPreviewWindowClass( ); + static LRESULT CALLBACK WndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); private: HWND m_hwnd; - ATOM m_ClassAtom; HINSTANCE m_hInstance; ::com::sun::star::uno::Sequence< sal_Int8 > m_ImageData; sal_Int32 m_cx; sal_Int32 m_cy; - static CDIBPreview* s_DIBPreviewInst; + // the preview window class has to be registered only + // once per process, so multiple instance of this class + // share the registered window class + static ATOM s_ClassAtom; + static osl::Mutex s_Mutex; + static sal_Int32 s_RegisterDibPreviewWndCount; // prevent copy and assignment private: |