Fix conversion of W structure to A structure during notify.
This commit is contained in:
parent
d2b22894a0
commit
d750780f8c
|
@ -294,10 +294,16 @@ COMBOEX_NotifyEndEdit (COMBOEX_INFO *infoPtr, NMCBEENDEDITW *hdr, LPWSTR itemTex
|
||||||
return SendMessageW (GetParent(infoPtr->hwndSelf), WM_NOTIFY, 0,
|
return SendMessageW (GetParent(infoPtr->hwndSelf), WM_NOTIFY, 0,
|
||||||
(LPARAM)hdr);
|
(LPARAM)hdr);
|
||||||
else {
|
else {
|
||||||
|
NMCBEENDEDITA ansi;
|
||||||
|
|
||||||
|
memcpy (&ansi.hdr, &hdr->hdr, sizeof(NMHDR));
|
||||||
|
ansi.fChanged = hdr->fChanged;
|
||||||
|
ansi.iNewSelection = hdr->iNewSelection;
|
||||||
WideCharToMultiByte (CP_ACP, 0, itemText, -1,
|
WideCharToMultiByte (CP_ACP, 0, itemText, -1,
|
||||||
(LPSTR)hdr->szText, CBEMAXSTRLEN, NULL, NULL);
|
(LPSTR)&ansi.szText, CBEMAXSTRLEN, NULL, NULL);
|
||||||
|
ansi.iWhy = hdr->iWhy;
|
||||||
return SendMessageA (GetParent(infoPtr->hwndSelf), WM_NOTIFY, 0,
|
return SendMessageA (GetParent(infoPtr->hwndSelf), WM_NOTIFY, 0,
|
||||||
(LPARAM)hdr);
|
(LPARAM)&ansi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue