Solved

ActiveMovie window problem

Posted on 1998-04-22
5
458 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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 seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now