]> git.saurik.com Git - wxWidgets.git/commitdiff
In SetString, added test for owner draw style to cure crash.
authorJulian Smart <julian@anthemion.co.uk>
Fri, 22 May 1998 10:31:40 +0000 (10:31 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 22 May 1998 10:31:40 +0000 (10:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/msw/install.txt
src/msw/listbox.cpp

index ddedd6764dce5a07c05efc602c61d09eb5407fba..6e5f894c28440a9b417fea7d344b53faeddffa4e 100644 (file)
@@ -44,7 +44,7 @@ Visual C++ 1.5 compilation
 
 1. Change directory to wx\src\msw. Type 'nmake -f makefile.dos' to
    make the wxWindows core library.
-2. Change directory to wx\samples and type 'nmake -f makefile.b32'
+2. Change directory to wx\samples and type 'nmake -f makefile.dos'
    to make all the samples. You can also make them individually.
    NOTE: only a few samples have up-to-date makefiles, e.g.
    minimal, docview, mdi. The utils makefile does not yet work.
index 3971e400ee46b56530f14e3e65a5146bdc2aea27..8c8922b504cff81624ea6e2a5ca6fe99a517848a 100644 (file)
@@ -646,10 +646,11 @@ void wxListBox::SetString(const int N, const wxString& s)
   if (sel >= 0)
     SetSelection(sel);
 
-  #if       USE_OWNER_DRAWN
-    // update item's text
-    m_aItems[N]->SetName(s);
-  #endif  //USE_OWNER_DRAWN
+#if       USE_OWNER_DRAWN
+  if ( m_windowStyle & wxLB_OWNERDRAW )
+         // update item's text
+         m_aItems[N]->SetName(s);
+#endif  //USE_OWNER_DRAWN
 }
 
 int wxListBox::Number (void) const