Old fashion design for PC-104
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
2.8 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 08/10/2003
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: MainFrm.cpp
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Source file of MainFrm.cpp
  13. //----------------------------------------------------------------------------
  14. // MainFrm.cpp : implementation of the CMainFrame class
  15. //
  16. #include "stdafx.h"
  17. #include "SetupLGS.h"
  18. #include "MainFrm.h"
  19. #ifdef _DEBUG
  20. #define new DEBUG_NEW
  21. #undef THIS_FILE
  22. static char THIS_FILE[] = __FILE__;
  23. #endif
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CMainFrame
  26. IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
  27. BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
  28. //{{AFX_MSG_MAP(CMainFrame)
  29. ON_WM_CREATE()
  30. //}}AFX_MSG_MAP
  31. END_MESSAGE_MAP()
  32. static UINT indicators[] =
  33. {
  34. ID_SEPARATOR, // status line indicator
  35. ID_INDICATOR_CAPS,
  36. ID_INDICATOR_NUM,
  37. ID_INDICATOR_SCRL,
  38. };
  39. /////////////////////////////////////////////////////////////////////////////
  40. // CMainFrame construction/destruction
  41. CMainFrame::CMainFrame()
  42. {
  43. // TODO: add member initialization code here
  44. }
  45. CMainFrame::~CMainFrame()
  46. {
  47. }
  48. int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
  49. {
  50. if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
  51. return -1;
  52. if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
  53. | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
  54. !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
  55. {
  56. TRACE0("Failed to create toolbar\n");
  57. return -1; // fail to create
  58. }
  59. if (!m_wndStatusBar.Create(this) ||
  60. !m_wndStatusBar.SetIndicators(indicators,
  61. sizeof(indicators)/sizeof(UINT)))
  62. {
  63. TRACE0("Failed to create status bar\n");
  64. return -1; // fail to create
  65. }
  66. // TODO: Delete these three lines if you don't want the toolbar to
  67. // be dockable
  68. m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
  69. EnableDocking(CBRS_ALIGN_ANY);
  70. DockControlBar(&m_wndToolBar);
  71. return 0;
  72. }
  73. BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
  74. {
  75. if( !CMDIFrameWnd::PreCreateWindow(cs) )
  76. return FALSE;
  77. // TODO: Modify the Window class or styles here by modifying
  78. // the CREATESTRUCT cs
  79. return TRUE;
  80. }
  81. /////////////////////////////////////////////////////////////////////////////
  82. // CMainFrame diagnostics
  83. #ifdef _DEBUG
  84. void CMainFrame::AssertValid() const
  85. {
  86. CMDIFrameWnd::AssertValid();
  87. }
  88. void CMainFrame::Dump(CDumpContext& dc) const
  89. {
  90. CMDIFrameWnd::Dump(dc);
  91. }
  92. #endif //_DEBUG
  93. /////////////////////////////////////////////////////////////////////////////
  94. // CMainFrame message handlers