call wxOle[Un]Initialize() in wxClipboard ctor/dtor to ensure that when wxTheClipboard is destroyed at program shutdown and its Clear() method is called OLE is still initialized
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -28,10 +28,6 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/setup.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_CLIPBOARD
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
@@ -54,6 +50,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "wx/msw/private.h"
|
||||
#include "wx/msw/ole/oleutils.h"
|
||||
|
||||
#if wxUSE_WXDIB
|
||||
#include "wx/msw/dib.h"
|
||||
@@ -534,6 +531,10 @@ IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject)
|
||||
|
||||
wxClipboard::wxClipboard()
|
||||
{
|
||||
#if wxUSE_OLE_CLIPBOARD
|
||||
wxOleInitialize();
|
||||
#endif
|
||||
|
||||
m_clearOnExit = false;
|
||||
m_isOpened = false;
|
||||
}
|
||||
@@ -544,6 +545,10 @@ wxClipboard::~wxClipboard()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
#if wxUSE_OLE_CLIPBOARD
|
||||
wxOleUninitialize();
|
||||
#endif
|
||||
}
|
||||
|
||||
void wxClipboard::Clear()
|
||||
|
Reference in New Issue
Block a user