Fix retrieving the size of item label in native MSW wxListCtrl

Closes https://github.com/wxWidgets/wxWidgets/pull/1461

Closes #11355.
This commit is contained in:
oneeyeman1
2019-08-02 18:52:12 -05:00
committed by Vadim Zeitlin
parent 32d8b5954a
commit da524ebacb
2 changed files with 19 additions and 5 deletions

View File

@@ -1241,6 +1241,16 @@ bool wxListCtrl::GetSubItemRect(long item, long subItem, wxRect& rect, int code)
{
return false;
}
if( code == wxLIST_RECT_LABEL )
{
RECT rectIcon;
rectIcon.top = subItem;
rectIcon.left = LVIR_ICON;
if( !( ::SendMessageA(GetHwnd(), LVM_GETSUBITEMRECT, item, (LPARAM)&rectIcon) ) )
return false;
else
rectWin.left = rectIcon.right;
}
wxCopyRECTToRect(rectWin, rect);