|
// 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.