NewRA2HouseDlg.cpp 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  2. FinalSun/FinalAlert 2 Mission Editor
  3. Copyright (C) 1999-2024 Electronic Arts, Inc.
  4. Authored by Matthias Wagner
  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. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <https://www.gnu.org/licenses/>.
  15. */
  16. // NewRA2HouseDlg.cpp: Implementierungsdatei
  17. //
  18. #include "stdafx.h"
  19. #include "finalsun.h"
  20. #include "NewRA2HouseDlg.h"
  21. #include "variables.h"
  22. #ifdef _DEBUG
  23. #define new DEBUG_NEW
  24. #undef THIS_FILE
  25. static char THIS_FILE[] = __FILE__;
  26. #endif
  27. /////////////////////////////////////////////////////////////////////////////
  28. // Dialogfeld CNewRA2HouseDlg
  29. CNewRA2HouseDlg::CNewRA2HouseDlg(CWnd* pParent /*=NULL*/)
  30. : CDialog(CNewRA2HouseDlg::IDD, pParent)
  31. {
  32. //{{AFX_DATA_INIT(CNewRA2HouseDlg)
  33. m_Country = _T("");
  34. //}}AFX_DATA_INIT
  35. }
  36. void CNewRA2HouseDlg::DoDataExchange(CDataExchange* pDX)
  37. {
  38. CDialog::DoDataExchange(pDX);
  39. //{{AFX_DATA_MAP(CNewRA2HouseDlg)
  40. DDX_CBString(pDX, IDC_COUNTRY, m_Country);
  41. //}}AFX_DATA_MAP
  42. }
  43. BEGIN_MESSAGE_MAP(CNewRA2HouseDlg, CDialog)
  44. //{{AFX_MSG_MAP(CNewRA2HouseDlg)
  45. //}}AFX_MSG_MAP
  46. END_MESSAGE_MAP()
  47. /////////////////////////////////////////////////////////////////////////////
  48. // Behandlungsroutinen für Nachrichten CNewRA2HouseDlg
  49. #include "functions.h"
  50. BOOL CNewRA2HouseDlg::OnInitDialog()
  51. {
  52. CDialog::OnInitDialog();
  53. CComboBox* country=(CComboBox*)GetDlgItem(IDC_COUNTRY);
  54. int i;
  55. for(i=0;i<rules.sections[HOUSES].values.size();i++)
  56. {
  57. country->AddString(TranslateHouse(*rules.sections[HOUSES].GetValue(i), TRUE));
  58. }
  59. country->SetCurSel(0);
  60. return TRUE; // return TRUE unless you set the focus to a control
  61. // EXCEPTION: OCX-Eigenschaftenseiten sollten FALSE zurückgeben
  62. }