wxItemContainerImmutable::FindString unified.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: listbox.cpp
|
||||
// Name: src/os2/listbox.cpp
|
||||
// Purpose: wxListBox
|
||||
// Author: David Webster
|
||||
// Modified by:
|
||||
@@ -364,30 +364,6 @@ void wxListBox::DoSetItems(
|
||||
::WinShowWindow(GetHwnd(), TRUE);
|
||||
} // end of wxListBox::DoSetItems
|
||||
|
||||
int wxListBox::FindString(
|
||||
const wxString& rsString
|
||||
) const
|
||||
{
|
||||
int nPos;
|
||||
LONG lTextLength;
|
||||
PSZ zStr;
|
||||
|
||||
|
||||
for (nPos = 0; nPos < m_nNumItems; nPos++)
|
||||
{
|
||||
lTextLength = LONGFROMMR(::WinSendMsg(GetHwnd(), LM_QUERYITEMTEXTLENGTH, (MPARAM)nPos, (MPARAM)0));
|
||||
zStr = new char[lTextLength + 1];
|
||||
::WinSendMsg(GetHwnd(), LM_QUERYITEMTEXT, MPFROM2SHORT(nPos, (SHORT)lTextLength), (MPARAM)zStr);
|
||||
if (rsString == (wxChar*)zStr)
|
||||
{
|
||||
delete [] zStr;
|
||||
break;
|
||||
}
|
||||
delete [] zStr;
|
||||
}
|
||||
return nPos;
|
||||
} // end of wxListBox::FindString
|
||||
|
||||
void wxListBox::Clear()
|
||||
{
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
|
Reference in New Issue
Block a user