Hello all!

I am wondering how to insert the Shockwave OCX control (system32\Macromed\Flash\Flash.ocx) in my ASM project at runtime (in general, not only in ASM, in clear Win32 C++ for example) ? What functions should I use ?
I've found out that I.E. uses this control to dispay Flash Animations (I used WindowsSpy to find this out, the classname is "MacromediaFlashPlayerActiveX").

All my tries to create a window of "MacromediaFlashPlayerActiveX" class using CreateWindowEx was failed :( (I loaded flash.ocx using LoadLibrary. I thought that flash.ocx must register this window class, or who?). And how then I will be able to access to some properties ? "Movie" for example ? I am totally confused ...

How VS creates this control when I simple put the "MacromediaFlashPlayerActiveX" using ToolBox and MFC on the Form ? (and how VB or BCB does??)

Please help! I havent found any information regarding this question in the Google :(
(for MacromediaFlashPlayerActiveX word google gives only one useless link..)

Thanks in advance!
Posted on 2005-03-11 02:45:29 by xor_eax

hello xoreax,

regretably its not a question of using a particular window class. Instead you will need to implement an OCX container, which is nontrivial in ASM unless you have some good COM knowledge.

I have posted a OCX container sample on my website in MASM, but it may be a bit old now.
Posted on 2005-03-11 04:56:45 by japheth


hello xoreax,

regretably its not a question of using a particular window class. Instead you will need to implement an OCX container, which is nontrivial in ASM unless you have some good COM knowledge.

I have posted a OCX container sample on my website in MASM, but it may be a bit old now.

big thanks to you for the reply

I've downloaded some examples from your site (btw good site :) ), I'll look in 'em and read some COM theory (I know something already, but it looks like that its not enough).

and, if it is not difficult for you,
could you explain the process of creating a such container in draft ? just the scheme (how it I.E. do for ex.)
Posted on 2005-03-11 07:50:05 by xor_eax
to describe it basically, an ocx container does

1. create a window to place the control inside
2. calls cocreateinstance to create the ocx control
3. querys the control for interface IOleObject
4. calls IOleObject::SetClientSite (the container has to implement interface IOleClientSite)
5. "activates" the object with IOleObject:DoVerb. the object will then (usually) create its own window
  as a child of the container's window

sounds pretty simple, but the communication between server and client (the control is the "server") is overdesigned" with a lot of additional interfaces being necessary for full "integration". An OCX container is not the best thing to begin with for a COM newbie.



Posted on 2005-03-11 12:10:24 by japheth

to describe it basically, an ocx container does

1. create a window to place the control inside
2. calls cocreateinstance to create the ocx control
3. querys the control for interface IOleObject
4. calls IOleObject::SetClientSite (the container has to implement interface IOleClientSite)
5. "activates" the object with IOleObject:DoVerb. the object will then (usually) create its own window
? ?as a child of the container's window

sounds pretty simple, but the communication between server and client (the control is the "server") is overdesigned" with a lot of additional interfaces being necessary for full "integration". An OCX container is not the best thing to begin with for a COM newbie.


thanks you, this is exactly what I wanted to hear ;)

whatever I'll do this container
Posted on 2005-03-11 12:25:03 by xor_eax