ActiveX: Debugging in VC is normal. The reason why the Red Cross is displayed in IE.

Source: Internet
Author: User

(For your convenience .)

Today, an ActiveX control is generated using the wizard of vs2010. No default settings are called. Then, use the tool provided by IDE to test and display an ellipse normally.

Then, use the <Object> label to embed it into the webpage. ie shows a Big Red Cross, with no prompt. I don't know whether it is the security settings of IE or any other reasons.

There are all online sayings about the interfaces to be implemented by the ActiveX control generated by the wizard. I remember that I was embedded before and didn't implement any interfaces, So I ignored these irresponsible interfaces.

Statement. And then keep tossing. Tossing to a strange situation in the object tag CLSID: F34B3C63-AE6B-4659-AA87-1041E480309F CLSID removed, actually IE

The Red Cross in is gone. A four-byte box is displayed, which means this is the cause. Then, we carefully check that the code embedded in flash by Adobe also has this CLSID.

I think it is not here. If you look at it carefully, you should be able to display an elliptic.

Finally, I was depressed and found that I got the wrong classid, because the IDL file generated by the wizard contains four classid, and the first classid is not what we wanted (hateful ).

In Microsoft, we put the classid of OCX that we didn't want first, and added version = 1.0, Which I mistakenly thought was the only one.

// Classid of the cspiritactivexctrl class information is the ID we want.

At this point, the classid is changed, and the ellipse Appears normally in IE.

A bunch of complaints, purely for your future problems, are easy to find. It would be a great honor to help you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.