git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20203
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
-//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
// 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
- GlobalHandle(HGLOBAL hGlobal) : m_hGlobal(hGlobal)
+ GlobalPtr(HGLOBAL hGlobal) : m_hGlobal(hGlobal)
{
m_ptr = ::GlobalLock(hGlobal);
if ( !m_ptr )
{
m_ptr = ::GlobalLock(hGlobal);
if ( !m_ptr )
{
if ( !::GlobalUnlock(m_hGlobal) )
{
{
if ( !::GlobalUnlock(m_hGlobal) )
{
HGLOBAL m_hGlobal;
void *m_ptr;
HGLOBAL m_hGlobal;
void *m_ptr;
- DECLARE_NO_COPY_CLASS(GlobalHandle)
+ DECLARE_NO_COPY_CLASS(GlobalPtr)
- if ( !ConvertFromBitmap((BITMAPINFO *)GlobalHandle(hDIB), hbmp) )
+ if ( !ConvertFromBitmap((BITMAPINFO *)GlobalPtr(hDIB), hbmp) )
{
// this really shouldn't happen... it worked the first time, why not
// now?
{
// this really shouldn't happen... it worked the first time, why not
// now?
- WXHBITMAP newBitmap = CreateMappedBitmap(hInstance, GlobalHandle(hDIB));
+ WXHBITMAP newBitmap = CreateMappedBitmap(hInstance, GlobalPtr(hDIB));