mfc编写的activex控件,在网页中如何使用呀?
#include <olectl.h>
#include <idispids.h>
[ uuid(A4F5A21C-D400-419D-AC96-966B1F934CD4), version(1.0),
helpfile("pingcontrol1.hlp"),
helpstring("pingcontrol1 ActiveX Control module"),
control ]
library PINGCONTROL1Lib
{
importlib(STDOLE_TLB);
importlib(STDTYPE_TLB);
// Primary dispatch interface for CPingcontrol1Ctrl
[ uuid(018FC0F0-D379-45F9-AA3F-49408BF61638),
helpstring("Dispatch interface for Pingcontrol1 Control"), hidden ]
dispinterface _DPingcontrol1
{
properties:
// NOTE - ClassWizard will maintain property information here.
// Use extreme caution when editing this section.
//{{AFX_ODL_PROP(CPingcontrol1Ctrl)
//}}AFX_ODL_PROP
methods:
// NOTE - ClassWizard will maintain method information here.
// Use extreme caution when editing this section.
//{{AFX_ODL_METHOD(CPingcontrol1Ctrl)
//}}AFX_ODL_METHOD
[id(DISPID_ABOUTBOX)] void AboutBox();
};
// Event dispatch interface for CPingcontrol1Ctrl
[ uuid(CDBEAB87-2E7C-421A-8E8C-FA6C594FDDCA),
helpstring("Event interface for Pingcontrol1 Control") ]
dispinterface _DPingcontrol1Events
{
properties:
// Event interface has no properties
methods:
// NOTE - ClassWizard will maintain event information here.
// Use extreme caution when editing this section.
//{{AFX_ODL_EVENT(CPingcontrol1Ctrl)
//}}AFX_ODL_EVENT
};
// Class information for CPingcontrol1Ctrl
[ uuid(088512AF-768B-4534-B9F9-3BC41F98E5CF),
helpstring("Pingcontrol1 Control"), control ]
coclass Pingcontrol1
{
[default] dispinterface _DPingcontrol1;
[default, source] dispinterface _DPingcontrol1Events;
};
//{{AFX_APPEND_ODL}}
//}}AFX_APPEND_ODL}}
};
==================================================
<html>
<head>
<title> </title>
</head>
<OBJECT ID= "pingcontrol1"
CLASSID= "clsid:A4F5A21C-D400-419D-AC96-966B1F934CD4"
CODEBASE= "pingcontrol1.ocx"
align=center>
</OBJECT>
<body>
</body>
</html>
==================================================
关键是clsid和id不知道设置的对不对,网页里面看不到控件