Commit c8249bfb authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/skins/win32/*: fixed a problem with drag&drop when restarting the skins engine.
parent 46c6826d
......@@ -2,7 +2,7 @@
* win32_theme.cpp: Win32 implementation of the Theme class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: win32_theme.cpp,v 1.11 2003/10/23 16:00:48 gbazin Exp $
* $Id: win32_theme.cpp,v 1.12 2003/10/30 17:59:12 gbazin Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -172,6 +172,9 @@ Win32Theme::Win32Theme( intf_thread_t *_p_intf ) : Theme( _p_intf )
}
}
// Initialize the OLE library
OleInitialize( NULL );
//Initialize value
ParentWindow = NULL;
......@@ -201,6 +204,9 @@ Win32Theme::~Win32Theme()
{
DestroyWindow( ParentWindow );
}
// Uninitialize the OLE library
OleUninitialize();
}
//---------------------------------------------------------------------------
void Win32Theme::OnLoadTheme()
......
......@@ -2,7 +2,7 @@
* win32_window.cpp: Win32 implementation of the Window class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: win32_window.cpp,v 1.14 2003/10/22 19:12:56 ipkiss Exp $
* $Id: win32_window.cpp,v 1.15 2003/10/30 17:59:12 gbazin Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -99,8 +99,6 @@ Win32Window::Win32Window( intf_thread_t *p_intf, HWND hwnd, int x, int y,
// Drag & drop
if( DragDrop )
{
// Initialize the OLE library
OleInitialize( NULL );
DropTarget = (LPDROPTARGET) new Win32DropObject( playondrop );
// register the listview as a drop target
RegisterDragDrop( hWnd, DropTarget );
......@@ -112,21 +110,21 @@ Win32Window::~Win32Window()
delete CursorPos;
delete WindowPos;
if( hWnd != NULL )
{
DestroyWindow( hWnd );
}
if( ToolTipWindow != NULL )
{
DestroyWindow( ToolTipWindow );
}
if( DragDrop )
if( hWnd != NULL )
{
// Remove the listview from the list of drop targets
RevokeDragDrop( hWnd );
DropTarget->Release();
// Uninitialize the OLE library
OleUninitialize();
if( DragDrop )
{
// Remove the listview from the list of drop targets
RevokeDragDrop( hWnd );
DropTarget->Release();
}
DestroyWindow( hWnd );
}
}
//---------------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment