?? traceview.cpp
字號:
// TraceView.cpp : implementation file
//
#include "stdafx.h"
#include "AutoDemo.h"
#include "TraceView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
INT DocStringType[]={CDocTemplate::windowTitle,
CDocTemplate::docName ,
CDocTemplate::fileNewName ,
CDocTemplate::filterName,
CDocTemplate::filterExt ,
CDocTemplate::regFileTypeId ,
CDocTemplate::regFileTypeName
};
/////////////////////////////////////////////////////////////////////////////
// CTraceView
IMPLEMENT_DYNCREATE(CTraceView, CEditView)
CTraceView::CTraceView()
{
m_isDisplayed=FALSE;
}
CTraceView::~CTraceView()
{
}
BEGIN_MESSAGE_MAP(CTraceView, CEditView)
//{{AFX_MSG_MAP(CTraceView)
ON_WM_CREATE()
ON_WM_SHOWWINDOW()
ON_WM_DESTROY()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTraceView drawing
void CTraceView::OnDraw(CDC* pDC)
{
CEditView::OnDraw(pDC);
CDocument* pDoc = GetDocument();
// TODO: add draw code here
/* pDC->SetTextAlign(TA_UPDATECP);
CDocTemplate * pTemplate=pDoc->GetDocTemplate();
CPoint curPoint(0,0);
CString strExt;
for(int i=0;i<sizeof(DocStringType)/sizeof(INT);i++)
{
pTemplate->GetDocString(strExt,(CDocTemplate::DocStringIndex)DocStringType[i]);
pDC->TextOut(curPoint.x,curPoint.y,CString(strExt));
pDC->TextOut(0,0,CString(" _ "));
CString str;
pDC->TextOut(curPoint.x,curPoint.y,traceStr);}*/
}
/////////////////////////////////////////////////////////////////////////////
// CTraceView diagnostics
#ifdef _DEBUG
void CTraceView::AssertValid() const
{
CView::AssertValid();
}
void CTraceView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
#endif //_DEBUG
int CTraceView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CView::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
return 0;
}
void CTraceView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
{
// TODO: Add your specialized code here and/or call the base class
this->SetWindowText(traceStr);
}
void CTraceView::OnShowWindow(BOOL bShow, UINT nStatus)
{
CEditView::OnShowWindow(bShow, nStatus);
// TODO: Add your message handler code here
if(!m_isDisplayed)
{
::PostMessage(((CMDIFrameWnd*)(((CAutoDemoApp *)::AfxGetApp())->m_pMainWnd))->m_hWndMDIClient,WM_MDITILE,MDITILE_HORIZONTAL, 0);
m_isDisplayed=TRUE;
}
}
void CTraceView::OnInitialUpdate()
{
CEditView::OnInitialUpdate();
// TODO: Add your specialized code here and/or call the base class
CEdit &edit=GetEditCtrl();
edit.SetReadOnly();
}
void CTraceView::OnDestroy()
{
CEditView::OnDestroy();
CAutoDemoApp * pApp=(CAutoDemoApp *)::AfxGetApp();
pApp->pDocScn=NULL;
pApp->pDocTra=NULL;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -