Archive: ebanner - weird problem on some machines


ebanner - weird problem on some machines
Hello,

I am struggling to figure out what is wrong with a simple piece of code. The code seems to run on most machines and different OS. On one machine it does not.

I am using modern UI2 using custom dialog boxes. I need to display a logo on the right top corner of the dialog, the logo can change dynamically so I am creating it with ebanner.

Here is the relevant snippet of code creating the dialog and placing the logo

nsDialogs::Create 1018
Pop $Dialog

${NSD_CreateBitmap} -120 9u 120 80 ""
Pop $R0
ebanner::show /NOUNLOAD /HWND=$R0 /HALIGN=MIDDLE /VALIGN=MIDDLE "$TMP\logo.png"

nsDialogs::Show

I have two machines, both run Windows 7 64 bit, one one machine this code displays an empty dialog with the logo on the right top corner. On the other machine it displays an empty dialog, the logo is just not displayed.

Any ideas??? struggling to figure out what is wrong with this piece of code...

Thanks!


Ok - after more digging and searching I found the following. eBanner uses IImgCtx COM interface to decode the PNG file. The machine on which ebanner fails also has IE9 beta installed, it seems that IE9 made some changes to this interface...

now to figure out how to get around it, wish there was a plugin that included a decoder.


The problem has been signaled to Microsoft : https://connect.microsoft.com/IE/fee...lling-ie9-beta

It is not sure they will fix the problem.


Thanks, zivha, I could reproduce this problem after installing IE9.
I found one link with the same situation
http://social.msdn.microsoft.com/For...0-f7b8c9a715ec
Probably this guy sent request to connect.microsoft.com as well but I could not find this.
In Codeproject IImg_Ctx comments (end of http://www.codeproject.com/KB/graphi...txDecoder.aspx page, latest comment) you can find the same link as Wizou just published, but for me this link is unavailable. Fortunatelly comment includes reply from MS: "Apparently IE9 beta brings this component down, so all coders out there forget this stuff as soon as you can. And sorry for those who already used it in their projects, you're in big trouble. Remember, microsoft will always outplay you! And yes, this is officially confirmed by microsoft, look here: They are "surprised that it does not crash", very funny guys indeed."
May be it's to to use GDI+ ?...
After some googling: Oups, GDI+ may not work even on Vista...
If situation will be confirmed, the only 'all Win versions compatible' way I see is to use OleLoadPicture with 24-bit BMP or JPEG for 'dynamic' images. 7z compression is very good, so file size is not a problem.


To view the URL, you need to register on connect.microsoft.com and demand access to product "IE".
It's free, quick and immediate.


Yeah guys, thanks for all the feedback.

So I guess this means ebanner plugin should be deprecated and removed? it seems to no longer (or maybe never really did) work well anymore as it uses this interface.

As for another solution, I would appreciate any help or ideas you have, how can one go about putting a PNG on a dialog if transparency support is important? I want the PNG backgroudn to match the dialog background and using transparency seems like the right way to go. Embedding a decoder would be big and troublesome. What is one to do?


Wizou - thanks!
zivha - "(or maybe never really did)" - we had not any problems with this plug-in before IE9. BTW if you don't need 24-bit color, you can use AnimGif with static gif, if my memory doesn't fail me it supports transparency.


(GIFs are 8-bit and transparency is only on/off, no blending)