Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi All

I am using the IHTMLVIEWER interface to display some text from a file.I have to display the text as transparent i.e. there is a background color which should be visible instead of the white screen of the htmlviewer rectangle.

What the API says is that -
HVP_TRANSPARENT can be used to display the viewer over any background. In this case, the viewer sends the HVN_ERASEBKGND notification so that the app can re-paint the background before it renders the HTML.

In the notify_CB function, I have written the following code.
case HVN_ERASEBKGND: IHTMLVIEWER_SetActive(pApp->m_pIHTMLViewer,TRUE);
break;
Tried using IHTMLVIEWER_Redraw, but STACK OVERFLOW error came.
As I scroll down, the text is mutiple times redrawn on the screen.
On removing the HVP_TRANPSRENT, the scrolling is proper.

Please suggest the solution to this problem.
Note:I tried using the bgcolor tag in the HTML source code, but found the hex value which i gave didn't reflect on the simulator screen.

Waiting for ur replies ASAP.
PS:After seeing the other thread, decided to post in a new one. Sorry if the post seems to be repeating.

Regards
Akshay

My reading of the .h file, and a quick test that I ran, indicates that, if the HVP_TRANSPARENT flag is set, the HVN_ERASEBKGD is called just before actual redrawing of the screen by the IHTMLViewer. This is to allow you to clear the background and redraw anything you wish behind the html yourself.
I wouldn't make any HTMLViewer calls in that area. I would just clear the screen and draw your background color. Once you are done, the HTMLViewer should redraw its foreground.
hope this helps.

My reading of the .h file, and a quick test that I ran, indicates that, if the HVP_TRANSPARENT flag is set, the HVN_ERASEBKGD is called just before actual redrawing of the screen by the IHTMLViewer. This is to allow you to clear the background and redraw anything you wish behind the html yourself.
I wouldn't make any HTMLViewer calls in that area. I would just clear the screen and draw your background color. Once you are done, the HTMLViewer should redraw its foreground.
hope this helps.

rmasteller wrote:My reading of the .h file, and a quick test that I ran, indicates that, if the HVP_TRANSPARENT flag is set, the HVN_ERASEBKGD is called just before actual redrawing of the screen by the IHTMLViewer. This is to allow you to clear the background and redraw anything you wish behind the html yourself.
I wouldn't make any HTMLViewer calls in that area. I would just clear the screen and draw your background color. Once you are done, the HTMLViewer should redraw its foreground.
hope this helps.
Thnx for the reply
I have solved the problem for present.
Now I need to show an image along with some text inside the HTML script but from last 2 days have not been able to do it.
Read in various threads - implemented the same but no result yet.
http://brewforums.qualcomm.com/showthread.php?t=4110&highlight=ihtmlview...
What I wrote for testing is written below.
IHTMLVIEWER_SetData(pMe->m_phtml,"",-1);
Your Inputs are welcomed.
Thnx in advance
Akshay

rmasteller wrote:My reading of the .h file, and a quick test that I ran, indicates that, if the HVP_TRANSPARENT flag is set, the HVN_ERASEBKGD is called just before actual redrawing of the screen by the IHTMLViewer. This is to allow you to clear the background and redraw anything you wish behind the html yourself.
I wouldn't make any HTMLViewer calls in that area. I would just clear the screen and draw your background color. Once you are done, the HTMLViewer should redraw its foreground.
hope this helps.
Thnx for the reply
I have solved the problem for present.
Now I need to show an image along with some text inside the HTML script but from last 2 days have not been able to do it.
Read in various threads - implemented the same but no result yet.
http://brewforums.qualcomm.com/showthread.php?t=4110&highlight=ihtmlview...
What I wrote for testing is written below.
IHTMLVIEWER_SetData(pMe->m_phtml,"",-1);
Your Inputs are welcomed.
Thnx in advance
Akshay