From: Nemo on
Joe,

Thanks for all the replies. My earlier question (as to why I am not
able to find another instance to this problem) put me on the right
track. It turned out that I wasn't configuring the control correctly
in the resource file. For a multitude of reasons, the resource file is
hand-edited for this project I am working on - and well, I obviously
mucked my entry.

Ajay,

The reason I need the interface is that I wanted to insert an image in
the control. The code is in KB I talked about in my first post.

On Apr 21, 2:21 pm, Ajay Kalra <ajayka...(a)yahoo.com> wrote:
> I am curious as to why do you need this interface?
>
> --
> Ajay
>
> On Apr 16, 7:26 pm, Nemo <nni...(a)gmail.com> wrote:
>
> > 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 Ican'tseem to find any documentation
> > as to why the attempt togetthe 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,

From: Ajay Kalra on
On Apr 24, 12:03 pm, Nemo <nni...(a)gmail.com> wrote:
> Joe,
>
> Thanks for all the replies. My earlier question (as to why I am not
> able to find another instance to this problem) put me on the right
> track. It turned out that I wasn't configuring the control correctly
> in the resource file. For a multitude of reasons, the resource file is
> hand-edited for this project I am working on - and well, I obviously
> mucked my entry.
>

Hand editing of resource file doesnt sound good at all. This may
create problems if you use resource editor.

---
Ajay
From: David Ching on
"Ajay Kalra" <ajaykalra(a)yahoo.com> wrote in message
news:7cd04a49-fb97-456b-b9f1-ba9aed760863(a)56g2000hsm.googlegroups.com...
> Hand editing of resource file doesnt sound good at all. This may
> create problems if you use resource editor.
>

However, many a time it is by far the fastest and most efficient way to go.

-- David


From: Joseph M. Newcomer on
For example, if you add a new radio button to a group, you have no choice but to hand-edit
resource.h. If you rename an ID of a control, hand-editing the .rc file is often the most
effective way. But note that all these hand-edits remain compatible with the resource
editor. Doing hand-edits that are NOT compatible with the resource editor (such that if
you ever edit the resources in the resource editor your application stops compiling) would
be a Really Bad Idea. That's what the .rc2 file is for.
joe

On Wed, 30 Apr 2008 04:30:22 -0700, "David Ching" <dc(a)remove-this.dcsoft.com> wrote:

>"Ajay Kalra" <ajaykalra(a)yahoo.com> wrote in message
>news:7cd04a49-fb97-456b-b9f1-ba9aed760863(a)56g2000hsm.googlegroups.com...
>> Hand editing of resource file doesnt sound good at all. This may
>> create problems if you use resource editor.
>>
>
>However, many a time it is by far the fastest and most efficient way to go.
>
>-- David
>
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Ajay Kalra on
> That's what the .rc2 file is for.

Now that you mentioned it, thats how we did it. We never touched .rc
file.

--
Ajay
First  |  Prev  | 
Pages: 1 2
Prev: UNICODE conversion
Next: CListCtrl sort not working