Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 7th, 2006, 4:53 AM   #1
DudiDaabul
Newbie
 
Join Date: Feb 2006
Posts: 1
Rep Power: 0 DudiDaabul is on a distinguished road
How can I extract bitmap from dll resource using MFC and DHTML

I need to find a way to load bitmaps from external dll using DHTML. I can't use the good old LoadImage() function and pass it the handle of the dll as a parameter, since dhtml doesn't "know" to work that way (as far as I understand, I have to use a standart html syntax to load bitmap, like the following:

<img id="myImage" src="file:bar.gif" width='350' height='60px' >



And then put in a code, like in the following example:



IHTMLElement* pBmpElement = NULL;

if (GetElement(_T("myImage"), &pBmpElement) == S_OK &&

pBmpElement != NULL)

{

CString strHtmlCommand,strTmp;

strHtmlCommand = "<img id=\"myImage\" src='file:bar.gif' width='";

strTmp.Format(_T("%d"),m_nImgWidth);

strHtmlCommand += strTmp;

strHtmlCommand +="' height='60px' >";

pBmpElement->put_outerHTML(_bstr_t(strHtmlCommand.GetBuffer(0)));

}



The problem with this implementation is that if I need to extract a bitmap which exists in an external dll… I can't do it…

Can someone help me with this issue?
It is extremely urgent.

Thanks,
Dudi.
DudiDaabul is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:07 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC