| |

VerySource

 Forgot password?
 Register
Search
View: 738|Reply: 3

How to replace a picture in richedit with a string

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-29 19:40:01
| Show all posts |Read mode
As the title, I used ole in CRichEditCtrl to implement inserting pictures. Now I want to get the position of the picture in the content before transmitting the content in richedit and replace the picture in richedit with a string?
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-6-18 11:45:01
| Show all posts
I also encountered this problem, I use CFile: Read, can not use CString
Reply

Use magic Report

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-8-21 21:30:02
| Show all posts
//Get a few bitmaps in RichEdit, here assume there are bitmap files in RichEdit
    int c = m_sendRichEdit.GetOleInterface()->GetObjectCount();

   for(int i = 0; i <c; i++) //traverse the bitmap
   {
       REOBJECT object; //Bitmap information exists here
     memset(&object,0,sizeof(REOBJECT));
     object.cbStruct = sizeof(REOBJECT);
     m_sendRichEdit.GetOleInterface()->GetObject(i,&object,REO_GETOBJ_ALL_INTERFACES);

     int pos = object.cp; //position information of bitmap
     DWORD dwUSer =object.dwUSer; //Bitmap information,}
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-6 02:00:01
| Show all posts
I also encountered a similar problem!
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list