在RichEdit中找到选中的图片对象

IRichEditOle* pRichEditOle = m_SendEdit.GetIRichEditOle();
REOBJECT reobject;
IOleObject* oleobj;
ZeroMemory(&reobject, sizeof(REOBJECT));
reobject.cbStruct = sizeof(REOBJECT);
pRichEditOle->GetObject(0, &reobject, REO_GETOBJ_ALL_INTERFACES);
if((reobject.dwFlags & REO_SELECTED)  == REO_SELECTED))
{
    // 找到当前的图片对象
    reobject.dwUser // 插入图片时指定的数值

}

找了好久才找到。

你可能感兴趣的:(在RichEdit中找到选中的图片对象)