Click here to Skip to main content
15,881,139 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am making a atl control in which I can show image in richedit. To support copy & paste I implemented :

public IPersistStreamInitImpl<cmyimagectrl>,
public IPersistStorageImpl<cmyimagectrl>


and override
HRESULT IPersistStreamInit_Load(LPSTREAM pStm, const ATL_PROPMAP_ENTRY* pMap);
HRESULT IPersistStreamInit_Save(LPSTREAM pStm, BOOL fClearDirty, const ATL_PROPMAP_ENTRY* pMap);


Something wrong occurred when pasting, IPersistStreamInit_Load was never called. Then I found IRichEditOleCallback::QueryInsertObject's first parameter value was CLSID_Picture but not the one I defined.

I'm a new hand at atl & com, so I don't know what the essential mistake I have made ?
Posted
Comments
The_Inventor 6-Sep-13 1:03am    
A bit more code would help. Declarations, initializations, function prototypes, etc. with function bodies in {}, anything that is needed, IYO, to copy and past an image into your RichEdit control.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900