To be in the Web page to call VC Write dialog box, then you have to create an OCX, the following will be step-by-step to teach you how to write OCX:
The first step is to choose MFC ActiveX ControlWizard, write the name of the creation project, then press "NEXT" until "finish", so that a simple MFC-type OCX framework has been completed;
The second step is to add a dialog box to the resource and create a new class for the dialog box;
The third step is to add a method for OCX, see figure: Classwizard->add methods, select OK:
Next, add the following code to void COcxtestCtrl::testocx()
{
CTok test;
test.DoModal ();
}
the method: Don't forget to add the dialog box class. H file Oh!
The fourth step compiles this OCX bar, after compiling the compiler will register this OCX control, then in "file name. Odl" to look for "project name Control", you will see the following: [ uuid(4FCAE43F-9212-4ECE-A804-D25D792CCEE1),
helpstring("Ocxtest Control"), control
note the UUID (in the 4fcae43f-9212-4ece-a804-d25d792ccee1 "This string of content, and so on in HTML to use.
The fifth step is to create an HTML file that reads as follows: <HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
<!--
Sub button1_onclick
DOcxtest1.testocx ()
End Sub
-->
</SCRIPT>
</HEAD>
<BODY>
<P>
<INPUT id=button1 type=button value=Button name=button1>
<OBJECT id=DOcxtest1 classid=clsid:4FCAE43F-9212-4ECE-A804-D25D792CCEE1>
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="_ExtentX" VALUE="2646">
<PARAM NAME="_ExtentY" VALUE="1323">
<PARAM NAME="_StockProps" VALUE="0"></OBJECT>
</P>
</BODY>
</HTML>
Note: The value of the CLSID is changed according to the value registered on the machine, try it!
This article supporting source code