VBScriptJScript and ActiveX's two-way interaction

xiaoxiao2021-03-05  24

First, how to use ATL to do ActiveX?

I asked a lot of COM masters, I didn't say it. Finally, I use the most stupid practice, find MSDN. I found out that I found the best path. MSDN (2004) VC.NET -> VC -> Add Function -> VC Library -> ATL -> ATL Tutorial. This is explained. Exercise well. MFC is also familiar with it.

Second, VBScript / JScript and ActiveX interaction

With ATL textbooks, we can get a polygon ActiveX, which allows IE to get two events Click and Clickout.

[Uuid ​​(F9040106-F2F3-417E-92B0-2D58E4E83C6B), helpstring ( "_ IPolyCtrl event interface")] dispinterface _IPolyCtrlEvents {properties: methods: [id (1), helpstring ( "Method ClickIn")] void ClickIn ([in] Long x, [in] long y); [ID (2), Helpstring ("Method Clickout")] Void ClickOut ([in] long x, [in] long y);

Examples and provide interactive code with VBScript, as follows: