]> git.saurik.com Git - wxWidgets.git/commitdiff
Maybe negative wxWindowId are better than just -1.
authorRobert Roebling <robert@roebling.de>
Wed, 12 May 1999 22:12:18 +0000 (22:12 +0000)
committerRobert Roebling <robert@roebling.de>
Wed, 12 May 1999 22:12:18 +0000 (22:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2437 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/window.h
src/common/wincmn.cpp

index 6062504215e3208ffdaf93c9b294e8cbd96dce3f..78b1fd342a0e19c451df94de50f60093d9c6ec00 100644 (file)
@@ -170,7 +170,7 @@ public:
 
         // generate a control id for the controls which were not given one by
         // user
-    static int NewControlId() { return ++ms_lastControlId; }
+    static int NewControlId() { return --ms_lastControlId; }
 
     // moving/resizing
     // ---------------
index 37d54450d7eb6adc70c3ae484525d7efb5d49e64..153a0408afaeed3b02aab2982ae1e799cf05f6a5 100644 (file)
@@ -57,7 +57,7 @@
 // static data
 // ----------------------------------------------------------------------------
 
-int wxWindowBase::ms_lastControlId = 0;
+int wxWindowBase::ms_lastControlId = -2;
 
 IMPLEMENT_ABSTRACT_CLASS(wxWindowBase, wxEvtHandler)
 
@@ -152,8 +152,7 @@ bool wxWindowBase::CreateBase(wxWindowBase *parent,
     wxASSERT_MSG( m_isWindow, _T("Init() must have been called before!") );
 
     // generate a new id if the user doesn't care about it
-      // No, we keep the -1 from now on. RR.
-//    m_windowId = id == -1 ? NewControlId() : id;
+    m_windowId = id == -1 ? NewControlId() : id;
 
     SetName(name);
     SetWindowStyleFlag(style);