Solved

ActiveMovie window problem

Posted on 1998-04-22
5
471 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

728 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