@@ -74,8 +74,8 @@ void CAutoReplyPage::OnAdd()
7474 msg.SetWindowText (NULL );
7575 respond.SetWindowText (NULL );
7676 protect.SetCheck (FALSE );
77- first.SetWindowText (" 1" );
78- count.SetWindowText (" 1" );
77+ first.SetWindowText (TEXT ( " 1" ) );
78+ count.SetWindowText (TEXT ( " 1" ) );
7979 list.EnableWindow (FALSE );
8080}
8181
@@ -170,7 +170,7 @@ BOOL CAutoReplyPage::OnInitDialog()
170170
171171void CAutoReplyPage::OnCancel ()
172172{
173- if (respond.IsWindowEnabled ()) // 還在編輯狀態
173+ if (respond.IsWindowEnabled ()) // 還在編輯狀態
174174 return ;
175175
176176 int c = list.GetCount ();
@@ -197,20 +197,20 @@ void CAutoReplyPage::UpdateDisplay()
197197 msg.SetWindowText (item->msg );
198198 respond.SetPasswordChar (*LPCTSTR (item->respond ) == ' +' ? ' *' : 0 );
199199 CString tmp = LPCTSTR (item->respond ) + 1 ;
200- tmp.Replace (" ^M^J" , " \r\n " );
201- tmp.Replace (" ^M" , " \r\n " );
200+ tmp.Replace (TEXT ( " ^M^J" ), TEXT ( " \r\n " ) );
201+ tmp.Replace (TEXT ( " ^M" ), TEXT ( " \r\n " ) );
202202 respond.SetWindowText (tmp);
203203 protect.SetCheck (*LPCTSTR (item->respond ) == ' +' );
204204
205- char sfirst[8 ];
206- itoa (item->first , sfirst, 10 );
205+ TCHAR sfirst[8 ];
206+ _itot (item->first , sfirst, 10 );
207207 first.SetWindowText (sfirst);
208- char scount[8 ];
208+ TCHAR scount[8 ];
209209 if (item->count == 0 )
210210 count.SetWindowText (NULL );
211211 else
212212 {
213- itoa (item->count , scount, 10 );
213+ _itot (item->count , scount, 10 );
214214 count.SetWindowText (scount);
215215 }
216216}
@@ -221,7 +221,7 @@ void CAutoReplyPage::OnSave()
221221 msg.GetWindowText (tmp);
222222 if (tmp.IsEmpty ())
223223 {
224- // 設定不完整,必須輸入要自動回應的訊息!
224+ // 設定不完整,必須輸入要自動回應的訊息!
225225 MessageBox (LoadString (IDS_INCOMPLETE_AUTO_SETTINGS) , NULL , MB_OK | MB_ICONSTOP);
226226 msg.SetFocus ();
227227 return ;
@@ -231,14 +231,14 @@ void CAutoReplyPage::OnSave()
231231 CTriggerItem* item;
232232 BOOL badd = (add.GetDlgCtrlID () == IDC_SAVE);
233233 int i;
234- if (badd) // 新增
234+ if (badd) // 新增
235235 {
236236 if (list.FindString (0 , tmp) != LB_ERR)
237237 return ;
238238 item = new CTriggerItem;
239239 item->pnext = NULL ;
240240 }
241- else // 修改
241+ else // 修改
242242 {
243243 i = list.GetCurSel ();
244244 item = (CTriggerItem*)list.GetItemDataPtr (i);
@@ -247,25 +247,25 @@ void CAutoReplyPage::OnSave()
247247 item->msg = tmp;
248248
249249 respond.GetWindowText (tmp);
250- tmp.Replace (" \r\n " , " ^M" );
250+ tmp.Replace (TEXT ( " \r\n " ), TEXT ( " ^M" ) );
251251 item->respond = protect.GetCheck () ? " +" : " -" ;
252252 item->respond += tmp;
253253
254- char sfirst[8 ];
254+ TCHAR sfirst[8 ];
255255 first.GetWindowText (sfirst, 8 );
256- item->first = atoi (sfirst);
256+ item->first = _tstoi (sfirst);
257257 if (item->first < 1 )
258258 item->first = 1 ;
259- char scount[8 ];
259+ TCHAR scount[8 ];
260260 count.GetWindowText (scount, 8 );
261261 if (!*scount)
262262 item->count = 0 ;
263263 else
264- item->count = atoi (scount);
264+ item->count = _tstoi (scount);
265265
266- if (badd) // 如果新增
266+ if (badd) // 如果新增
267267 i = list.AddString (item->msg );
268- else // 如果修改
268+ else // 如果修改
269269 {
270270 list.DeleteString (i);
271271 list.InsertString (i, item->msg );
@@ -318,14 +318,14 @@ void CAutoReplyPage::EnableEdits(BOOL enable)
318318
319319void CAutoReplyPage::OnProtect ()
320320{
321- if (protect.GetCheck ()) // 如果是勾選密碼保護
321+ if (protect.GetCheck ()) // 如果是勾選密碼保護
322322 {
323323 if (!AppConfig.QueryPassword (TRUE ))
324324 protect.SetCheck (0 );
325325 else
326326 respond.SetPasswordChar (' *' );
327327 }
328- else // 如果是取消密碼保護
328+ else // 如果是取消密碼保護
329329 {
330330 CPasswdDlg dlg;
331331 if (dlg.DoModal () == IDCANCEL)
0 commit comments