[BROWSEUI] Set DT_VCENTER to Explorer bars (#3135)

Make the captions of the explorer bars vertically centered.
This commit is contained in:
Katayama Hirofumi MZ 2020-09-07 09:33:21 +09:00 committed by GitHub
parent 7624a98706
commit 828cf19a29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -729,12 +729,13 @@ LRESULT CBaseBarSite::OnCustomDraw(LPNMCUSTOMDRAW pnmcd)
rt = pnmcd->rc;
rt.right -= 24;
rt.left += 2;
rt.bottom -= 1;
if (FAILED_UNEXPECTEDLY(GetInternalBandInfo(index, &info, RBBIM_TEXT)))
return CDRF_SKIPDEFAULT;
newFont = GetTitleFont();
if (newFont)
oldFont = (HFONT)SelectObject(pnmcd->hdc, newFont);
DrawText(pnmcd->hdc, info.lpText, -1, &rt, DT_SINGLELINE | DT_LEFT);
DrawText(pnmcd->hdc, info.lpText, -1, &rt, DT_SINGLELINE | DT_LEFT | DT_VCENTER);
SelectObject(pnmcd->hdc, oldFont);
DeleteObject(newFont);
return CDRF_SKIPDEFAULT;