Click here to Skip to main content
16,006,453 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: On the res:// protocol Pin
soup8-Apr-02 13:03
soup8-Apr-02 13:03 
GeneralRe: On the res:// protocol Pin
Matt Newman8-Apr-02 16:10
Matt Newman8-Apr-02 16:10 
GeneralRe: On the res:// protocol Pin
Michael Dunn7-Apr-02 15:42
sitebuilderMichael Dunn7-Apr-02 15:42 
GeneralRe: On the res:// protocol Pin
soup8-Apr-02 13:05
soup8-Apr-02 13:05 
GeneralTwo threads in different processes Pin
NicholasCougar7-Apr-02 14:48
NicholasCougar7-Apr-02 14:48 
GeneralRe: Two threads in different processes Pin
Nish Nishant7-Apr-02 15:06
sitebuilderNish Nishant7-Apr-02 15:06 
GeneralRe: Two threads in different processes Pin
Bob Groves8-Apr-02 9:28
Bob Groves8-Apr-02 9:28 
QuestionCRichEditCtrl & ITextDocument???? Pin
Dave_7-Apr-02 12:33
Dave_7-Apr-02 12:33 
I am completely frustrated!

I have read from several sources, that you can use the GetIRichEditOle() function to get to the ITextDocument interface for a CRichEditCtrl.

I am using VC 6, and the RichEdit version looks like it is 3.0.

I am using the following code:

ITextDocument *pTextDoc = NULL;
IRichEditOle * ire = m_RichEdit.GetIRichEditOle();
if ((ire == NULL) || (ire->QueryInterface(IID_ITextDocument, (void**) &pTextDoc) != S_OK) || (pTextDoc == NULL)){
DWORD dwErr = GetLastError();
if (ire != NULL)
ire->Release();
TRACE("Failed ITextDoc\n");
}

The pTextDoc is always NULL. The GetLastError() returns 0.

I have also tried the method specified in MSDN, but it fails also. The method they use is very similar to the above code, so that's no surprise.

I am getting desperate! I need to get the ITextDocument interface to do some things like set the line spacing.

Please, if anyone knows how to do this, let me know.

Thank you very much,
David
AnswerRe: CRichEditCtrl & ITextDocument???? Pin
Michael Dunn7-Apr-02 12:51
sitebuilderMichael Dunn7-Apr-02 12:51 
GeneralRe: CRichEditCtrl & ITextDocument???? Pin
Dave_7-Apr-02 15:52
Dave_7-Apr-02 15:52 
GeneralRe: CRichEditCtrl & ITextDocument???? Pin
Michael Dunn7-Apr-02 16:01
sitebuilderMichael Dunn7-Apr-02 16:01 
GeneralRe: CRichEditCtrl & ITextDocument???? Pin
Dave_7-Apr-02 16:05
Dave_7-Apr-02 16:05 
GeneralCFile::modeWrite + CFile::modeRead Pin
Rickard Andersson207-Apr-02 11:05
Rickard Andersson207-Apr-02 11:05 
GeneralRe: CFile::modeWrite + CFile::modeRead Pin
Andrew Peace7-Apr-02 11:05
Andrew Peace7-Apr-02 11:05 
GeneralRe: CFile::modeWrite + CFile::modeRead Pin
Christian Graus7-Apr-02 11:58
protectorChristian Graus7-Apr-02 11:58 
GeneralRe: CFile::modeWrite + CFile::modeRead Pin
Rickard Andersson207-Apr-02 21:38
Rickard Andersson207-Apr-02 21:38 
GeneralRe: CFile::modeWrite + CFile::modeRead Pin
Christian Graus7-Apr-02 22:01
protectorChristian Graus7-Apr-02 22:01 
GeneralRe: CFile::modeWrite + CFile::modeRead Pin
Rickard Andersson207-Apr-02 22:19
Rickard Andersson207-Apr-02 22:19 
GeneralRe: CFile::modeWrite + CFile::modeRead Pin
Christian Graus7-Apr-02 23:22
protectorChristian Graus7-Apr-02 23:22 
General_variant_t objects, and the like... Pin
funbag7-Apr-02 10:38
funbag7-Apr-02 10:38 
GeneralRe: _variant_t objects, and the like... Pin
woods137-Apr-02 10:48
woods137-Apr-02 10:48 
GeneralRe: _variant_t objects, and the like... Pin
funbag7-Apr-02 11:05
funbag7-Apr-02 11:05 
Generalcaling an exe from dialog box Pin
7-Apr-02 10:41
suss7-Apr-02 10:41 
GeneralRe: caling an exe from dialog box Pin
Rickard Andersson207-Apr-02 10:54
Rickard Andersson207-Apr-02 10:54 
GeneralRe: caling an exe from dialog box Pin
7-Apr-02 11:12
suss7-Apr-02 11:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.