From: David Webster Date: Thu, 9 Mar 2000 21:06:48 +0000 (+0000) Subject: More framework fixes and fixes for building dlls. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9add53a47066780852fabe9c1b7611352a39fa20?ds=sidebyside More framework fixes and fixes for building dlls. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/os2/gdiimage.h b/include/wx/os2/gdiimage.h index db980074f7..2dff008de0 100644 --- a/include/wx/os2/gdiimage.h +++ b/include/wx/os2/gdiimage.h @@ -47,7 +47,12 @@ public: } // accessors - bool IsOk() const { return m_hHandle != 0; } + bool IsOk() const + { + if (m_hHandle == 0) + return FALSE; + return TRUE; + } void SetSize( int nW ,int nH @@ -55,7 +60,7 @@ public: { m_nWidth = nW; m_nHeight = nH; } // free the ressources we allocated - virtual void Free() = 0; + virtual void Free() { }; // for compatibility, the member fields are public @@ -170,9 +175,23 @@ public: // accessors WXHANDLE GetHandle() const - { return IsNull() ? 0 : GetGDIImageData()->m_hHandle; } + { + wxGDIImageRefData* pData; + + pData = GetGDIImageData(); + if (!pData) + return 0; + else + return pData->m_hHandle; + } void SetHandle(WXHANDLE hHandle) - { EnsureHasData(); GetGDIImageData()->m_hHandle = hHandle; } + { + wxGDIImageRefData* pData; + + EnsureHasData(); + pData = GetGDIImageData(); + pData->m_hHandle = hHandle; + } bool Ok() const { return GetHandle() != 0; } diff --git a/include/wx/os2/icon.h b/include/wx/os2/icon.h index f2f109c2fb..383fd39e16 100644 --- a/include/wx/os2/icon.h +++ b/include/wx/os2/icon.h @@ -73,7 +73,7 @@ public: ); inline wxIcon& operator = (const wxIcon& rIcon) - { if (*this == rIcon) Ref(rIcon); return *this; } + { if (*this != rIcon) Ref(rIcon); return *this; } inline bool operator == (const wxIcon& rIcon) { return m_refData == rIcon.m_refData; } inline bool operator != (const wxIcon& rIcon) diff --git a/include/wx/os2/notebook.h b/include/wx/os2/notebook.h index fece36062d..6dcd73855b 100644 --- a/include/wx/os2/notebook.h +++ b/include/wx/os2/notebook.h @@ -28,7 +28,7 @@ class WXDLLEXPORT wxWindow; // array of notebook pages typedef wxWindow WXDLLEXPORT wxNotebookPage; // so far, any window can be a page -WX_DEFINE_ARRAY(wxNotebookPage *, wxArrayPages); +WX_DEFINE_ARRAY(wxNotebookPage *, wxArrayNBPages); // ---------------------------------------------------------------------------- // wxNotebook @@ -151,7 +151,7 @@ protected: void ChangePage(int nOldSel, int nSel); // change pages wxImageList *m_pImageList; // we can have an associated image list - wxArrayPages m_aPages; // array of pages + wxArrayNBPages m_aPages; // array of pages int m_nSelection; // the current selection (-1 if none)