Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I insert a image into a CRichEditCrl ?

Status
Not open for further replies.

dafi

Programmer
Apr 19, 2001
25
RO
I want to make a Chat interface and I want to insert some "faces" into a Richedit control.
I found some code that loads the bitmap from a file something like smiley.bmp.
I also know how to save a resource bitmap to a file.
BUT, I want an easier way to load a bitmap into a richedit control from a resource, something like IDB_MYBITMAP.
Another problem: it takes a lot of time to create my bitmap handlers for the pictures that I want to insert.
The code uses interfaces from COM which I'm not familiar.
It loads the bitmap with CreateOleFromFile and a lot of parameters , many of them are created using other methods as strange as that is.

help me please ... :)
 
Hi dafi,

could you let me know if you found a way to do it. I think I have the same problem. Additionally, inserting a BMP as a file with
InsertFileAsObject(FileName)
works fine in Win95, but not in Win2000 or WinNT. Let me know if you found a way to insert it as a resource.

llanfair
 
try to use Internet Explorer ActiveX controll. It ahs method navigate. John Fill
1c.bmp


ivfmd@mail.md
 
Hi,
I think CreateOleFromFile and InsertFileAsObject is for using in CRichEditView ...
Now, i want to know how can i put picture from resource or file in CRichEditCtrl object ?!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top