X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ddea7eb61476571b80c2f52c2689680229595fec..5d19b6acd1d401989b82cfd36869c8936bbc3c70:/include/wx/msw/private.h?ds=inline diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index f21b7a5d5b..7f26ece1cb 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -398,16 +398,13 @@ private: DECLARE_NO_COPY_CLASS(SelectInHDC) }; -#ifdef __WATCOM__ -//FIXME why does watcom dislike this ?? CE 05 April 2003 - // when working with global pointers (which is unfortunately still necessary // sometimes, e.g. for clipboard) it is important to unlock them exactly as // many times as we lock them which just asks for using a "smart lock" class -class GlobalHandle +class GlobalPtr { public: - GlobalHandle(HGLOBAL hGlobal) : m_hGlobal(hGlobal) + GlobalPtr(HGLOBAL hGlobal) : m_hGlobal(hGlobal) { m_ptr = ::GlobalLock(hGlobal); if ( !m_ptr ) @@ -416,7 +413,7 @@ public: } } - ~GlobalHandle() + ~GlobalPtr() { if ( !::GlobalUnlock(m_hGlobal) ) { @@ -437,10 +434,9 @@ private: HGLOBAL m_hGlobal; void *m_ptr; - DECLARE_NO_COPY_CLASS(GlobalHandle) + DECLARE_NO_COPY_CLASS(GlobalPtr) }; -#endif //__WATCOM__ // --------------------------------------------------------------------------- // macros to make casting between WXFOO and FOO a bit easier: the GetFoo() // returns Foo cast to the Windows type for oruselves, while GetFooOf() takes