Click here to Skip to main content
15,891,777 members
Articles / Containers / Virtual Machine

An extendable report editor

Rate me:
Please Sign up or sign in to vote.
5.00/5 (11 votes)
3 Sep 2008CPOL3 min read 41.1K   2K   35  
An extendable report editor. You can simply add your own controls without recompiling the program or writing annoying plug-ins.
// WndConsole.cpp: implementation of the CWndConsole class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "WndConsole.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CWndConsole::CWndConsole()
{
    this->InitBasic();
}
CWndConsole::~CWndConsole()
{
    this->Destroy();
}
int CWndConsole::InitBasic()
{
    CWnd::InitBasic();
	this->eb_console = NULL;

    return OK;
}
int CWndConsole::Init()
{
    this->InitBasic();
    CWnd::Init();
    //add your code
    return OK;
}
int  CWndConsole::Destroy()
{
    //add your code
	DEL(this->eb_console);
    CWnd::Destroy();
    this->InitBasic();
    return OK;
}

int CWndConsole::OnCreate(WPARAM wparam, LPARAM lparam)
{
	NEW(this->eb_console,CEditBox);
	this->eb_console->Init();
	this->eb_console->SetParent(hwnd);
	this->eb_console->SetMaxText(3*1024*1024);
	this->eb_console->Create();
	this->eb_console->SetStockFont(OEM_FIXED_FONT);

	return OK;
}

int CWndConsole::OnClose(WPARAM wparam, LPARAM lparam)
{
	this->Hide();
	return OK;
}

int CWndConsole::OnSize(WPARAM wparam, LPARAM lparam)
{
	RECT r;
	::GetClientRect(hwnd,&r);

	this->eb_console->MoveWindow(0,0,r.right,r.bottom);

	return OK;
}

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
China China
26 years old, 2 years work experience.

Comments and Discussions