DlgPgTerrain.cpp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /* Copyright (c) 2002-2012 Croteam Ltd.
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of version 2 of the GNU General Public License as published by
  4. the Free Software Foundation
  5. This program is distributed in the hope that it will be useful,
  6. but WITHOUT ANY WARRANTY; without even the implied warranty of
  7. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  8. GNU General Public License for more details.
  9. You should have received a copy of the GNU General Public License along
  10. with this program; if not, write to the Free Software Foundation, Inc.,
  11. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
  12. // DlgPgTerrain.cpp : implementation file
  13. //
  14. #include "stdafx.h"
  15. #include "WorldEditor.h"
  16. #include "DlgPgTerrain.h"
  17. #ifdef _DEBUG
  18. #undef new
  19. #define new DEBUG_NEW
  20. #undef THIS_FILE
  21. static char THIS_FILE[] = __FILE__;
  22. #endif
  23. /////////////////////////////////////////////////////////////////////////////
  24. // CDlgPgTerrain property page
  25. IMPLEMENT_DYNCREATE(CDlgPgTerrain, CPropertyPage)
  26. CDlgPgTerrain::CDlgPgTerrain() : CPropertyPage(CDlgPgTerrain::IDD)
  27. {
  28. //{{AFX_DATA_INIT(CDlgPgTerrain)
  29. // NOTE: the ClassWizard will add member initialization here
  30. //}}AFX_DATA_INIT
  31. }
  32. CDlgPgTerrain::~CDlgPgTerrain()
  33. {
  34. }
  35. void CDlgPgTerrain::DoDataExchange(CDataExchange* pDX)
  36. {
  37. CPropertyPage::DoDataExchange(pDX);
  38. //{{AFX_DATA_MAP(CDlgPgTerrain)
  39. // NOTE: the ClassWizard will add DDX and DDV calls here
  40. //}}AFX_DATA_MAP
  41. }
  42. BEGIN_MESSAGE_MAP(CDlgPgTerrain, CPropertyPage)
  43. //{{AFX_MSG_MAP(CDlgPgTerrain)
  44. //}}AFX_MSG_MAP
  45. END_MESSAGE_MAP()
  46. /////////////////////////////////////////////////////////////////////////////
  47. // CDlgPgTerrain message handlers
  48. BOOL CDlgPgTerrain::OnIdle(LONG lCount)
  49. {
  50. CWorldEditorDoc* pDoc = theApp.GetDocument();
  51. if( (pDoc == NULL) || !IsWindow(m_hWnd)) return FALSE;
  52. m_wndTerrainInterface.OnIdle();
  53. return TRUE;
  54. }
  55. BOOL CDlgPgTerrain::OnInitDialog()
  56. {
  57. CPropertyPage::OnInitDialog();
  58. CRect rect;
  59. GetClientRect(rect);
  60. // create window for active default primitive texture
  61. m_wndTerrainInterface.Create( NULL, NULL, WS_BORDER|WS_VISIBLE,
  62. CRect( rect.left, rect.top, rect.right+8, rect.bottom+16),
  63. this, IDW_TERRAIN_INTERFACE);
  64. DragAcceptFiles();
  65. return TRUE;
  66. }