Salut, voici mon fichier CCarnetView.cpp
on me dit de declarer une variable en globale, mais ou dois je la declarer???
// CarnetView.cpp : implementation of the CCarnetView class
//
#include "stdafx.h"
#include "Carnet.h"
#include "CarnetDoc.h"
#include "CarnetView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//////////////////////////////////////////////////
///////////////////////////
// CCarnetView
IMPLEMENT_DYNCREATE(CCarnetView, CFormView)
BEGIN_MESSAGE_MAP(CCarnetView, CFormView)
//{{AFX_MSG_MAP(CCarnetView)
// 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, CFormView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CFormView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CFormView::OnFilePrintPreview)
END_MESSAGE_MAP()
///////////////////////////////////////////////////////
//////////////////////
// CCarnetView construction/destruction
CCarnetView::CCarnetView()
: CFormView(CCarnetView::IDD)
{
//{{AFX_DATA_INIT(CCarnetView)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
// TODO: add construction code here
}
CCarnetView::~CCarnetView()
{
}
void CCarnetView::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CCarnetView)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BOOL CCarnetView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CFormView::PreCreateWindow(cs);
}
void CCarnetView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
GetParentFrame()->RecalcLayout();
ResizeParentToFit();
}
/////////////////////////////////////////////////////////////////////////////
// CCarnetView printing
BOOL CCarnetView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CCarnetView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CCarnetView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
void CCarnetView::OnPrint(CDC* pDC, CPrintInfo* /*pInfo*/)
{
// TODO: add customized printing code here
}
/////////////////////////////////////////////////////////////////////////////
// CCarnetView diagnostics
#ifdef _DEBUG
void CCarnetView::AssertValid() const
{
CFormView::AssertValid();
}
void CCarnetView::Dump(CDumpContext& dc) const
{
CFormView::Dump(dc);
}
CCarnetDoc* CCarnetView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CCarnetDoc)));
return (CCarnetDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CCarnetView message handlers