Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 382
  • Last Modified:

Win32 Rich Edit Control Problem

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
Duebel
Asked:
Duebel
  • 3
1 Solution
 
davmarcCommented:
Just a wild guess - does it work if you call?

Davide Marcato.
0
 
davmarcCommented:
...if you call InitCommonControls(), of course :-)

Davide Marcato.
0
 
DuebelAuthor Commented:
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
 
davmarcCommented:
Call AfxInitRichEdit() in InitInstance(), probably you forgot this.

Davide Marcato.
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now