Source code of Windows XP (NT5)
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.

89 lines
1.8 KiB

  1. // MainFrm.cpp : implementation of the CMainFrame class
  2. //
  3. #include "stdinc.h"
  4. #include "host.h"
  5. #include "MainFrm.h"
  6. #include "HostDoc.h"
  7. #include "SettingsDlg.h"
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CMainFrame
  15. IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
  16. BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
  17. //{{AFX_MSG_MAP(CMainFrame)
  18. ON_WM_CREATE()
  19. //}}AFX_MSG_MAP
  20. END_MESSAGE_MAP()
  21. static UINT indicators[] =
  22. {
  23. ID_SEPARATOR, // status line indicator
  24. ID_INDICATOR_CAPS,
  25. ID_INDICATOR_NUM,
  26. ID_INDICATOR_SCRL,
  27. };
  28. /////////////////////////////////////////////////////////////////////////////
  29. // CMainFrame construction/destruction
  30. CMainFrame::CMainFrame()
  31. {
  32. // TODO: add member initialization code here
  33. }
  34. CMainFrame::~CMainFrame()
  35. {
  36. }
  37. int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
  38. {
  39. if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
  40. return -1;
  41. if (!m_wndStatusBar.Create(this) ||
  42. !m_wndStatusBar.SetIndicators(indicators,
  43. sizeof(indicators)/sizeof(UINT)))
  44. {
  45. TRACE0("Failed to create status bar\n");
  46. return -1; // fail to create
  47. }
  48. return 0;
  49. }
  50. BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
  51. {
  52. if( !CMDIFrameWnd::PreCreateWindow(cs) )
  53. return FALSE;
  54. // TODO: Modify the Window class or styles here by modifying
  55. // the CREATESTRUCT cs
  56. return TRUE;
  57. }
  58. /////////////////////////////////////////////////////////////////////////////
  59. // CMainFrame diagnostics
  60. #ifdef _DEBUG
  61. void CMainFrame::AssertValid() const
  62. {
  63. CMDIFrameWnd::AssertValid();
  64. }
  65. void CMainFrame::Dump(CDumpContext& dc) const
  66. {
  67. CMDIFrameWnd::Dump(dc);
  68. }
  69. #endif //_DEBUG
  70. /////////////////////////////////////////////////////////////////////////////
  71. // CMainFrame message handlers