]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/listbox.cpp
Released menubar capture before menu popup was captured.
[wxWidgets.git] / src / os2 / listbox.cpp
index 7fa3750188190c708dc3cefb8954b675551ee7ff..ec9bfbda113852ee7cd39d17e501db8c3e9396d1 100644 (file)
 #include "wx/dynarray.h"
 #include "wx/log.h"
 
+#if wxUSE_LISTBOX
+
 #if wxUSE_OWNER_DRAWN
     #include  "wx/ownerdrw.h"
 #endif
 
-#if !USE_SHARED_LIBRARY
   IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
-#endif
 
 // ============================================================================
 // list box item declaration and implementation
@@ -81,11 +81,7 @@ bool wxListBox::Create(wxWindow *parent,
                        int n, const wxString choices[],
                        long style,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-                       const wxValidator* validator,
-#  else
                        const wxValidator& validator,
-#  endif
 #endif
                        const wxString& name)
 {
@@ -610,7 +606,7 @@ void wxListBox::SetHorizontalExtent(const wxString& s)
 */
 }
 
-wxSize wxListBox::DoGetBestSize()
+wxSize wxListBox::DoGetBestSize() const
 {
     // find the widest string
     int wLine;
@@ -630,7 +626,7 @@ wxSize wxListBox::DoGetBestSize()
 
     // the listbox should be slightly larger than the widest string
     int cx, cy;
-    wxGetCharSize(GetHWND(), &cx, &cy, &GetFont());
+    wxGetCharSize(GetHWND(), &cx, &cy, (wxFont*)&GetFont());
 
     wListbox += 3*cx;
 
@@ -780,3 +776,5 @@ bool wxListBox::OS2OnDraw(WXDRAWITEMSTRUCT *item)
 }
 #endif
     // wxUSE_OWNER_DRAWN
+
+#endif //wxUSE_LISTBOX