织梦CMS - 轻松建站从此开始!

罗索

WinCE下的OCX编程及其调用相关问题

落鹤生 发布于 2009-12-02 17:17 点击:次 
主要目的是完成OCX在CE下的应用
TAG:

主要目的是完成OCX在CE下的应用。2天按照以下步骤完成:

1、 在Win XP+VC+VB下完成了一个简单的OCX和一个调用程序。以验证其制作过程的正确性。
2、 在CE下实现比较麻烦。到处找了资料后,在仿真器下实现了:
A、先在EVC中开发自己的OCX控件。
B、在仿真器中注册(用EVC的“remote filter viewer”加regsvrce.exe到仿真器,.ocx文件自己会加入仿真器中)
C、执行“regsvrce.+.ocx”注册
D、在VC中创建一个和以上工程名字一样的工程,按照以下方法完成:
Except for stdafx.cpp, delete all source files, headers, and dependencies from the project and close the project workspace.
 
 Because the new .dsp and .dsw files must go into the same directory as the original control project, rename the .dsp and .dsw files. For example, if the original project name is Grid, then rename your files to Grid_win32.dsp and Grid_win32.dsw.
 
With a text editor, open the .dsw file in Visual C++ and edit the file to reflect the new project name. Close the .dsw file when you are finished.
 
Copy the .dsp and .dsw files to the original project directory. This directory contains the original .dsp and .dsw files, plus the source files.
 
 Open the new .dsw file in Visual C++ as a workspace and add the files from step 1 to this project.
 
 Verify that the output control name is the same name as the original project name, such as Grid.ocx rather than Grid_win32.ocx. This control name is specified in Project, Settings, Link, and Output file names.
 
 Make any necessary changes to the project source code to account for differences between the Windows CE operating system and Windows desktop operating systems.
3、 完成CE在自己开发环境和仿真器的注册后,在EVC中开发调用程序(执行程序会自己加到仿真器中)。OK!!!
4、 在终端上也可以实现,只是要加C:\Program Files\Windows CE Tools\wce420\STANDARDSDK_420\Mfc\Lib\X86下的mfcce400d.dll和olece400d.dll
 
注:另外还可以利用USB接口、串口、红外线连接终端开发
(落鹤生)
本站文章除注明转载外,均为本站原创或编译欢迎任何形式的转载,但请务必注明出处,尊重他人劳动,同学习共成长。转载请注明:文章转载自:罗索实验室 [http://www.rosoo.net/a/200912/8070.html]
本文出处:未知 作者:落鹤生
顶一下
(1)
100%
踩一下
(0)
0%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片
栏目列表
将本文分享到微信
织梦二维码生成器
推荐内容