Problem with rich edit control and com 
Author Message
 Problem with rich edit control and com

I have a dialog box that has a rich edit control on it.  My application uses
COM.  I call AfxInitRichEdit in the app's InitInstance(..) method.  I call
the rich edit's Create(..) method in the dialog's InitDlg(..) method.

Everything works just fine if I call CoInitialize(NULL) intimating the STA.
But if I call CoInitializeEx(NULL,COINIT_MULTITHREADED), then the Create(..)
method of the CRichEditCtrl fails (during debugging, I noticed that the
failure was actually coming from the OnNcCreate(..) message handler).

Although I don't have an outstanding COM call and I have no interface
pointers, out of desperation I did try the work around suggested in KB
Q166132 - but that did not solve anything.  Does the ES_EX_NOCALLOLEINIT
style apply in RichEdit 2.0, or is that a RichEdit 1.0 only style?

My app is absolutely thread safe - so I used Free Threading for performance.
I have little or no desire to put the COM and Rich Edit control in different
threads just to get the OleInitialize to work in the control.   Any
suggestions would be greatly appreciated.

roy fine



Mon, 04 Aug 2003 01:45:54 GMT  
 Problem with rich edit control and com
Never mind - i fixed it..

I switched to SDK (dropped the MFC CRichEditCtrl class) - did the
LoadLibrary using richedit20.dll and CreateEx using class name RichEdit20A,
recoded the Streamin stuff, and my free threaded app with rihc edit controls
all works just great now.

rlf



Mon, 04 Aug 2003 05:30:47 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Rich Edit Control Printing Problem (like the print preview problem)

2. Using Rich Edit Control or ip address control in a composite control

3. Problem with printing content of a Rich-Edit ActiveX Control

4. Problems with Syntax Coloring in Rich Edit Control!

5. Rich edit control problem (Focus not changing with tab)

6. Rich Edit Control problems in Windows 2000

7. stock font problems in a (rich) edit control / view

8. Frustrating Rich Edit control problem

9. mouse input problem in dialog (Rich edit control)

10. problems detecting a right-click even on a rich edit control

11. Rich Edit Control / FormatRange problem

12. Problem with printing content of a Rich-Edit ActiveX Control

 

 
Powered by phpBB® Forum Software