X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bada28f00f12666ef31f0543cea2cde86b7935c7..889f0b7c67f207f230d8bf9f558ae35445d57e10:/src/msw/listbox.cpp diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index 19a8753d28..462c26bb82 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -100,7 +100,7 @@ wxListBoxItem::wxListBoxItem(const wxString& str) : wxOwnerDrawn(str, FALSE) SetMarginWidth(0); } -wxOwnerDrawn *wxListBox::CreateItem(size_t n) +wxOwnerDrawn *wxListBox::CreateItem(size_t WXUNUSED(n)) { return new wxListBoxItem(); } @@ -157,6 +157,12 @@ bool wxListBox::Create(wxWindow *parent, DWORD wstyle = WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | LBS_NOTIFY | LBS_HASSTRINGS /* | WS_CLIPSIBLINGS */; + + wxASSERT_MSG( !(style & wxLB_MULTIPLE) || !(style & wxLB_EXTENDED), + _T("only one of listbox selection modes can be specified") ); + if ( m_windowStyle & wxCLIP_SIBLINGS ) + wstyle |= WS_CLIPSIBLINGS; + if (m_windowStyle & wxLB_MULTIPLE) wstyle |= LBS_MULTIPLESEL; else if (m_windowStyle & wxLB_EXTENDED)