Click here to Skip to main content
12,243,333 members (46,077 online)
Click here to Skip to main content

Stats

893.1K views
18.1K downloads
418 bookmarked
Posted

A Complete ActiveX Web Control Tutorial

, 21 Jun 2006
This article is intended to help you get up to speed quickly with developing an ActiveX control. It will show you the basic concepts you need to know about ActiveX, such as methods, properties, and events, and how to communicate between an ActiveX control and a web page.
MyActiveX
MyActiveX
MyActiveX.def
MyActiveXCtrl.bmp
ProcessingProgressBar.gif
Release
mt.dep
MyActiveX.ocx.intermediate.manifest
MyActiveX.tlb
myactivex.inf
release
MyActiveX.exp
MyActiveX.lib
MyActiveX.ocx
��<html>

<head>

<META HTTP-EQUIV="Content-Type" content="text/html; charset=utf-16">

</head>

<body>

<pre>

<table width=100% bgcolor=#CFCFE5><tr> <td> <font face=arial size=+3>

Build Log

</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>

<h3>Rebuild started: Project: MyActiveX, Configuration: Release|Win32</h3>

</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>

Command Lines

</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>Creating temporary file "c:\dev2\MyActiveX\MyActiveX\Release\RSP00000125362964.rsp" with contents

[

/D &quot;NDEBUG&quot; /char signed /env win32  /tlb &quot;Release/MyActiveX.tlb&quot; /h &quot;MyActiveXidl.h&quot; /no_robust


.\MyActiveX.idl

]

Creating command line "midl.exe @c:\dev2\MyActiveX\MyActiveX\Release\RSP00000125362964.rsp /nologo"

Creating temporary file "c:\dev2\MyActiveX\MyActiveX\Release\RSP00000225362964.rsp" with contents

[

/O2 /GL /D &quot;WIN32&quot; /D &quot;_WINDOWS&quot; /D &quot;NDEBUG&quot; /D &quot;_USRDLL&quot; /D &quot;_WINDLL&quot; /D &quot;_UNICODE&quot; /D &quot;UNICODE&quot; /FD /EHsc /MT /Yu&quot;stdafx.h&quot; /Fp&quot;Release\MyActiveX.pch&quot; /Fo&quot;Release\\&quot; /Fd&quot;Release\vc80.pdb&quot; /W3 /c /Wp64 /Zi /TP .\PictureEx.cpp


.\MyActiveXPropPage.cpp


.\MyActiveXCtrl.cpp


.\MyActiveX.cpp


.\MainDialog.cpp

]

Creating command line "cl.exe @c:\dev2\MyActiveX\MyActiveX\Release\RSP00000225362964.rsp /nologo /errorReport:prompt"

Creating temporary file "c:\dev2\MyActiveX\MyActiveX\Release\RSP00000325362964.rsp" with contents

[

/O2 /GL /D &quot;WIN32&quot; /D &quot;_WINDOWS&quot; /D &quot;NDEBUG&quot; /D &quot;_USRDLL&quot; /D &quot;_WINDLL&quot; /D &quot;_UNICODE&quot; /D &quot;UNICODE&quot; /FD /EHsc /MT /Yc&quot;stdafx.h&quot; /Fp&quot;Release\MyActiveX.pch&quot; /Fo&quot;Release\\&quot; /Fd&quot;Release\vc80.pdb&quot; /W3 /c /Wp64 /Zi /TP .\stdafx.cpp

]

Creating command line "cl.exe @c:\dev2\MyActiveX\MyActiveX\Release\RSP00000325362964.rsp /nologo /errorReport:prompt"

Creating command line "rc.exe /d "NDEBUG" /d "_UNICODE" /d "UNICODE" /l 0x409 /I "Release" /fo"Release/MyActiveX.res" .\MyActiveX.rc"

Creating temporary file "c:\dev2\MyActiveX\MyActiveX\Release\RSP00000425362964.rsp" with contents

