Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ActiveMovie window problem

Posted on 1998-04-22
5
Medium Priority
?
482 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 240 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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
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…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

721 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