|
#include "StdAfx.h"
#include "demoredir.h"
CDemoRedirector::CDemoRedirector(void)
{
m_pWnd = NULL;
}
CDemoRedirector::~CDemoRedirector(void)
{
}
void CDemoRedirector::WriteStdOut(LPCSTR pszOutput)
{
if (m_pWnd != NULL)
{
int nSize = m_pWnd->GetWindowTextLength();
m_pWnd->SetSel(nSize, nSize);
m_pWnd->ReplaceSel(pszOutput); // add the message to the end of Edit control
}
}
void CDemoRedirector::WriteStdError(LPCSTR pszError)
{
WriteStdOut("\r\nError message: ");
WriteStdOut(pszError);
}
|
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.
Nick Adams is one of my favorite figures in Hemingway's stories. I use it because Jeff Lee has been occupied on Codeproject.