Click here to Skip to main content
15,896,469 members
Articles / Web Development / HTML

Runtime Trace

Rate me:
Please Sign up or sign in to vote.
3.60/5 (5 votes)
30 Mar 20033 min read 57.6K   1.5K   22  
Display trace messages at runtime from several running applications on different machines
// sockView.cpp : implementation of the CSockView class
//

#include "stdafx.h"
#include "sock.h"

#include "sockDoc.h"
#include "sockView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CSockView

IMPLEMENT_DYNCREATE(CSockView, CEditView)

BEGIN_MESSAGE_MAP(CSockView, CEditView)
	//{{AFX_MSG_MAP(CSockView)
	ON_COMMAND(ID_VIEW_CLEAR, OnViewClear)
	ON_COMMAND(ID_EDIT_FIND, OnEditFind)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSockView construction/destruction

CSockView::CSockView()
{
}

CSockView::~CSockView()
{
}

BOOL CSockView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	BOOL bPreCreated = CEditView::PreCreateWindow(cs);
  cs.style|=ES_READONLY;

	return bPreCreated;
}

/////////////////////////////////////////////////////////////////////////////
// CSockView drawing

void CSockView::OnDraw(CDC* pDC)
{
	CSockDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
}

/////////////////////////////////////////////////////////////////////////////
// CSockView diagnostics

#ifdef _DEBUG
void CSockView::AssertValid() const
{
	CEditView::AssertValid();
}

void CSockView::Dump(CDumpContext& dc) const
{
	CEditView::Dump(dc);
}

CSockDoc* CSockView::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSockDoc)));
	return (CSockDoc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CSockView message handlers

void CSockView::OnViewClear() 
{
  GetEditCtrl().SetWindowText(_T(""));
/*	CFont *p=GetEditCtrl().GetFont();
  LOGFONT lf;
  ZeroMemory(&lf, sizeof(LOGFONT));
  p->GetLogFont(&lf);
  int y;*/
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


Written By
Software Developer (Senior)
Europe Europe
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions