Can't get OLE interface
  Home FAQ Contact Sign in
comp.os.mswindows.programmer.ole only
 
Advanced search
POPULAR GROUPS

more...

comp.os ... programmer.ole Profile…
 Up
Can't get OLE interface         


Author: Nemo
Date: Apr 15, 2008 12:57

Hi. I am trying to insert an image into a RichEditCtrl, and was
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.

Any insight, I'm sure, would be handy.

Thanks,
no comments