Solved

Win32 Rich Edit Control Problem

Posted on 1997-09-05
4
352 Views
Last Modified: 2013-11-20
I have problems using the Rich Edit Control under Win32. I use VC5 to create a dialog based MFC application and put the Rich Edit Control onto the dialog. After I execute this app it terminates without any notice. The debugger shows "creation of dialog failed" or something like that. My app has ActiveX support enabled and I tested it also with OLE Automation enabled. I didn't change the dialog resource. I only created a new rich edit control. A simple edit control and the Microsoft ActiveX Rich Edit Control, Version 5.0 works. Where is my failure? Please help.
0
Comment
Question by:Duebel
  • 3
4 Comments
 
LVL 4

Accepted Solution

by:
davmarc earned 100 total points
Comment Utility
Just a wild guess - does it work if you call?

Davide Marcato.
0
 
LVL 4

Expert Comment

by:davmarc
Comment Utility
...if you call InitCommonControls(), of course :-)

Davide Marcato.
0
 

Author Comment

by:Duebel
Comment Utility
No, it doesn't work even if I call InitCommonControls. But displaying the rich edit controls isn't longer a problem. I used a edit control as a place holder, grab its styles and size, destroyed the edit control and created a new rich edit control in OnInitDialog. Now the dialog pops up. I can write text but I cannot paste any OLE objects into it. What I'm doing wrong now?
0
 
LVL 4

Expert Comment

by:davmarc
Comment Utility
Call AfxInitRichEdit() in InitInstance(), probably you forgot this.

Davide Marcato.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now