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. CRichEditCtrl::StreamOut property

CRichEditCtrl::StreamOut property

Scheduled Pinned Locked Moved C / C++ / MFC
2 Posts 2 Posters 0 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.
  • A Offline
    A Offline
    amit code
    wrote on last edited by
    #1

    Hi .. I am using CRichEditCtrl::StreamOut function to get the rtf of richedit control in cstring variable, but its not returning multibyte character(chinese, korean)which i entered as text in richedit control. Is there any flag needs to be set to get this values. Thanks

    amit

    S 1 Reply Last reply
    0
    • A amit code

      Hi .. I am using CRichEditCtrl::StreamOut function to get the rtf of richedit control in cstring variable, but its not returning multibyte character(chinese, korean)which i entered as text in richedit control. Is there any flag needs to be set to get this values. Thanks

      amit

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      This worked for me:

      DWORD __stdcall EditStreamCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
      {
      LPCWSTR a = LPCWSTR(pbBuff);
      // Manipulate a
      return 0;
      }

      // In a message handler
      EDITSTREAM es = { 100, 0, &EditStreamCallback };
      rich_.StreamOut(SF_TEXT|SF_UNICODE, es);

      The important bit is specifying the SF_UNICODE flag in conjunction with the SF_TEXT flag.

      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

      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