diff options
Diffstat (limited to 'src/T2DLL/SpeedDlg.cpp')
-rw-r--r-- | src/T2DLL/SpeedDlg.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/T2DLL/SpeedDlg.cpp b/src/T2DLL/SpeedDlg.cpp index 88c0805..37d5441 100644 --- a/src/T2DLL/SpeedDlg.cpp +++ b/src/T2DLL/SpeedDlg.cpp @@ -57,11 +57,11 @@ void SpeedDlg::Save() { mCurrentIndex = -1; T2DlgItem *theRadio; - T2DlgItem *theText; + T2DlgItem *theTopSpeedText; - for (int i = 0; i < 5; i++) { - if (mCurrentSpeed == speedValues[i]) { - mCurrentIndex = i; + for (int index = 0; index < 5; index++) { + if (mCurrentSpeed == speedValues[index]) { + mCurrentIndex = index; theRadio = GetT2DlgItem(105 + mCurrentIndex); theRadio->SetValue(1); break; @@ -69,48 +69,48 @@ void SpeedDlg::Save() { } if (mCurrentIndex != 4) { - theText = GetT2DlgItem(104); + theTopSpeedText = GetT2DlgItem(104); theRadio = GetT2DlgItem(109); - theText->ShowWindow(SW_HIDE); + theTopSpeedText->ShowWindow(SW_HIDE); theRadio->ShowWindow(SW_HIDE); } } -/*virtual*/ int SpeedDlg::OnT2DialogCommand(UINT cmd, long data) { - int result = 1; - WORD w = LOWORD(cmd); +/*virtual*/ BOOL SpeedDlg::OnT2DialogCommand(WPARAM inWParam, LPARAM inLParam) { + BOOL theRes = true; + WORD id = LOWORD(inWParam); T2DlgItem *theRadio; - T2DlgItem *theText; + T2DlgItem *theTopSpeedText; - switch (w) { + switch (id) { case 105: case 106: case 107: case 108: case 109: - mCurrentSpeed = speedValues[w - 105]; + mCurrentSpeed = speedValues[id - 105]; if (mCurrentIndex != -1) { theRadio = GetT2DlgItem(105 + mCurrentIndex); theRadio->SetValue(0); } - mCurrentIndex = w - 105; + mCurrentIndex = id - 105; theRadio = GetT2DlgItem(105 + mCurrentIndex); theRadio->SetValue(1); break; case 110: - theText = GetT2DlgItem(104); + theTopSpeedText = GetT2DlgItem(104); theRadio = GetT2DlgItem(109); - theText->ShowWindow(SW_SHOW); + theTopSpeedText->ShowWindow(SW_SHOW); theRadio->ShowWindow(SW_SHOW); break; default: - result = T2Dialog::OnT2DialogCommand(cmd, data); + theRes = T2Dialog::OnT2DialogCommand(inWParam, inLParam); } - return result; + return theRes; } |