Would it be possible to precise the licencing terms for this article?
ReplyI want implement a progress bar in RichEdit control
Very useful
ReplyI found when you delete an image, the memory that the image used hadn't been freed, how could we do this?
I would like to know the answer to this question too. :) I google it and it appears that a lot of people have this problem but nobody has a solution for it. I ran some tests and the problem exists even for plain text too. If you remove text from the edit, the memory is not freed. I posted messages on different forums, so , if I get any feedback, I will post it here. I hope somebody will hear our cry for help and give us a hand ( or a hint ).
ReplyIs there a way to alter the code so that we can add masked bitmpas, or set a colour which will be the mask? Thanks Allan
There has a problem:In my procedure,that can carry out DynaChange the BackgroundColor of my RichEdit Ctrl,then ,How did DynaChange the BackgroundColor of a Bitmap that is same alike to the RichEditCtrl's? Please help me!Thanks!Reply
Originally posted by: Mak
While working with RichEdit, I came across such a problem: when you retreive IRichEditOle, then do insertion of some IOleObject, then delete it and then, insert again the same or another object, the IRichEditOle and it's IOleClientSite are INVALID and insertion rizes access violation. So, before involving any OLE operation, I advise you to retreive "fresh" IRichEditOle and it's IOleClientSite. Be warned ;)
ReplyOriginally posted by: Haim
Facing same problem as Togak below:
The call to: OleCreateStaticFromData returns:
0x8007000e which is 'E_OUTOFMEMORY' and the 'pOleObject' is NULL.
In the CImageDataObject::GetOleObject()
...
SCODE sc;
IOleObject *pOleObject;
sc = ::OleCreateStaticFromData(this, IID_IOleObject, OLERENDER_FORMAT, &m_fromat, pOleClientSite, pStorage, (void **)&pOleObject);
ASSERT(sc == S_OK);
Guys, does anyone have a clue what can be wrong?
Any help is appreciated.
Originally posted by: Marques
I would like to know how can I translate this code to pure c because, because I dont use classes.
CImageDataObject *pods = new CImageDataObject;
LPDATAOBJECT lpDataObject;
pods->QueryInterface(IID_IDataObject, (void**)&lpDataObject);
Thanks
Originally posted by: mkd
whenever an image is inserted, the memory usage goes up (as shown in the task manager). so, when the user presses bckspace to remove the image, the memory usage should go down .. right?? but it doesn't !!
every image i enter (size is 18x18 pixels only) takes up nearly 32 kb of memory ..
Originally posted by: Tugak
your code will not work if i create dialog using SDK method, and the richedit is the child of that dialog. i traced everything in your code but it got failed in
sc = ::OleCreateStaticFromData(this, IID_IOleObject, OLERENDER_FORMAT, &m_format, pOleClientSite, pStorage, (void **)&pOleObject);
sc != S_OK
and the rest of codes will generate application error.
did i missd something?
ReplyOriginally posted by: bruce
after:
CImageDataObject::InsertBitmap(m_pRichEditOle, hBitmap);
please add:
DeleteObject(hBitmap);
otherwise GDI Resource Leak