@@ -70,7 +70,8 @@ BOOL CStayAwakeDlg::OnInitDialog()
70
70
SetIcon (m_hIcon, TRUE ); // Set big icon
71
71
SetIcon (m_hIcon, FALSE ); // Set small icon
72
72
73
- Utils::addTooltip (theApp.m_hInstance , m_hWnd, IDC_INTERVAL, L" " , L" Number between 30 and 3600" , 3 , TRUE );
73
+ Utils::addTooltip (theApp.m_hInstance , m_hWnd, IDC_INTERVAL, L" " ,
74
+ wstring{ L" Number between " } + to_wstring (MIN_PERIOD) + L" and " + to_wstring (MAX_PERIOD), 3 , TRUE );
74
75
Utils::addTooltip (theApp.m_hInstance , m_hWnd, IDC_ABOUT_BUTTON, L" " , L" About StayAwake" , 3 , TRUE );
75
76
Utils::loadBitmap (theApp.m_hInstance , m_hWnd, IDC_ABOUT_BUTTON, IDB_ABOUT_BITMAP);
76
77
@@ -148,9 +149,10 @@ void CStayAwakeDlg::OnKillfocusInterval()
148
149
149
150
nInterval = GetDlgItemInt (IDC_INTERVAL, nullptr , FALSE );
150
151
151
- if (nInterval < 30 || nInterval > 3600 )
152
+ if (nInterval < MIN_PERIOD || nInterval > MAX_PERIOD )
152
153
{
153
- Utils::showEditBalloonTip (GetDlgItem (IDC_INTERVAL)->m_hWnd , L" Timer Interval in seconds" , L" Please enter a value between 30 and 3600" );
154
+ Utils::showEditBalloonTip (GetDlgItem (IDC_INTERVAL)->m_hWnd , L" Timer Interval in seconds" ,
155
+ (wstring{ L" Please enter a value between " } + to_wstring (MIN_PERIOD) + L" and " + to_wstring (MAX_PERIOD)).c_str ());
154
156
SetDlgItemInt (IDC_INTERVAL, m_TimerSeconds, FALSE );
155
157
return ;
156
158
}
0 commit comments