资源简介
一个实现自定义ActiveX控件的demo
TestActiveX.html页面中通过两种方式(OBJECT对象引用和ActiveXObject对象创建)访问ActiveX控件对象的方法和属性
解决 意外地调用了对象的方法和属性访问

代码片段和文件信息
// MyActiveXDemo.cpp : Implementation of CMyActiveXDemoApp and DLL registration.
#include “stdafx.h“
#include “MyActiveXDemo.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
CMyActiveXDemoApp NEAR theApp;
const GUID CDECL baseD_CODE _tlid =
{ 0xada199 0x9ba3 0x4b68 { 0xbd 0xa4 0x7c 0xb7 0xde 0x5a 0x67 0xa2 } };
const WORD _wVerMajor = 1;
const WORD _wVerMinor = 0;
////////////////////////////////////////////////////////////////////////////
// CMyActiveXDemoApp::InitInstance - DLL initialization
BOOL CMyActiveXDemoApp::InitInstance()
{
BOOL bInit = COleControlModule::InitInstance();
if (bInit)
{
// TODO: Add your own module initialization code here.
}
return bInit;
}
////////////////////////////////////////////////////////////////////////////
// CMyActiveXDemoApp::ExitInstance - DLL termination
int CMyActiveXDemoApp::ExitInstance()
{
// TODO: Add your own module termination code here.
return COleControlModule::ExitInstance();
}
/////////////////////////////////////////////////////////////////////////////
// DllRegisterServer - Adds entries to the system registry
STDAPI DllRegisterServer(void)
{
AFX_MANAGE_STATE(_afxModuleAddrThis);
if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle() _tlid))
return ResultFromScode(SELFREG_E_TYPELIB);
if (!COleobjectFactoryEx::UpdateRegistryAll(TRUE))
return ResultFromScode(SELFREG_E_CLASS);
return NOERROR;
}
/////////////////////////////////////////////////////////////////////////////
// DllUnregisterServer - Removes entries from the system registry
STDAPI DllUnregisterServer(void)
{
AFX_MANAGE_STATE(_afxModuleAddrThis);
if (!AfxOleUnregisterTypeLib(_tlid _wVerMajor _wVerMinor))
return ResultFromScode(SELFREG_E_TYPELIB);
if (!COleobjectFactoryEx::UpdateRegistryAll(FALSE))
return ResultFromScode(SELFREG_E_CLASS);
return NOERROR;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 920 2013-04-04 12:18 MyActiveXDemo\MyActiveXDemo.clw
文件 1985 2013-04-04 12:18 MyActiveXDemo\MyActiveXDemo.cpp
文件 234 2013-04-04 12:18 MyActiveXDemo\MyActiveXDemo.def
文件 8788 2013-04-04 12:18 MyActiveXDemo\MyActiveXDemo.dsp
文件 551 2013-04-04 12:18 MyActiveXDemo\MyActiveXDemo.dsw
文件 1008 2013-04-04 12:18 MyActiveXDemo\MyActiveXDemo.h
文件 1078 2013-04-04 12:18 MyActiveXDemo\MyActiveXDemo.ico
文件 2091 2013-04-04 12:26 MyActiveXDemo\MyActiveXDemo.odl
文件 49664 2013-04-05 17:28 MyActiveXDemo\MyActiveXDemo.opt
文件 3041 2013-04-05 17:09 MyActiveXDemo\MyActiveXDemo.plg
文件 4331 2013-04-04 12:18 MyActiveXDemo\MyActiveXDemo.rc
文件 238 2013-04-04 12:18 MyActiveXDemo\MyActiveXDemoCtl.bmp
文件 6739 2013-04-04 16:21 MyActiveXDemo\MyActiveXDemoCtl.cpp
文件 2631 2013-04-04 12:54 MyActiveXDemo\MyActiveXDemoCtl.h
文件 2555 2013-04-04 12:18 MyActiveXDemo\MyActiveXDemoPpg.cpp
文件 1506 2013-04-04 12:18 MyActiveXDemo\MyActiveXDemoPpg.h
文件 3278 2013-04-04 12:18 MyActiveXDemo\ReadMe.txt
文件 36864 2013-04-05 17:09 MyActiveXDemo\Release\MyActiveXDemo.ocx
文件 590 2013-04-04 12:18 MyActiveXDemo\Resource.h
文件 204 2013-04-04 12:18 MyActiveXDemo\StdAfx.cpp
文件 1185 2013-04-04 12:18 MyActiveXDemo\StdAfx.h
文件 1004 2013-04-04 13:08 MyActiveXDemo\TestActiveX.html
目录 0 2013-04-04 12:28 MyActiveXDemo\Debug
目录 0 2013-04-05 17:09 MyActiveXDemo\Release
目录 0 2013-04-05 17:28 MyActiveXDemo
文件 66560 2013-04-05 17:28 MyActiveXDemo\MyActiveXDemo.ncb
----------- --------- ---------- ----- ----
197045 26
相关资源
- uploadifive1.2.2 uploadify HTML5
- 管理系统HTML模板
- 非常漂亮的导航菜单(html)
- 网页文件HTML
-
html中获取xm
l数据 - HTML AJAX(手写ajax)显示数据库数据
- HTML5 CSS3 :canvas 模拟实现电子彩票刮
- 仿Win10 UI界面(前端html模板)
- 永劫无间主题 html+css
- 登录html
- 游戏商城html模板(首页)
- 生日祝福html代码(带背景音乐)
- 基础html小米商城
- W3C html5 参考手册(教学资源免费)
- html5 2048小游戏
- oa html模板(基于Vue开发)
- 个人网站备案的HTML模板
- html旅游静态网站
- 简易京东网页HTML代码(HTMLamp;JS;)
- 有问必答项目 html源码
- html 塔防游戏runner
- html 二十一点
- 生日祝福html网页源码(特效很多)
- 时时彩网站 html模板(手机端 )
- HTML可视化面板
- 印象烘培 首页html源码
- H5彩票网站html代码
- 教育类网站html代码
- 人才招聘资讯博客HTML模板手机版自适
- 新浪手机新闻网站模板首页html源码
评论
共有 条评论