WWW.DISSERS.RU

    !


Pages:     | 1 | 2 ||

// Parse command line for standard shell commands, DDE, file open CCommandLineInfo cmdInfo;

ParseCommandLine(cmdInfo);

// Dispatch commands specified on the command line if (!ProcessShellCommand(cmdInfo)) return FALSE;

// The one and only window has been initialized, so show and update it.

m_pMainWnd->ShowWindow(SW_SHOW);

m_pMainWnd->UpdateWindow();

return TRUE;

} /////////////////////////////////////////////////////////////////////////// // // CAboutDlg dialog used for App About class CAboutDlg : public CDialog { public:

CAboutDlg();

// Dialog Data //{{AFX_DATA(CAboutDlg) enum { IDD = IDD_ABOUTBOX };

//}}AFX_DATA // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CAboutDlg) protected:

virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected:

//{{AFX_MSG(CAboutDlg) // No message handlers //}}AFX_MSG DECLARE_MESSAGE_MAP() };

CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) { //{{AFX_DATA_INIT(CAboutDlg) //}}AFX_DATA_INIT } void CAboutDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX);

//{{AFX_DATA_MAP(CAboutDlg) //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) //{{AFX_MSG_MAP(CAboutDlg) // No message handlers //}}AFX_MSG_MAP END_MESSAGE_MAP() // App command to run the dialog void CNewprjApp::OnAppAbout() { CAboutDlg aboutDlg;

aboutDlg.DoModal();

} newprjView.h // newprjView.h : interface of the CNewprjView class /////////////////////////////////////////////////////////////////////////// // class CNewprjView : public CView { protected: // create from serialization only CNewprjView();

DECLARE_DYNCREATE(CNewprjView) // Attributes public:

CNewprjDoc* GetDocument();

// Operations public:

// Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CNewprjView) public:

virtual void OnDraw(CDC* pDC); // overridden to draw this view virtual BOOL PreCreateWindow(CREATESTRUCT& cs);

protected:

virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);

virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);

virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);

//}}AFX_VIRTUAL // Implementation public:

virtual ~CNewprjView();

protected:

// Generated message map functions protected:

//{{AFX_MSG(CNewprjView) // NOTE - the ClassWizard will add and remove member functions here.

// DO NOT EDIT what you see in these blocks of generated code ! //}}AFX_MSG DECLARE_MESSAGE_MAP() };

/////////////////////////////////////////////////////////////////////////// // NewprjView.cpp.

// newprjView.cpp : implementation of the CNewprjView class #include "stdafx.h" #include "newprj.h" #include "newprjDoc.h" #include "newprjView.h" /////////////////////////////////////////////////////////////////////////// // // CNewprjView IMPLEMENT_DYNCREATE(CNewprjView, CView) BEGIN_MESSAGE_MAP(CNewprjView, CView) //{{AFX_MSG_MAP(CNewprjView) // 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_PREVIE W, CView::OnFilePrintPreview) END_MESSAGE_MAP() /////////////////////////////////////////////////////////////////////////// // // CNewprjView construction/destruction CNewprjView::CNewprjView() { // TODO: add construction code here } CNewprjView::~CNewprjView() { } BOOL CNewprjView::PreCreateWindow(CREATESTRUC T& cs) { // TODO: Modify the Window class or styles here by modifying // the CREATESTRUCT cs return CView::PreCreateWindow(cs);

} /////////////////////////////////////////////////////////////////////////// // // CNewprjView drawing void CNewprjView::OnDraw(CDC* pDC) { CNewprjDoc* pDoc = GetDocument();

ASSERT_VALID(pDoc);

// TODO: add draw code for native data here } /////////////////////////////////////////////////////////////////////////// // // CNewprjView printing BOOL CNewprjView::OnPreparePrinting(CPrintInfo* pInfo) { // default preparation return DoPreparePrinting(pInfo);

} void CNewprjView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: add extra initialization before printing } void CNewprjView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: add cleanup after printing } CNewprjDoc* CNewprjView::GetDocument() // non-debug version is inline { ASSERT(m_pDocument>IsKindOf(RUNTIME_CLASS(CNewprjDoc)));

return (CNewprjDoc*)m_pDocument;

} 1. ., ., . Microsoft Visual C++ 6.0 / . . : ;

.: , 2001. 864 .

2. .. Visual C++. . .: -, 2001. .

3. .. MFC. . :

-, 2000. 640 .

4. .., . Visual C++ MFC. Windows NT Windows 95. 3- . .:BHV, 1997. 384 .

Pages:     | 1 | 2 ||










2011 www.dissers.ru -

, .
, , , , 1-2 .