MainFrm.cpp 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. // MainFrm.cpp : implementation of the CMainFrame class
  2. //
  3. #include "stdafx.h"
  4. #include "MyImageWork.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_DYNCREATE(CMainFrame, CFrameWnd)
  14. BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
  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 (CFrameWnd::OnCreate(lpCreateStruct) == -1)
  40. return -1;
  41. /* if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
  42. | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
  43. !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
  44. {
  45. TRACE0("Failed to create toolbar\n");
  46. return -1; // fail to create
  47. }
  48. if (!m_wndStatusBar.Create(this) ||
  49. !m_wndStatusBar.SetIndicators(indicators,
  50. sizeof(indicators)/sizeof(UINT)))
  51. {
  52. TRACE0("Failed to create status bar\n");
  53. return -1; // fail to create
  54. }
  55. // TODO: Delete these three lines if you don't want the toolbar to
  56. // be dockable
  57. m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
  58. EnableDocking(CBRS_ALIGN_ANY);
  59. DockControlBar(&m_wndToolBar);
  60. */
  61. return 0;
  62. }
  63. BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
  64. {
  65. if( !CFrameWnd::PreCreateWindow(cs) )
  66. return FALSE;
  67. // TODO: Modify the Window class or styles here by modifying
  68. // the CREATESTRUCT cs
  69. return TRUE;
  70. }
  71. /////////////////////////////////////////////////////////////////////////////
  72. // CMainFrame diagnostics
  73. #ifdef _DEBUG
  74. void CMainFrame::AssertValid() const
  75. {
  76. CFrameWnd::AssertValid();
  77. }
  78. void CMainFrame::Dump(CDumpContext& dc) const
  79. {
  80. CFrameWnd::Dump(dc);
  81. }
  82. #endif //_DEBUG
  83. /////////////////////////////////////////////////////////////////////////////
  84. // CMainFrame message handlers
  85. void CMainFrame::ZFTJHH()
  86. {
  87. }