]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/cshelp.cpp
re-renamed DoCreate() to XmDoCreateTLW() to avoid virtual function hiding in other...
[wxWidgets.git] / src / common / cshelp.cpp
index b8d7e4b7b2a17d4b85d8bad9a02ab2129a0085b4..7e4d11a93bec3bc56a95fb4f4b292bd0b6b1c4a3 100644 (file)
 // declarations
 // ============================================================================
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "cshelp.h"
-#endif
-
 // ----------------------------------------------------------------------------
 // headers
 // ----------------------------------------------------------------------------
@@ -334,9 +330,11 @@ wxHelpProvider::~wxHelpProvider()
 // wxSimpleHelpProvider
 // ----------------------------------------------------------------------------
 
+#define WINHASH_KEY(w) wxPtrToUInt(w)
+
 wxString wxSimpleHelpProvider::GetHelp(const wxWindowBase *window)
 {
-    wxLongToStringHashMap::iterator it = m_hashWindows.find((long)window);
+    wxLongToStringHashMap::iterator it = m_hashWindows.find(WINHASH_KEY(window));
 
     if ( it == m_hashWindows.end() )
     {
@@ -350,8 +348,8 @@ wxString wxSimpleHelpProvider::GetHelp(const wxWindowBase *window)
 
 void wxSimpleHelpProvider::AddHelp(wxWindowBase *window, const wxString& text)
 {
-    m_hashWindows.erase((long)window);
-    m_hashWindows[(long)window] = text;
+    m_hashWindows.erase(WINHASH_KEY(window));
+    m_hashWindows[WINHASH_KEY(window)] = text;
 }
 
 void wxSimpleHelpProvider::AddHelp(wxWindowID id, const wxString& text)
@@ -364,7 +362,7 @@ void wxSimpleHelpProvider::AddHelp(wxWindowID id, const wxString& text)
 // removes the association
 void wxSimpleHelpProvider::RemoveHelp(wxWindowBase* window)
 {
-    m_hashWindows.erase((long)window);
+    m_hashWindows.erase(WINHASH_KEY(window));
 }
 
 bool wxSimpleHelpProvider::ShowHelp(wxWindowBase *window)