• 大小: 220KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-09
  • 语言: C/C++
  • 标签: MFC  单文档  多视图  

资源简介

这个是用VC实现的单文档多视图的表现程序,希望对大家有用

资源截图

代码片段和文件信息

// MainFrm.cpp : implementation of the CMainframe class
//

#include “stdafx.h“
#include “SdiMulti.h“

#include “MainFrm.h“

#include “SdiMDoc.h“

#include “View1.h“
#include “View2.h“
#include “View3.h“
#include “View4.h“
#include “View5.h“
#include “View6.h“
#include “View7.h“

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

/////////////////////////////////////////////////////////////////////////////
// CMainframe

IMPLEMENT_DYNCREATE(CMainframe CSDiframeWnd)

BEGIN_MESSAGE_MAP(CMainframe CSDiframeWnd)
//{{AFX_MSG_MAP(CMainframe)
ON_WM_CREATE()
ON_COMMAND(ID_VIEW_EDIT_VIEW OnViewEditView)
ON_COMMAND(ID_VIEW_SPLITTER1_TREE_VIEW OnViewSplitter1TreeView)
ON_COMMAND(ID_VIEW_SPLITTER1_LIST_VIEW OnViewSplitter1ListView)
ON_COMMAND(ID_VIEW_SPLITTER2_VIEW_VIEW OnViewSplitter2ViewView)
ON_COMMAND(ID_VIEW_SPLITTER2_SCROLL_VIEW OnViewSplitter2ScrollView)
ON_COMMAND(ID_VIEW_RICH_EDIT_VIEW OnViewRichEditView)
ON_COMMAND(ID_VIEW_FORM_VIEW OnViewFormView)
ON_UPDATE_COMMAND_UI(ID_VIEW_EDIT_VIEW OnUpdateViewEditView)
ON_UPDATE_COMMAND_UI(ID_VIEW_FORM_VIEW OnUpdateViewFormView)
ON_UPDATE_COMMAND_UI(ID_VIEW_RICH_EDIT_VIEW OnUpdateViewRichEditView)
ON_UPDATE_COMMAND_UI(ID_VIEW_SPLITTER1_LIST_VIEW OnUpdateViewSplitter1ListView)
ON_UPDATE_COMMAND_UI(ID_VIEW_SPLITTER1_TREE_VIEW OnUpdateViewSplitter1TreeView)
ON_UPDATE_COMMAND_UI(ID_VIEW_SPLITTER2_SCROLL_VIEW OnUpdateViewSplitter2ScrollView)
ON_UPDATE_COMMAND_UI(ID_VIEW_SPLITTER2_VIEW_VIEW OnUpdateViewSplitter2ViewView)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

static UINT indicators[] =
{
ID_SEPARATOR           // status line indicator
ID_INDICATOR_CAPS
ID_INDICATOR_NUM
ID_INDICATOR_SCRL
};

/////////////////////////////////////////////////////////////////////////////
// CMainframe construction/destruction

CMainframe::CMainframe()
{
// TODO: add member initialization code here

}

CMainframe::~CMainframe()
{
}

int CMainframe::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CSDiframeWnd::OnCreate(lpCreateStruct) == -1)
return -1;

if (!m_wndToolBar.Create(this) ||
!m_wndToolBar.LoadToolBar(IDR_MAINframe))
{
TRACE0(“Failed to create toolbar\n“);
return -1;      // fail to create
}

if (!m_wndStatusBar.Create(this) ||
!m_wndStatusBar.SetIndicators(indicators
  sizeof(indicators)/sizeof(UINT)))
{
TRACE0(“Failed to create status bar\n“);
return -1;      // fail to create
}

// TODO: Remove this if you don‘t want tool tips or a resizeable toolbar
m_wndToolBar.SetBarstyle(m_wndToolBar.GetBarstyle() |
CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);

// TODO: Delete these three lines if you don‘t want the toolbar to
//  be dockable
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);

return 0;
}

BOOL CMainframe::PreCreateWindow(CREATESTRUCT& cs)
{

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       5280  1999-02-07 13:21  chap5\5.1\SdiMulti\MainFrm.cpp

     文件          0  2003-06-14 16:15  chap5\5.1\SdiMulti\MainFrm.h

     文件       2512  1999-08-01 23:09  chap5\5.2\PrintSample\MainFrm.cpp

     文件       1581  1999-08-01 23:09  chap5\5.2\PrintSample\MainFrm.h

     文件       2337  1999-08-02 00:29  chap5\5.2\PrintSample\PrintSample.clw

     文件       4299  1999-08-01 23:09  chap5\5.2\PrintSample\PrintSample.cpp

     文件       4660  1999-08-01 23:09  chap5\5.2\PrintSample\PrintSample.dsp

     文件        545  1999-08-01 23:09  chap5\5.2\PrintSample\PrintSample.dsw

     文件       1411  1999-08-01 23:09  chap5\5.2\PrintSample\PrintSample.h

     文件      10623  1999-08-01 23:09  chap5\5.2\PrintSample\PrintSample.rc

     文件       2170  1999-08-02 01:04  chap5\5.2\PrintSample\PrintSampleDoc.cpp

     文件       1654  1999-08-01 23:54  chap5\5.2\PrintSample\PrintSampleDoc.h

     文件       5463  1999-08-02 01:04  chap5\5.2\PrintSample\PrintSampleView.cpp

     文件       2197  1999-08-02 00:23  chap5\5.2\PrintSample\PrintSampleView.h

     文件       1078  1999-08-01 23:09  chap5\5.2\PrintSample\res\PrintSample.ico

     文件        403  1999-08-01 23:09  chap5\5.2\PrintSample\res\PrintSample.rc2

     文件       1078  1999-08-01 23:09  chap5\5.2\PrintSample\res\PrintSampleDoc.ico

     文件       1078  1999-08-01 23:09  chap5\5.2\PrintSample\res\Toolbar.bmp

     文件        499  1999-08-01 23:09  chap5\5.2\PrintSample\Resource.h

     文件        213  1999-08-01 23:09  chap5\5.2\PrintSample\StdAfx.cpp

     文件       1079  1999-08-01 23:49  chap5\5.2\PrintSample\StdAfx.h

     文件      20346  2000-08-22 09:26  chap5\5.3\ViewScroll\LogScrollView.cpp

     文件       2577  2000-08-08 11:37  chap5\5.3\ViewScroll\LogScrollView.h

     文件       2485  2000-08-24 13:06  chap5\5.3\ViewScroll\MainFrm.cpp

     文件       1499  2000-08-24 13:06  chap5\5.3\ViewScroll\MainFrm.h

    ..A..H.      6144  2003-06-08 01:10  chap5\5.3\ViewScroll\res\Thumbs.db

     文件       1078  2000-08-21 08:16  chap5\5.3\ViewScroll\res\Toolbar.bmp

     文件       1078  2000-08-21 08:16  chap5\5.3\ViewScroll\res\ViewScroll.ico

     文件        402  2000-08-21 08:16  chap5\5.3\ViewScroll\res\ViewScroll.rc2

     文件       1078  2000-08-21 08:16  chap5\5.3\ViewScroll\res\ViewScrollDoc.ico

............此处省略153个文件信息

评论

共有 条评论