MainFrm.cpp 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /*
  2. ** Command & Conquer Renegade(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. /***********************************************************************************************
  19. *** Confidential - Westwood Studios ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : LightMap *
  23. * *
  24. * $Archive:: /Commando/Code/Tool $*
  25. * *
  26. * $Author:: Ian_l $*
  27. * *
  28. * $Modtime:: 8/18/99 6:58p $*
  29. * *
  30. * $Revision:: 2 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. // Includes.
  36. #include "StdAfx.h"
  37. #include "LightMap.h"
  38. #include "MainFrm.h"
  39. // The following is maintained by MFC tools.
  40. #ifdef _DEBUG
  41. #define new DEBUG_NEW
  42. #undef THIS_FILE
  43. static char THIS_FILE[] = __FILE__;
  44. #endif
  45. IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
  46. BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
  47. //{{AFX_MSG_MAP(CMainFrame)
  48. ON_WM_CREATE()
  49. //}}AFX_MSG_MAP
  50. END_MESSAGE_MAP()
  51. static UINT indicators[] =
  52. {
  53. ID_SEPARATOR, // status line indicator
  54. ID_INDICATOR_CAPS,
  55. ID_INDICATOR_NUM,
  56. ID_INDICATOR_SCRL,
  57. };
  58. CMainFrame::CMainFrame()
  59. {
  60. }
  61. CMainFrame::~CMainFrame()
  62. {
  63. }
  64. int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
  65. {
  66. if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
  67. return -1;
  68. /* No tool bar
  69. if (!m_wndToolBar.Create(this) ||
  70. !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
  71. {
  72. TRACE0("Failed to create toolbar\n");
  73. return -1; // fail to create
  74. }
  75. */
  76. if (!m_wndStatusBar.Create(this) ||
  77. !m_wndStatusBar.SetIndicators(indicators,
  78. sizeof(indicators)/sizeof(UINT)))
  79. {
  80. TRACE0("Failed to create status bar\n");
  81. return -1; // fail to create
  82. }
  83. /* No Toolbar
  84. // TODO: Remove this if you don't want tool tips or a resizeable toolbar
  85. m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
  86. CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
  87. // TODO: Delete these three lines if you don't want the toolbar to
  88. // be dockable
  89. m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
  90. EnableDocking(CBRS_ALIGN_ANY);
  91. DockControlBar(&m_wndToolBar);
  92. */
  93. return 0;
  94. }
  95. BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
  96. {
  97. // TODO: Modify the Window class or styles here by modifying
  98. // the CREATESTRUCT cs
  99. return CFrameWnd::PreCreateWindow(cs);
  100. }
  101. #ifdef _DEBUG
  102. void CMainFrame::AssertValid() const
  103. {
  104. CFrameWnd::AssertValid();
  105. }
  106. void CMainFrame::Dump(CDumpContext& dc) const
  107. {
  108. CFrameWnd::Dump(dc);
  109. }
  110. #endif //_DEBUG