Re: Can't get OLE interface
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Sun, 20 Apr 2008 18:08:01 -0400
At what point are you calling this? Are you sure the m_ctlRichText.m_hWnd is a valid
window handle? Otherwise it looks like it should work, given the article.
Otherwise, I'm as stuck as you are.
joe
On Wed, 16 Apr 2008 16:26:37 -0700 (PDT), Nemo <nnimod@xxxxxxxxx> wrote:
Hi. I am trying to insert an image into a RichEditCtrl, and wasJoseph M. Newcomer [MVP]
following the code provided at MSDN KB 220844.
I seem to be getting stuck right at the first step. The assert
following the SendMessage always fails :
::SendMessage(m_ctlRichText.m_hWnd, EM_GETOLEINTERFACE, 0,
(LPARAM)&m_pRichEditOle);
ASSERT(m_pRichEditOle != NULL);
I tried to look up on MSDN, but I can't seem to find any documentation
as to why the attempt to get the interface might fail. Yet. I have a
funny feeling it is some initialization call that I must be missing.
btw, I do call AfxInitRichEdit(). I even stuck in a AfxOleInit() to be
sure.
I even tried using the GetIRichEditOle() method. But the same result -
I got back a null pointer.
Any insight, I'm sure, would be handy.
Thanks,
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: Can't get OLE interface
- From: Nemo
- Re: Can't get OLE interface
- References:
- Can't get OLE interface
- From: Nemo
- Can't get OLE interface
- Prev by Date: Re: return string
- Next by Date: Re: Thread problem
- Previous by thread: Can't get OLE interface
- Next by thread: Re: Can't get OLE interface
- Index(es):
Relevant Pages
|
|