Leaked source code of windows server 2003
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.

94 lines
2.1 KiB

  1. // MainFrm.cpp : implementation of the CMainFrame class
  2. //
  3. #include "stdafx.h"
  4. #include "watcher.h"
  5. #include "MainFrm.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CMainFrame
  13. IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
  14. BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
  15. //{{AFX_MSG_MAP(CMainFrame)
  16. // NOTE - the ClassWizard will add and remove mapping macros here.
  17. // DO NOT EDIT what you see in these blocks of generated code !
  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