summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2DlgItemText.cpp
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-07-01 23:04:04 +0100
committerAsh Wolf <ninji@wuffs.org>2023-07-01 23:04:04 +0100
commitc2efba6907fab934a04959b9bb644cf7141cc955 (patch)
treec047244f99870e44a7a5d7e733c2857434c03765 /src/T2DLL/T2DlgItemText.cpp
parent1eb8da84d77d0c865623421069ec38bfc7b0d461 (diff)
downloadt2win-c2efba6907fab934a04959b9bb644cf7141cc955.tar.gz
t2win-c2efba6907fab934a04959b9bb644cf7141cc955.zip
matched T2DLL as well as i can
Diffstat (limited to '')
-rw-r--r--src/T2DLL/T2DlgItemText.cpp32
1 files changed, 16 insertions, 16 deletions
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;
}