Currently, I am in the process of creating an ActiveX control using ATL and am facing a challenge when trying to expose a property that takes a Boolean value. Below is my implementation:
STDMETHOD(get_Visible)(VARIANT_BOOL *pVal);
STDMETHOD(put_Visible)(VARIANT_BOOL newVal);
Within my JavaScript function, I attempt to call this using the following code:
MyAxCtl.Visible = true;
//MyAxCtl.Visible = "true";
//MyAxCtl.Visible = "TRUE";
//MyAxCtl.Visible = "VARIANT_TRUE";
//MyAxCtl.Visible = -1;
//MyAxCtl.Visible = "-1";
Unfortunately, none of these methods seem to work for me. Therefore, I am seeking advice on how to effectively expose a Boolean value from an ATL ActiveX control to JavaScript.
Additionally, if anyone can direct me towards documentation regarding communication between ATL types and JavaScript types, it would be greatly appreciated. I am specifically interested in finding a comprehensive list of ATL types that can be successfully exposed to JavaScript.
Thank you in advance, Shupining