Hello all,
I'm trying to access an activex control from a web-page in
winCE 4.2 on CEPC. This code currently works on windows
2000. And I don't know what im' doing wrong.
I made an MFC activex control through the wizard in evc4.
I added two methods. SetNumber and GetNumber. This is the
html code I'm using to try and access the activex object:
<HTML>
<HEAD>
<TITLE>MFC WinCE ActiveX Ctrl Test</TITLE>
</HEAD>
<BODY>
<OBJECT ID=Simplex CLASSID="CLSID:56DE9F36-AB7B-411A-8289-
D3FE4A7CCE40" width=352 height=240></OBJECT>
<BR>
<FORM NAME="Controls">
<INPUT TYPE="button" VALUE="SetNumber" onClick="doSetNumber
()">
<INPUT TYPE="button" VALUE="GetNumber" onClick="doGetNumber
()">
<BR>
<INPUT TYPE="text" NAME="Number" VALUE="7" SIZE="20">
<BR>
</FORM>
<SCRIPT LANGUAGE="JavaScript">
function doSetNumber()
{
alert("Number ==" + document.Controls.Number.value);
document.Simplex.SetNumber
(document.Controls.Number.value);
}
function doGetNumber()
{
rv = document.Simplex.GetNumber();
alert("GetNumber() returned" + rv);
}
</SCRIPT>
</BODY>
</HTML>
The activex control comes up in IE fine. I see the elipse
in the box. I just can't access any methods.
This is the message I always see:
8541458 PID:c3ef422a TID:a3c8f002 0x83cb8d30: Script
Error -- URL:http://bolt/simplex2.htm LINE:38 CHAR:3
Error:Object doesn't support this property or method
I've tried referencing the object like
this "Simplex.GetNumber()" without the "document.". I
tried putting the object in the form.
I'm regestering the activex control at runtime, through
DllRegisterServer().
Any help please?
Thanks,
frank