Click here to Skip to main content
15,895,837 members
Articles / Desktop Programming / MFC

Programming Self-generating Code for Windows Applications

Rate me:
Please Sign up or sign in to vote.
4.89/5 (742 votes)
29 Feb 2008CPOL4 min read 482.6K   832   324  
Executing VC++ codes in STACK or HEAP
// self_engendered_codeView.cpp : implementation of the CSelf_engendered_codeView class
//

#include "stdafx.h"
#include "self_engendered_code.h"

#include "self_engendered_codeDoc.h"
#include "self_engendered_codeView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CSelf_engendered_codeView

IMPLEMENT_DYNCREATE(CSelf_engendered_codeView, CView)

BEGIN_MESSAGE_MAP(CSelf_engendered_codeView, CView)
	//{{AFX_MSG_MAP(CSelf_engendered_codeView)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG_MAP
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSelf_engendered_codeView construction/destruction

CSelf_engendered_codeView::CSelf_engendered_codeView()
{
	// TODO: add construction code here

}

CSelf_engendered_codeView::~CSelf_engendered_codeView()
{
}

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

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CSelf_engendered_codeView drawing

void CSelf_engendered_codeView::OnDraw(CDC* pDC)
{
	CSelf_engendered_codeDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	// TODO: add draw code for native data here
}

/////////////////////////////////////////////////////////////////////////////
// CSelf_engendered_codeView printing

BOOL CSelf_engendered_codeView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default preparation
	return DoPreparePrinting(pInfo);
}

void CSelf_engendered_codeView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add extra initialization before printing
}

void CSelf_engendered_codeView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add cleanup after printing
}

/////////////////////////////////////////////////////////////////////////////
// CSelf_engendered_codeView diagnostics

#ifdef _DEBUG
void CSelf_engendered_codeView::AssertValid() const
{
	CView::AssertValid();
}

void CSelf_engendered_codeView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}

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

/////////////////////////////////////////////////////////////////////////////
// CSelf_engendered_codeView message handlers

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
Engineer AntiDebugLIB Inc
United States United States
There are so many hackers all over the world that no software can escape the doom of being cracked.And even almost everybody believe that it is impossible to protect the applications through the technology means.But we still work hard to find applications protection solution [32-bit] [64-bit] in order to protect our works.

Homepage:

http://www.antidebuglib.com/

http://www.wintsd.com/

Comments and Discussions