Transparent flash with WTL – Introduction

July 26, 2006

How to build a transparent flash window on the desktop in WTL?

I have met a problem about the GUI, my recently project need a very agility user interface, so I decided user flash as the user interface, so there is the problem, how to draw flash on the desktop without background and keep every flash feature?

Resolve plane

The first step to resolve this problem is how to get every frame image from flash. User flash ActiveX control seems like the only way to attach flash with our program. So I prepare to create a ActiveX flash control and use com QueryInterface method to get it’s IViewObject interface and use IViewObject.draw method to draw the flash image to a memory DC.

The second step is how to clear the background and draw it directly on the desktop. The original way is get the flash image and calculate the Region of the real image by key color (for example the color #ff00ff is the background color, so if this pixel is the key color it doesn’t belong the region), after this use SetRegion api to set the windows region. In this way you have to calculate the region every frame, and you can’t display any alpha effect, so I choose the layered window method, but it’s not compatible with win98/me.

Below title will be continued in other text(coming soon, I promised)

1 Load flash Active control

2 Get flash image

3 Use layered window

4 Call container function through FSCommand from flash

5 Call flash function through external API from native code

posted in Flash window by Louis

Follow comments via the RSS Feed | Leave a comment | Trackback URL

Leave Your Comment

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org