Use of ActiveX controls in Windows CE

Source: Internet
Author: User

InWinCE


Use ActiveX
Controls and windows (2 k, XP)
The biggest difference below is to compile two versions of OCX
, OneInstall

To window
In the EVC
Use ocx in Environment
Programming, one installation to wince
Used to use the OCX
.




A simple OCX
After trying, you can/
Simulator wince4.2
. The procedure is as follows:



1.
Development CE
OCX
Control. First in EVC
Develop your own OCX
Control. After compilation is successful, OCX
Will be automatically downloaded to the simulator.



2.
Register the control in the simulator.
Registration Method: Use EVC
Remote filter Viewer
Load directory c:/program files/Microsoft Embedded C ++ 4.0/EVC/wce400/target/x86/regsvrce.exe
To SimulatorWindows


Directory. Directly add the regsvrce.exe
To the simulator. Run regsvrce.exe on the simulator after Beibei is successful.
, Register the control, such as running "regsvrce ceactivexbtn. ocx
",
That is, ceactivexbtn is registered.
Control.



4.
Develop Win32
OCX
Control. In VC
Create a project with the same name as the above project (must be the same, otherwise it will not succeed ),
Project) Two project files DSW
And DSP
Copy to CE
Under the control project directory, and vcw
And VCP
Put it in the same directory, and then open the VC under this directory
Project, it is found that the "Win32 Unicode debug" is selected in the compilation Configuration
", Compilation, may produce a link error, that is, the difference mfc42ud; LIB
. Of course, if VC
This error will not occur if the installation is complete. But it doesn't matter. Change the configuration to "Win32 debug ".
In this way, the compilation is successful. Compiled, VC
The Win32 is automatically registered.
Version OCX
Control.


5
. In EVC
Add this Win32
Version (not CE
Version) OCX
Control. Method To create a demo
Project, in the dialog box editor of the Project, right-click the menu "insert ActiveX Controls
", Insert ActiveX controls appears
Window, click "add controls"
"Button to find
Compiled Win32
OCX
Control, Add.


OK
! Now you can
Call the OCX
Programming.


When used on a board, register it.



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.