Back to index

lightning-sunbird  0.9+nobinonly
MainFrm.cpp
Go to the documentation of this file.
00001 // MainFrm.cpp : implementation of the CMainFrame class
00002 //
00003 
00004 #include "stdafx.h"
00005 #include "winldap.h"
00006 
00007 #include "MainFrm.h"
00008 
00009 #ifdef _DEBUG
00010 #ifdef _WIN32
00011 #define new DEBUG_NEW
00012 #endif
00013 #undef THIS_FILE
00014 static char THIS_FILE[] = __FILE__;
00015 #endif
00016 
00018 // CMainFrame
00019 
00020 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
00021 
00022 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
00023        //{{AFX_MSG_MAP(CMainFrame)
00024        ON_WM_CREATE()
00025        //}}AFX_MSG_MAP
00026 END_MESSAGE_MAP()
00027 
00028 static UINT indicators[] =
00029 {
00030        ID_SEPARATOR,           // status line indicator
00031        ID_INDICATOR_CAPS,
00032        ID_INDICATOR_NUM,
00033        ID_INDICATOR_SCRL,
00034 };
00035 
00037 // CMainFrame construction/destruction
00038 
00039 CMainFrame::CMainFrame()
00040 {
00041 }
00042 
00043 CMainFrame::~CMainFrame()
00044 {
00045 }
00046 
00047 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00048 {
00049        if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
00050               return -1;
00051        
00052        if (!m_wndStatusBar.Create(this) ||
00053               !m_wndStatusBar.SetIndicators(indicators,
00054                 sizeof(indicators)/sizeof(UINT)))
00055        {
00056               TRACE0("Failed to create status bar\n");
00057               return -1;      // fail to create
00058        }
00059 
00060        return 0;
00061 }
00062 
00063 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00064 {
00065        return CFrameWnd::PreCreateWindow(cs);
00066 }
00067 
00069 // CMainFrame diagnostics
00070 
00071 #ifdef _DEBUG
00072 void CMainFrame::AssertValid() const
00073 {
00074        CFrameWnd::AssertValid();
00075 }
00076 
00077 void CMainFrame::Dump(CDumpContext& dc) const
00078 {
00079        CFrameWnd::Dump(dc);
00080 }
00081 
00082 #endif //_DEBUG
00083 
00085 // CMainFrame message handlers