Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Win32 Rich Edit Control Problem

Posted on 1997-09-05
4
Medium Priority
?
379 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 200 total points
ID: 1305818
Just a wild guess - does it work if you call?

Davide Marcato.
0
 
LVL 4

Expert Comment

by:davmarc
ID: 1305819
...if you call InitCommonControls(), of course :-)

Davide Marcato.
0
 

Author Comment

by:Duebel
ID: 1305820
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
ID: 1305821
Call AfxInitRichEdit() in InitInstance(), probably you forgot this.

Davide Marcato.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

926 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