RetranslateDlg.cpp 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /*
  2. ** Command & Conquer Generals(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. // RetranslateDlg.cpp : implementation file
  19. //
  20. #include "stdafx.h"
  21. #include "noxstring.h"
  22. #include "RetranslateDlg.h"
  23. #ifdef _DEBUG
  24. #define new DEBUG_NEW
  25. #undef THIS_FILE
  26. static char THIS_FILE[] = __FILE__;
  27. #endif
  28. /////////////////////////////////////////////////////////////////////////////
  29. // RetranslateDlg dialog
  30. RetranslateDlg::RetranslateDlg(CWnd* pParent /*=NULL*/)
  31. : CDialog(RetranslateDlg::IDD, pParent)
  32. {
  33. //{{AFX_DATA_INIT(RetranslateDlg)
  34. // NOTE: the ClassWizard will add member initialization here
  35. //}}AFX_DATA_INIT
  36. }
  37. void RetranslateDlg::DoDataExchange(CDataExchange* pDX)
  38. {
  39. CDialog::DoDataExchange(pDX);
  40. //{{AFX_DATA_MAP(RetranslateDlg)
  41. // NOTE: the ClassWizard will add DDX and DDV calls here
  42. //}}AFX_DATA_MAP
  43. }
  44. BEGIN_MESSAGE_MAP(RetranslateDlg, CDialog)
  45. //{{AFX_MSG_MAP(RetranslateDlg)
  46. ON_WM_CANCELMODE()
  47. ON_BN_CLICKED(IDC_MATCH, OnRetranslate)
  48. ON_BN_CLICKED(IDC_SKIP, OnSkip)
  49. ON_BN_CLICKED(IDC_NOMATCH, OnNoRetranslate)
  50. ON_BN_CLICKED(IDCANCEL, OnSkipAll)
  51. //}}AFX_MSG_MAP
  52. END_MESSAGE_MAP()
  53. /////////////////////////////////////////////////////////////////////////////
  54. // RetranslateDlg message handlers
  55. BOOL RetranslateDlg::OnInitDialog()
  56. {
  57. // TODO: Add extra initialization here
  58. CStatic *text;
  59. static char buffer[4*1024];
  60. CDialog::OnInitDialog();
  61. text = (CStatic *) GetDlgItem ( IDC_NEWTEXT );
  62. text->SetWindowText ( newtext->GetSB());
  63. text = (CStatic *) GetDlgItem ( IDC_OLDTEXT );
  64. text->SetWindowText ( oldtext->GetSB());
  65. return TRUE; // return TRUE unless you set the focus to a control
  66. // EXCEPTION: OCX Property Pages should return FALSE
  67. }
  68. void RetranslateDlg::OnCancelMode()
  69. {
  70. CDialog::OnCancelMode();
  71. // TODO: Add your message handler code here
  72. }
  73. void RetranslateDlg::OnRetranslate()
  74. {
  75. // TODO: Add your control notification handler code here
  76. oldtext->SetRetranslate ( TRUE );
  77. CDialog::OnOK ();
  78. }
  79. void RetranslateDlg::OnSkip()
  80. {
  81. // TODO: Add your control notification handler code here
  82. EndDialog ( IDSKIP );
  83. }
  84. void RetranslateDlg::OnNoRetranslate()
  85. {
  86. // TODO: Add your control notification handler code here
  87. oldtext->SetRetranslate ( FALSE );
  88. CDialog::OnOK ();
  89. }
  90. void RetranslateDlg::OnSkipAll()
  91. {
  92. // TODO: Add your control notification handler code here
  93. CDialog::OnCancel ();
  94. }