为什么带有RichEdit的MFC Visual C ++ 2003项目无法运行? [英] Why MFC Visual C++ 2003 project with RichEdit doesnt run ?

查看:87
本文介绍了为什么带有RichEdit的MFC Visual C ++ 2003项目无法运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

向大家问好:为什么带有RichEdit的MFC Visual C ++ 2003项目无法运行?

我正在XP上使用Visual Studio 2003运行MFC Dialog项目,
当我添加RichEdit 2.0 Activex控件时,该项目仅不运行或理论上不运行,但不显示主窗口/对话框并立即退出.退出代码为CERO:
程序"[1264] xxxxxx.exe:本机"已退出,代码为0

当我删除控件时,项目将运行.

编译器不会生成任何错误或警告.

如果您知道答案并知道是否有任何区别,请告诉我Visual Studio 2002,因为这是我将在其中使用的真实版本.

预先谢谢您.

Hello greetings to all : Why MFC Visual C++ 2003 project with RichEdit doesnt run ?

I am running a MFC Dialog project with Visual Studio 2003 on XP,
when I add a RichEdit 2.0 activex control the project just doesnt run or in theory run but does not show the main window/dialog and exits immediately. The exit code is CERO :
The program ''[1264] xxxxxx.exe: Native'' has exited with code 0

When I delete the control the project runs.

The compiler doesnt generate any error or warning.

If you know the answer and know if there is any difference en Visual Studio 2002 let me know because this is the real version in which I will work on.

Thank you in advance.

推荐答案

您在代码中的某个位置调用了AfxInitRichEdit(在创建richedit控件之前)吗?

msdn上的CRichEditCtrl [
Did you call AfxInitRichEdit somewhere in your code (before creating the richedit control) ?

CRichEditCtrl on msdn[^]


如Maximilien所说,请在您的Application类的InitInstance函数中调用AfxInitRichEdit.
As Maximilien told , Call AfxInitRichEdit in InitInstance function of your Application class.


这篇关于为什么带有RichEdit的MFC Visual C ++ 2003项目无法运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