From c2efba6907fab934a04959b9bb644cf7141cc955 Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Sat, 1 Jul 2023 23:04:04 +0100 Subject: matched T2DLL as well as i can --- src/T2DLL/T2DlgItemText.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/T2DLL/T2DlgItemText.cpp') diff --git a/src/T2DLL/T2DlgItemText.cpp b/src/T2DLL/T2DlgItemText.cpp index 6466376..415a460 100644 --- a/src/T2DLL/T2DlgItemText.cpp +++ b/src/T2DLL/T2DlgItemText.cpp @@ -26,17 +26,17 @@ void T2DlgItemText::SetTextColor(COLORREF inColor) { str += inStr; SetWindowText(str); - CRect rect; - GetClientRect(rect); - MapWindowPoints(GetParent(), rect); - GetParent()->InvalidateRect(rect); + CRect clientRect; + GetClientRect(clientRect); + MapWindowPoints(GetParent(), clientRect); + GetParent()->InvalidateRect(clientRect); } /*virtual*/ BOOL T2DlgItemText::OnT2DlgItemEraseBkgnd(CDC* pDC) { CRect rect; GetClientRect(rect); - int save = pDC->SaveDC(); + int theSave = pDC->SaveDC(); pDC->SelectPalette(mPalette, false); pDC->RealizePalette(); @@ -47,23 +47,23 @@ void T2DlgItemText::SetTextColor(COLORREF inColor) { CString str; GetContentText(str); - char justification = GetJustification(); - UINT flags = DT_WORDBREAK | DT_NOPREFIX; + char just = GetJustification(); + UINT format = DT_WORDBREAK | DT_NOPREFIX; - if (isupper(justification)) { - flags |= DT_VCENTER; - justification = tolower(justification); + if (isupper(just)) { + format |= DT_VCENTER; + just = tolower(just); } - switch (justification) { - case 'c': flags |= DT_CENTER; break; - case 'l': flags |= DT_LEFT; break; - case 'r': flags |= DT_RIGHT; break; + switch (just) { + case 'c': format |= DT_CENTER; break; + case 'l': format |= DT_LEFT; break; + case 'r': format |= DT_RIGHT; break; } - pDC->DrawText(str, rect, flags); + pDC->DrawText(str, rect, format); - pDC->RestoreDC(save); + pDC->RestoreDC(theSave); return true; } -- cgit v1.2.3