RightFrame.cpp 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. // RightFrame.cpp: Implementierungsdatei
  17. //
  18. #include "stdafx.h"
  19. #include "finalsun.h"
  20. #include "RightFrame.h"
  21. #ifdef _DEBUG
  22. #define new DEBUG_NEW
  23. #undef THIS_FILE
  24. static char THIS_FILE[] = __FILE__;
  25. #endif
  26. /////////////////////////////////////////////////////////////////////////////
  27. // CRightFrame
  28. IMPLEMENT_DYNCREATE(CRightFrame, CFrameWnd)
  29. CRightFrame::CRightFrame()
  30. {
  31. }
  32. CRightFrame::~CRightFrame()
  33. {
  34. }
  35. BEGIN_MESSAGE_MAP(CRightFrame, CFrameWnd)
  36. //{{AFX_MSG_MAP(CRightFrame)
  37. ON_WM_SIZE()
  38. ON_WM_CHAR()
  39. //}}AFX_MSG_MAP
  40. END_MESSAGE_MAP()
  41. /////////////////////////////////////////////////////////////////////////////
  42. // Behandlungsroutinen für Nachrichten CRightFrame
  43. BOOL CRightFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
  44. {
  45. SIZE z;
  46. z.cx=200;
  47. z.cy=700;
  48. //if(z.cy<100) z.cy=100;
  49. CRect r;
  50. r.right=200;
  51. r.bottom=200;
  52. if(!m_Splitter.CreateStatic(this,2,1)) return FALSE;
  53. if(!m_Splitter.CreateView(0,0,
  54. RUNTIME_CLASS(CIsoView),
  55. z,
  56. pContext)) return FALSE;
  57. z.cy=100;
  58. if(!m_Splitter.CreateView(1,0,
  59. RUNTIME_CLASS(CTileSetBrowserFrame),
  60. z,
  61. pContext)) return FALSE;
  62. GetClientRect(&r);
  63. m_Splitter.SetRowInfo(0, GetSystemMetrics(SM_CYFULLSCREEN)/2, 20);
  64. m_Splitter.SetRowInfo(1, GetSystemMetrics(SM_CYFULLSCREEN)/2, 10);
  65. //SetWindowLong(m_Splitter->m_hWnd, GWL_STYLE, m_rightFrame->GetStyle() ! WS_THICKFRAME);
  66. OutputDebugString("CRightFrame::OnCreateClient(): windows created\n");
  67. return CFrameWnd::OnCreateClient(lpcs, pContext);
  68. }
  69. BOOL CRightFrame::PreCreateWindow(CREATESTRUCT& cs)
  70. {
  71. // cs.style=WS_OVERLAPPED && WS_CAPTION && WS_SYSMENU && WS_MINIMIZEBOX && WS_MAXIMIZEBOX;
  72. return CFrameWnd::PreCreateWindow(cs);
  73. }
  74. void CRightFrame::OnSize(UINT nType, int cx, int cy)
  75. {
  76. CFrameWnd::OnSize(nType, cx, cy);
  77. }
  78. void CRightFrame::RecalcLayout(BOOL bNotify)
  79. {
  80. // TODO: Speziellen Code hier einfügen und/oder Basisklasse aufrufen
  81. CFrameWnd::RecalcLayout(bNotify);
  82. }
  83. void CRightFrame::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
  84. {
  85. CFrameWnd::OnChar(nChar, nRepCnt, nFlags);
  86. }