Solved

ActiveMovie window problem

Posted on 1998-04-22
5
464 Views
Last Modified: 2013-12-03
I am writing a program to play an mpeg file in a window using active movie.  The problem I have is that I need to detect when the user clicks on the movie.  This seem to pose a problem because active movie will always (I think..) create a window of its own.

Is there anyway I can get click messages from the active movie window?
Or, is there anyway I can get active movie to use my application window for playing the movie?
0
Comment
Question by:Gumpster
  • 2
  • 2
5 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 1334486
One way would be to use a system hook to look for mouse clicks int he move window.  However, there might be a better (more direct) way.  I'll leave this as a comment fo now and lets see if there are better answers.
0
 
LVL 23

Expert Comment

by:chensu
ID: 1334487
The ActiveMovie Control supports several events common to other controls: Click, DblClick, KeyDown, KeyPress, KeyUp, MouseDown, MouseMove, and MouseUp. Just create the event sink to capture the event.
0
 

Author Comment

by:Gumpster
ID: 1334488
I am programming this application in VC5, using direct COM calls.  I have not found any reference to event sinks in the (poor..) documentation, with reference to IVideoWindow or anyother activemovie interfaces.

Is it possible to use an event sink on an IVideoWindow interface?

Also, I think I read somewhere that un-handled Windows Messages from a child window where sent to the parent window.  If this is true, is it possible to trap these messages?
0
 
LVL 23

Accepted Solution

by:
chensu earned 120 total points
ID: 1334489
So, you are not using the ActiveMovie Control.

You can capture the WM_PARENTNOTIFY message for the parent window. The WM_PARENTNOTIFY message is sent to the parent of a child window when the child window is created or destroyed, or when the user clicks a mouse button while the cursor is over the child window. You can even get the coordinates.
0
 

Author Comment

by:Gumpster
ID: 1334490
Thanks very much for your help!
I've found that the IMediaEvent method 'SetNotifyWindow' allows you to set a window where events, like WM_LBUTTONDOWN, are sent.

This solution seems to work fine!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question