PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Brad Warmuskerken on January 18, 2005, 02:15:22 AM

Title: Jose Roca, Question on the ShockWave Example
Post by: Brad Warmuskerken on January 18, 2005, 02:15:22 AM
Jose,

WOW!  It's been a while since I've made to the forums.  All I can say is thank you so much for all of the examples you've posted.

I'm particularly interested in the Shockwave/Flash example, and was able to get FF/PB to run SWF files without issue thanks to your wonderful post in the examples forum.

There is one last thing I'd like to do with Flash, and that is to be able to set the WindowMode to "Transparent"

In VB, I do this in the form load
ShockwaveFlash1.WMode = "transparent"

In FF/PB I tried this in the Form1_WM_CREATE
     Dim vVar as Variant
     vVar = "transparent"
     Object Let DISPATCH_FORM1_SHOCKWAVE.WMode = vVar

I still get a "windowed" control with background color.  Is there somewhere else I should try this?
Title: Jose Roca, Question on the ShockWave Example
Post by: Jose Roca on January 18, 2005, 05:03:34 PM
With Object Let DISPATCH_FORM1_SHOCKWAVE.WMode = vVar  you are setting the window mode of the Flash movie to transparent, but this movie is contained in an OCX container provided by ATL and this container contained in a custom window that has AtlAx71 as the class name. To change the colors of the container, that defaults to %COLOR_WINDOW (White in XP), we will need to get the handle of the host with AtlAxGetHost and then get a reference to the IAxAmbientDispatch interface (ATL71.DLL must have been registered with regsvr32 to be able to access this com interface) calling the QueryInterface method.  This interface provides methods and properties to set ambient properties, such ForeColor, BackColor, AllowWindowlessActivation, Font, etc.

VB is an engine made purposely to use OCXs (and contrarily to PB has problems to use certain DLLs because of his lack of pointers), but the combination of FireFly and PB doesn't make a VB clone, and there are some aspects of programming with OCXs, such properties that can only be set at design time (e.g. the RichEdit control that comes with Visual Studio has a Multiline property that you must set before the control is activated), that can't be solved.

If you have JACOMPB (it is a pity that Philippe has dropped the support for this product because of the lack of sales) it comes with a Flash example:

 ' Control the background color of the dialog box
 JASetAmbientBackColor hDlg,&HC0C0C0
 JACreateControl hDlg,"FlashOCX1",x&,y&,xx&,yy&,"Progid:ShockwaveFlash.ShockwaveFlash.1;PROPERTIES;WMode=BSTR(Transparent)",1,pactivex

I could prepare a bunch of wrapper functions to set the ambient properties (i.e. the equivalent to the JASetAmbient functions of JACOM), but to be able to set the runtime properties will require a redesign of FireFly and a lot of work and research.