]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listbox.cpp
oops, fixed crash introduced in last check in
[wxWidgets.git] / src / msw / listbox.cpp
index 120a38ce726980492e85eef96e3d3eb29a38fc91..360767c00f0bee18eb74e112455c851a709d1de3 100644 (file)
@@ -390,7 +390,7 @@ void wxListBox::Free()
     }
 }
 
-void wxListBox::SetSelection(int N, bool select)
+void wxListBox::DoSetSelection(int N, bool select)
 {
     wxCHECK_RET( N == wxNOT_FOUND ||
                     (N >= 0 && N < m_noItems),
@@ -621,7 +621,7 @@ void wxListBox::SetHorizontalExtent(const wxString& s)
         int existingExtent = (int)SendMessage(GetHwnd(), LB_GETHORIZONTALEXTENT, 0, 0L);
         HDC dc = GetWindowDC(GetHwnd());
         HFONT oldFont = 0;
-        if (GetFont().Ok() && GetFont().GetResourceHandle())
+        if (GetFont().Ok() && GetFont().GetResourceHandle() != 0)
             oldFont = (HFONT) ::SelectObject(dc, (HFONT) GetFont().GetResourceHandle());
 
         GetTextMetrics(dc, &lpTextMetric);
@@ -641,7 +641,7 @@ void wxListBox::SetHorizontalExtent(const wxString& s)
         int largestExtent = 0;
         HDC dc = GetWindowDC(GetHwnd());
         HFONT oldFont = 0;
-        if (GetFont().Ok() && GetFont().GetResourceHandle())
+        if (GetFont().Ok() && GetFont().GetResourceHandle() != 0)
             oldFont = (HFONT) ::SelectObject(dc, (HFONT) GetFont().GetResourceHandle());
 
         GetTextMetrics(dc, &lpTextMetric);
@@ -732,7 +732,7 @@ bool wxListBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
         event.SetExtraLong( HasMultipleSelection() ? IsSelected(n) : true );
     }
 
-    event.m_commandInt = n;
+    event.SetInt(n);
 
     return GetEventHandler()->ProcessEvent(event);
 }