Announcement

Collapse
No announcement yet.

Picture in Richedit

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Picture in Richedit

    I would like to add a picture into the Richedit along with my text. So far
    my research has told me that you can do it, but not really how to do it
    (Short of just opening an RTF and stream it into the Richedit)

    What I would like to do is similar (but can't seem to find anything to lead me in the right
    direction in the Forums or POFF's)

    Tell me if I am wrong, or if anyone can direct me how to do this, but my best guess is I have to do the following:
    [list=1][*] Load my image from the resource file (easily done).[*] Somehow translate the image to a hex string representing each pixel of the image (Done this before (I think) but cannot remember how.[*] Format the resulting string with the correct RTF codes (Some research should show me that, since I have seen "\pic" as a code indicating "Start Picture"[*] Append the string in with the rest of my RTF string (easy)[*] Streamin the string into the Richedit[/list=a]

    I think it should be as easy as that (but what do I know? I have been wrong before *L*)

    Can anyone point me the right direction?

    ------------------
    Engineer's Motto: If it aint broke take it apart and fix it

    "If at 1st you don't succeed... call it version 1.0"

    "Half of Programming is coding"....."The other 90% is DEBUGGING"

    "Document my code????" .... "WHYYY??? do you think they call it CODE? "

  • #2
    Borje has an answer.. http://www.reonis.com/POFFS (look for richole.zip)

    Many thanks to Don Ewald for keeping his code (and POFFS!) available to us.

    You could also look into using the clipboard to programmatically transfer
    (pictures) into a Rich Edit control.

    Rgds Dave

    ------------------
    Rgds, Dave

    Comment

    Working...
    X