Hi arkane,

very interesting ;-)
What about using invoke GetSysColor,COLOR_BTNFACE as transparent color ?
You set grey as transparent color, but my standart window background color isn't grey ;-))

Thanks !
Nordwind64
Posted on 2003-03-26 04:10:03 by Nordwind64
I don't think any API will help in getting that transparent color because when using a web browser control, you are embedding a "browser" on your app. Probably, you can use the API function to get a color and use it to set the bkcolor value of the html background. As far as I know, I don't have any idea how to override the browsers default background color. Maybe with the registry information(if there is) - I don't want to tinker with the settings. IMO the easiest way to mimic the transparency is to create an html page and set the background color to match with your app's bkcolor, like I did above.

It's not elegant to have a seperate html file. So, I modified the code again and added the LoadWebContent function.
;===============================

;LoadWebContent
;===============================
;
; hWnd .............. Handle to the main window
; szFile ............ pointer to the filename. Zero terminated
; bkColor ........... Background color in RGB
; x ................. x coordinate of the upper left rectangle
; y ................. y coordinate of the upper left rectangle
; wdth .............. width in pixels of the content
; height ............ height in pixels of the content
There are more ideas I can come up but it would be overkill to add these features just to load an animated GIF. :)
Posted on 2003-03-26 21:02:43 by arkane