|
-
March 31st, 1999, 11:16 PM
#1
A question never answered here.
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.
-
April 1st, 1999, 12:21 AM
#2
Re: A question never answered here.
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.
-
April 1st, 1999, 08:59 AM
#3
Here is your answer
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
-
June 3rd, 1999, 02:42 PM
#4
Re: A question never answered here.
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|