[

/OUT:&quot;C:\dev2\MyActiveX\Release\MyActiveX.ocx&quot; /INCREMENTAL:NO /DLL /MANIFEST /MANIFESTFILE:&quot;Release\MyActiveX.ocx.intermediate.manifest&quot; /DEF:&quot;.\MyActiveX.def&quot; /DELAYLOAD:&quot;OleAcc.dll&quot; /DEBUG /PDB:&quot;c:\dev2\MyActiveX\release\MyActiveX.pdb&quot; /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LTCG /MACHINE:X86  DelayImp.lib


&quot;.\Release\MainDialog.obj&quot;


&quot;.\Release\MyActiveX.obj&quot;


&quot;.\Release\MyActiveXCtrl.obj&quot;


&quot;.\Release\MyActiveXPropPage.obj&quot;


&quot;.\Release\PictureEx.obj&quot;


&quot;.\Release\stdafx.obj&quot;


&quot;.\Release\MyActiveX.res&quot;

]

Creating command line "link.exe @c:\dev2\MyActiveX\MyActiveX\Release\RSP00000425362964.rsp /NOLOGO /ERRORREPORT:PROMPT"

Creating temporary file "c:\dev2\MyActiveX\MyActiveX\Release\RSP00000525362964.rsp" with contents

[

/outputresource:&quot;..\release\MyActiveX.ocx;#2&quot; /manifest


.\Release\MyActiveX.ocx.intermediate.manifest

]

Creating command line "mt.exe @c:\dev2\MyActiveX\MyActiveX\Release\RSP00000525362964.rsp /nologo"

Creating temporary file "c:\dev2\MyActiveX\MyActiveX\Release\BAT00000625362964.bat" with contents

[

@echo Manifest resource last updated at %TIME% on %DATE% &gt; .\Release\mt.dep

]

Creating command line "c:\dev2\MyActiveX\MyActiveX\Release\BAT00000625362964.bat"

Creating temporary file "c:\dev2\MyActiveX\MyActiveX\Release\BAT00000725362964.bat" with contents

[

@echo off


cd ..\release


regsvr32 /s &quot;MyActiveX.ocx&quot;


if errorlevel 1 goto VCReportError


goto VCEnd


:VCReportError


echo Project : error PRJ0050: Failed to register output. Please ensure you have the appropriate permissions to modify the registry.


:VCEnd




]

Creating command line "c:\dev2\MyActiveX\MyActiveX\Release\BAT00000725362964.bat"

</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>

Output Window

</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>Creating Type Library...

Processing .\MyActiveX.idl

MyActiveX.idl

Processing C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\oaidl.idl

oaidl.idl

Processing C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\objidl.idl

objidl.idl

Processing C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\unknwn.idl

unknwn.idl

Processing C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\wtypes.idl

wtypes.idl

Processing C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\basetsd.h

basetsd.h

Processing C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\guiddef.h

guiddef.h

Processing C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\oaidl.acf

oaidl.acf

Compiling...

stdafx.cpp

Compiling...

PictureEx.cpp

.\PictureEx.cpp(528) : warning C4244: '=' : conversion from 'ULONGLONG' to 'DWORD', possible loss of data

.\PictureEx.cpp(1104) : warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data

MyActiveXPropPage.cpp

MyActiveXCtrl.cpp

MyActiveX.cpp

MainDialog.cpp

Compiling resources...

Linking...

   Creating library C:\dev2\MyActiveX\Release\MyActiveX.lib and object C:\dev2\MyActiveX\Release\MyActiveX.exp

Generating code

Finished generating code

Embedding manifest...

Registering output...

</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>

Results

</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>Build log was saved at "file://c:\dev2\MyActiveX\MyActiveX\Release\BuildLog.htm"

MyActiveX - 0 error(s), 2 warning(s)

</pre></table><table   width=100% height=20 bgcolor=#CFCFE5><tr><td><font face=arial size=+2>

</font></table></body></html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

David Marcionek
Web Developer
United States United States
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160426.1 | Last Updated 21 Jun 2006
Article Copyright 2006 by David Marcionek
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid