资源简介
一个小例子,环境为VS2010 能够创建Word,生成一个表,并进行表的填写

代码片段和文件信息
// DlgProxy.cpp : implementation file
//
#include “stdafx.h“
#include “WordReport.h“
#include “DlgProxy.h“
#include “WordReportDlg.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CWordReportDlgAutoProxy
IMPLEMENT_DYNCREATE(CWordReportDlgAutoProxy CCmdTarget)
CWordReportDlgAutoProxy::CWordReportDlgAutoProxy()
{
EnableAutomation();
// To keep the application running as long as an automation
// object is active the constructor calls AfxOleLockApp.
AfxOleLockApp();
// Get access to the dialog through the application‘s
// main window pointer. Set the proxy‘s internal pointer
// to point to the dialog and set the dialog‘s back pointer to
// this proxy.
ASSERT_VALID(AfxGetApp()->m_pMainWnd);
if (AfxGetApp()->m_pMainWnd)
{
ASSERT_KINDOF(CWordReportDlg AfxGetApp()->m_pMainWnd);
if (AfxGetApp()->m_pMainWnd->IsKindOf(RUNTIME_CLASS(CWordReportDlg)))
{
m_pDialog = reinterpret_cast(AfxGetApp()->m_pMainWnd);
m_pDialog->m_pAutoProxy = this;
}
}
}
CWordReportDlgAutoProxy::~CWordReportDlgAutoProxy()
{
// To terminate the application when all objects created with
// with automation the destructor calls AfxOleUnlockApp.
// Among other things this will destroy the main dialog
if (m_pDialog != NULL)
m_pDialog->m_pAutoProxy = NULL;
AfxOleUnlockApp();
}
void CWordReportDlgAutoProxy::OnFinalRelease()
{
// When the last reference for an automation object is released
// OnFinalRelease is called. The base class will automatically
// deletes the object. Add additional cleanup required for your
// object before calling the base class.
CCmdTarget::OnFinalRelease();
}
BEGIN_MESSAGE_MAP(CWordReportDlgAutoProxy CCmdTarget)
END_MESSAGE_MAP()
BEGIN_DISPATCH_MAP(CWordReportDlgAutoProxy CCmdTarget)
END_DISPATCH_MAP()
// Note: we add support for IID_IWordReport to support typesafe binding
// from VBA. This IID must match the GUID that is attached to the
// dispinterface in the .IDL file.
// {8571A20C-F94F-42D2-B0EE-970BA426AC02}
static const IID IID_IWordReport =
{ 0x8571A20C 0xF94F 0x42D2 { 0xB0 0xEE 0x97 0xB 0xA4 0x26 0xAC 0x2 } };
BEGIN_INTERFACE_MAP(CWordReportDlgAutoProxy CCmdTarget)
INTERFACE_PART(CWordReportDlgAutoProxy IID_IWordReport Dispatch)
END_INTERFACE_MAP()
// The IMPLEMENT_OLECREATE2 macro is defined in StdAfx.h of this project
// {E5A69DCF-4EE1-4171-BDCA-FBF9581AC168}
IMPLEMENT_OLECREATE2(CWordReportDlgAutoProxy “WordReport.Application“ 0xe5a69dcf 0x4ee1 0x4171 0xbd 0xca 0xfb 0xf9 0x58 0x1a 0xc1 0x68)
// CWordReportDlgAutoProxy message handlers
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 45015 2010-08-13 14:55 WordReport\WordReport\CApplication.h
文件 74718 2010-08-13 14:55 WordReport\WordReport\CDocument0.h
文件 7866 2010-08-13 14:55 WordReport\WordReport\CDocuments.h
文件 39089 2010-08-13 14:55 WordReport\WordReport\CSelection.h
文件 12134 2010-08-13 16:51 WordReport\WordReport\CTable0.h
文件 2351 2010-08-13 16:51 WordReport\WordReport\CTables0.h
文件 2677 2010-08-13 14:30 WordReport\WordReport\DlgProxy.cpp
文件 738 2010-08-13 14:30 WordReport\WordReport\DlgProxy.h
文件 5434 2010-08-13 14:30 WordReport\WordReport\ReadMe.txt
文件 67777 2009-08-31 02:31 WordReport\WordReport\res\WordReport.ico
文件 804 2010-08-13 14:30 WordReport\WordReport\res\WordReport.rc2
文件 1640 2010-08-13 14:41 WordReport\WordReport\resource.h
文件 212 2010-08-13 14:30 WordReport\WordReport\stdafx.cpp
文件 2532 2010-08-13 14:48 WordReport\WordReport\stdafx.h
文件 314 2010-08-13 14:30 WordReport\WordReport\targetver.h
文件 106108 2010-08-13 14:41 WordReport\WordReport\WordReport.aps
文件 3944 2010-08-13 14:30 WordReport\WordReport\WordReport.cpp
文件 559 2010-08-13 14:30 WordReport\WordReport\WordReport.h
文件 655 2010-08-13 14:30 WordReport\WordReport\WordReport.idl
文件 11724 2010-08-13 14:41 WordReport\WordReport\WordReport.rc
文件 725 2010-08-13 14:30 WordReport\WordReport\WordReport.reg
文件 6612 2010-08-13 16:51 WordReport\WordReport\WordReport.vcxproj
文件 2959 2010-08-13 16:51 WordReport\WordReport\WordReport.vcxproj.filters
文件 143 2010-08-13 14:30 WordReport\WordReport\WordReport.vcxproj.user
文件 10353 2011-02-22 15:32 WordReport\WordReport\WordReportDlg.cpp
文件 993 2010-08-13 14:45 WordReport\WordReport\WordReportDlg.h
文件 5360 2011-02-22 15:28 WordReport\WordReport\WordReport_h.h
文件 1968 2011-02-22 15:28 WordReport\WordReport\WordReport_i.c
文件 897 2010-08-13 14:30 WordReport\WordReport.sln
文件 6331 2011-02-22 16:35 WordReport\说明.txt
............此处省略6个文件信息
- 上一篇:基于汇编实现输入字符串并显示
- 下一篇:基于FPGA EP2C8的LCD控制器
相关资源
- ACCESS财务报表(带数据).accdb
- HAP_Advanced_PDF_Password_Recovery 5.05
- ado数据库MFC图书管理系统vs2010
- [免费]强大的OFFICE经验(Word Excel)
- ReportMachine 交叉报表 学生成绩表
- 美赛论文MCM两个word模板 论文格式 w
- 项目周报格式(excel格式报表)
- 软件工程课程设计—机票预定系统
- 机械设计课程设计说明书 (word)
-
解决安装vs2012后vs2010 li
nk : fatal er - 滴滴出行行程报销单word模板
- WINCC报表(OLE-DB Tag and Alarm Export_V8.x
- 财务报表模板全套.xls
- 易语言取word打开、另存为对话框窗口
- pdfdo password remover 3.0破解汉化绿色版
- word简谱字库
- Elsevier爱思唯尔的word模板.zip
- AnkhSvn-2.6.12735 支持VS2010-VS2015 官方原版
- VS2010、VS2012、VS2013代码自动注释插件
- office_word_api 开发文档
- 插件式GIS应用框架的设计与实现&mda
- 用Delphi实现Word文件的预览
- 通过x264录制RGB屏幕视频vs2013工程,
- G726、G711、G711A转换为AAC
- VS2010 运行时库
- 易语言报表编辑器源码易语言电脑装
- SuperReport VC 报表控件以及源码.rar
- 自己写的delphi控制PPTWord的一个小程序
- 基于Office2007开发的合并会计报表系统
- Word自动排版软件 v8.2.rar
评论
共有 条评论