OCX Development Summary.

Source: Internet
Author: User
Tags visual studio 2010

I.AboutActiveX

ActiveX is Microsoft's strategic object-orientedProgramThe name of technology and tool. The main technology is Component Object Model (COM ). When creating ActiveX programs, the main task is components, a program that can run freely in ActiveX networks. This component is the ActiveX near control. ActiveX is Microsoft's defense against sunmicrosystemsJavaThe function of this control is similar to that of Java applet.

 

II.ActiveX Development Environment

The FFMPEG-based OCX development uses the Visual Studio 2010 environment as the compilation platform, because the vsplatform provides good support for developing OCX class libraries and the already used MFC framework. The Class Wizard tool provided by Vs can help developers to quickly add events.

 

III.Relationship between OCX and Web

OCX is called a plug-in (control). It is usually used as a client in a browser because it is small and almost unaffected by the running environment, and it can automatically remind users to update data. Generally, OCX is called by web in the following format:

<Head>
</Head>
<Body>
<Div>

<Object ID = "myactivex1" width = 400 Height = 300

Classid = "CLSID: E6FB5690-0648-4DBC-8571-B57BE03B80EB"

Codebase = "XXX. Cab">

</Object>

 



classid is vs id generated by century "> OCX . You can use oleview. EXE tool. The codebase attribute is . the path of the cab file. cab is OCX is packaged to OCX are packaged into . cab Format File. OCX dependent files can be accessed through depends. EXE tool. Several tools used for packaging can be downloaded from the Internet, and the format of the . inf file is also described on the Internet.

UsuallyActiveXAfter the control is developed and registered, once it is run on a webpage,IEIt is not considered as a script safe, andIETip: the site has been blocked from being used in an insecure manner.ActiveXControl, this does not matter, click the first item to installOK.

 

4.OCX Interface

The OCX interface is used for interactive development between the web and OCX controls. You can use the Class Wizard option provided by Vs to create functions. You can use JSP or other scripting languages to call the API on the web.

 

5.OCX development considerations

1.To enableMFCWindow embeddedWebProgram, must be setMFCFormStyleThe property isChild.

2.VisibleThe property isTrueOtherwise, the form is not displayed.

3. Similar errors may be reported during compilation:

Error msb8011: Wei ' Yes \ Uinput2 Note ? Volume E Input Output O . B Please try Enable P " G By € Use P User Heavy D Set E Direction U " H , C Or ? By O Enable G Use P Submit N Litre ! Of I Permission Limited A Slave C Life ? Ling S Submit N Display | Character ? Location Note ? Volume E This group Parts ? . B

This does not matter,OCXIt has been generated successfully, but the compiler has no use for successful registration. You can manually register the compiler.

4.OCXManually register as input in the command line run windowRegsvr32ThenOCXDrag the file into the input box, and press enter to register successfully. If not, pleaseOCXAdd dependenciesOXCFolder.

5.OCX.Regsvr32Add another parameter./UYou can.

6. OCX cannot be run independently, therefore, you can use Web to load OCX or use the tool vs : tstcon32.exe , which is also available in 2010 , However, you must compile Code to generate the code. You can use the preceding debugging tool in the vc6.0 installation directory.

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.