Copy/paste (other font) into RichEdit
-
I have a rich-edit where I only want to support *one* font (Tahoma 10pt. etc.) set up at time of constructing of the edit. This works fine when writing in it. But how do I force my text into this specific font and look when pasted in - from some other size and font? Think it's something about monitoring the clipboard format but I'm not sure? Regards, Michael Mogensen, mm it-consult dk.
-
I have a rich-edit where I only want to support *one* font (Tahoma 10pt. etc.) set up at time of constructing of the edit. This works fine when writing in it. But how do I force my text into this specific font and look when pasted in - from some other size and font? Think it's something about monitoring the clipboard format but I'm not sure? Regards, Michael Mogensen, mm it-consult dk.
-
Handle OnPaste(), and add the text yourself (so do not do the call to the base class) ~RaGE();
Where is OnPaste() a member? Not in CWnd nor in CRichEdit - last one have a Paste() only? As far as I can see in CWnd I have: ChangeClipboardChain(...) SetClipboardViewer(...) OpenClipboard(...) GetClipboardOwner(...) GetOpenClipboardWindow(...) GetClipboardViewer(...) and in CRichEdit: Copy(...) Cut(...) Paste(...) PasteSpecial(...) CanPaste(...) I'm a little puzzled here - I can understand what you are thinking, but... (working with MFC 6.0 not .net) Regards, Michael Mogensen, mm it-consult dk.