Use the supplied buffer when copying item text.

This commit is contained in:
Aric Stewart 2002-02-08 17:10:49 +00:00 committed by Alexandre Julliard
parent d44b4280cb
commit 1282ef9420
1 changed files with 12 additions and 2 deletions

View File

@ -329,9 +329,19 @@ static void
COMBOEX_CopyItem (COMBOEX_INFO *infoPtr, CBE_ITEMDATA *item, COMBOBOXEXITEMW *cit)
{
if (cit->mask & CBEIF_TEXT) {
/*
* when given a text buffer actually use that buffer
*/
if (cit->pszText)
{
lstrcpynW(cit->pszText,item->pszText,cit->cchTextMax);
}
else
{
cit->pszText = item->pszText;
cit->cchTextMax = item->cchTextMax;
}
}
if (cit->mask & CBEIF_IMAGE)
cit->iImage = item->iImage;
if (cit->mask & CBEIF_SELECTEDIMAGE)