问题
I am currently working on a project. I have an rtf file which contains some text and images both. I need to display those images and text from rtf to richtextbox in Visual C++. We are not using .Net frameworks or MFC's so everything is in Visual C++ only.
I do'nt have any idea how to do it. If anyone can guide me then it will be really helpful. Thanks in advance.
回答1:
RichTextBox cannot load HTML. It can load only RTF or plain text.
There are 3rd party components that can convert HTML to RTF, but they don't really do a good job especially when dealing with images. I had done intensive research on this for my sticky notes product Notezilla.
You can use the Web Browser control to show your HTML.
来源:https://stackoverflow.com/questions/22097956/visual-c-load-rtf-document-contains-images-and-text-in-richedit-box