Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. RTF of a Text

RTF of a Text

Scheduled Pinned Locked Moved C / C++ / MFC
c++jsonhelptutorialquestion
3 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jhony george
    wrote on last edited by
    #1

    Hai experts, I need to get RTF format of a text...how to gat this...any api or how...using VC++? Pls help me.....:)

    K N 2 Replies Last reply
    0
    • J Jhony george

      Hai experts, I need to get RTF format of a text...how to gat this...any api or how...using VC++? Pls help me.....:)

      K Offline
      K Offline
      karle
      wrote on last edited by
      #2

      I would try this. a) Create an invisible CRichEditCtrl (or use a visible one). b) Set the text with SetWindowText (or type or paste it into your control). c) To get the Text in RTFFormat use StreamOut Method. There is a small sample in MSDN for this. If you are not using MFC: a) Create a Window of richedit class. (CreateWindow(...) b) use WM_SETTEXT c) send EM_STREAMOUT - Message to the created window

      1 Reply Last reply
      0
      • J Jhony george

        Hai experts, I need to get RTF format of a text...how to gat this...any api or how...using VC++? Pls help me.....:)

        N Offline
        N Offline
        normanS
        wrote on last edited by
        #3

        It depends what you are trying to do. RTF is all readable text - create a "Hello world" document using word pad and save it as RTF, then open it using Notepad. That's a minimal RTF document. If you want to make your own RTF documents from a program, use the contents of that Wordpad-generated file as a basis, just replace the "Hello world" with whatever you need to output from your program. As I said, it depends what you are trying to do in the RTF document.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups