115 lines
2.2 KiB
C++
115 lines
2.2 KiB
C++
// MainFrm.cpp : implementation of the CMainFrame class
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "Sys.h"
|
|
|
|
#include "MainFrm.h"
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CMainFrame
|
|
|
|
IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
|
|
|
|
BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
|
|
//{{AFX_MSG_MAP(CMainFrame)
|
|
ON_WM_CREATE()
|
|
ON_WM_CLOSE()
|
|
ON_WM_ACTIVATE()
|
|
ON_WM_ACTIVATEAPP()
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
static UINT indicators[] =
|
|
{
|
|
ID_SEPARATOR, // status line indicator
|
|
ID_SHOWMOUSEVOLT, //显示鼠标的指针的位置
|
|
ID_SHOWMOUSEVOLT, // status line indicator
|
|
ID_INDICATOR_CAPS,
|
|
ID_INDICATOR_NUM,
|
|
ID_INDICATOR_SCRL,
|
|
};
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CMainFrame construction/destruction
|
|
|
|
CMainFrame::CMainFrame()
|
|
{
|
|
// TODO: add member initialization code here
|
|
|
|
}
|
|
|
|
CMainFrame::~CMainFrame()
|
|
{
|
|
}
|
|
|
|
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
|
{
|
|
if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
|
|
{
|
|
|
|
if( !CMDIFrameWnd::PreCreateWindow(cs) )
|
|
return FALSE;
|
|
// TODO: Modify the Window class or styles here by modifying
|
|
return TRUE;
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CMainFrame diagnostics
|
|
|
|
#ifdef _DEBUG
|
|
void CMainFrame::AssertValid() const
|
|
{
|
|
CMDIFrameWnd::AssertValid();
|
|
}
|
|
|
|
void CMainFrame::Dump(CDumpContext& dc) const
|
|
{
|
|
CMDIFrameWnd::Dump(dc);
|
|
}
|
|
|
|
#endif //_DEBUG
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CMainFrame message handlers
|
|
|
|
extern BOOL bWaitInt;
|
|
void CMainFrame::OnClose()
|
|
{
|
|
|
|
if(bWaitInt)
|
|
{
|
|
AfxMessageBox(L"中断没有释放,您不能退出", MB_ICONWARNING);
|
|
return;
|
|
}
|
|
CMDIFrameWnd::OnClose();
|
|
}
|
|
|
|
void CMainFrame::SetMouseVolt(CString strText)//把鼠标的指针的位置显状态栏上
|
|
{
|
|
|
|
}
|
|
|
|
void CMainFrame::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized)
|
|
{
|
|
CMDIFrameWnd::OnActivate(nState, pWndOther, bMinimized);
|
|
}
|
|
|
|
void CMainFrame::OnActivateApp(BOOL bActive, DWORD hTask)
|
|
{
|
|
CMDIFrameWnd::OnActivateApp(bActive, hTask);
|
|
// TODO: Add your message handler code here
|
|
}
|
|
|