Add wxEnhMetaFile::Detach().
Allow getting the handle from this class, this is useful if it needs to be passed to some other library, for example. Closes #15706. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -52,13 +52,21 @@ public:
|
||||
// this method
|
||||
bool SetClipboard(int width = 0, int height = 0);
|
||||
|
||||
// Detach the HENHMETAFILE from this object, i.e. don't delete the handle
|
||||
// in the dtor -- the caller is now responsible for doing this, e.g. using
|
||||
// Free() method below.
|
||||
WXHANDLE Detach() { WXHANDLE h = m_hMF; m_hMF = 0; return h; }
|
||||
|
||||
// Destroy the given HENHMETAFILE object.
|
||||
static void Free(WXHANDLE handle);
|
||||
|
||||
// implementation
|
||||
WXHANDLE GetHENHMETAFILE() const { return m_hMF; }
|
||||
void SetHENHMETAFILE(WXHANDLE hMF) { Free(); m_hMF = hMF; }
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
void Free();
|
||||
void Free() { Free(m_hMF); }
|
||||
void Assign(const wxEnhMetaFile& mf);
|
||||
|
||||
// we don't use these functions (but probably should) but have to implement
|
||||
|
Reference in New Issue
Block a user