Click to See Complete Forum and Search --> : A question never answered here.


Hopless
March 31st, 1999, 10:16 PM
Hi,


I posted a question sometime ago about embeding graphics ( BMP ... ) in a CRichEditCtrl.


And I have seen this question asked frequently by others here.


I searched the Internet for a way to do that but in vain.


Can anyone help.

Vanya
March 31st, 1999, 11:21 PM
I think gomez Addams can show u one way.

Don't get depressed. Did u check Bitmaps and palletts?

Check it once again.

Hope u can get answer.

Wish u all the best.

indika
April 1st, 1999, 07:59 AM
pWnd->GetRichEditCtrl().SetSel(m_BinfielPos,m_BinfielPos);

pWnd->InsertFileAsObject( (LPCTSTR) m_LocalBinFile);

CRichEditCntrItem* pItem = NULL;

TRY

{

// create item from dialog results

pItem = pWnd->GetDocument()->CreateClientItem(NULL);

pItem->m_bLock = TRUE;

int TEST = pItem->CreateFromFile( (LPCTSTR) m_LocalBinFile);

if(TEST == 0)

{

AfxMessageBox("Unable to Insert Bitmap to Window");

pItem->Delete();

return;

}

HRESULT hr = pWnd->InsertItem(pItem);

pItem->UpdateItemType();

pItem->m_bLock = FALSE;

if (hr != NOERROR)

{

AfxThrowOleException(hr);

}

// if insert new object -- initially show the object

pItem->DoVerb(OLEIVERB_UIACTIVATE, pWnd, NULL);

}

CATCH(CException, e)

{

if (pItem != NULL)

{

ASSERT_VALID(pItem);

pItem->Delete();

}

AfxMessageBox(AFX_IDP_FAILED_TO_CREATE);

}

END_CATCH

George Jost
June 3rd, 1999, 02:42 PM
If your title is uninformative chances are no one will answer the question. In one sentence what is your question about. Also based on the number of postings what do you think is the probability of having someone remember your posting ... 0%!!!

Best of luck in getting your question answered by re-posting it with a new title. Phrasing it differently ...? Just a suggestion - might not help you.

Shogi, sushi and sake are among the great cultural achievements of the Japanese.