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

The Great PDF - Revealed

Rate me:
Please Sign up or sign in to vote.
3.51/5 (17 votes)
20 Aug 20046 min read 213.1K   4.6K   96  
A project to create PDF files using text editor and digitally sign them.
// PdfPadView.cpp : implementation of the CPdfPadView class
//

#include "stdafx.h"
#include "PdfPad.h"

#include "PdfPadDoc.h"
#include "PdfPadView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CPdfPadView

IMPLEMENT_DYNCREATE(CPdfPadView, CEditView)

BEGIN_MESSAGE_MAP(CPdfPadView, CEditView)
	//{{AFX_MSG_MAP(CPdfPadView)
	ON_WM_SIZE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPdfPadView construction/destruction

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

}

CPdfPadView::~CPdfPadView()
{
}

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

	BOOL bPreCreated = CEditView::PreCreateWindow(cs);
	cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL);	// Enable word-wrapping
 
	return bPreCreated;
}

/////////////////////////////////////////////////////////////////////////////
// CPdfPadView drawing

void CPdfPadView::OnDraw(CDC* pDC)
{
	CPdfPadDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);

	// TODO: add draw code for native data here
	
}

/////////////////////////////////////////////////////////////////////////////
// CPdfPadView diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CPdfPadView message handlers

void CPdfPadView::OnSize(UINT nType, int cx, int cy) 
{
//	CWnd* pWndChild = GetWindow(GW_CHILD);
//	if (!pWndChild)
//		return;
//	CRect rect;
//	GetClientRect(&rect);
//	pWndChild->SetWindowPos(NULL,0,0,rect.Width(),rect.Height(),
//	SWP_NOZORDER|SWP_NOMOVE);

	CEditView::OnSize(nType, cx, cy);

}

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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Engineer Hydenso Steel & Engineering Pvt Ltd
India India
Settled in the beautiful city of Kochi in India.
Started working in VC++, dotnet in the hometown from 2003 after searching hard for some position in research in robotics and Aritificial Interlligence.

Comments and Discussions