Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Events



At 18:20 28/09/2006, Zahir Lalani wrote:
How do I register an event handler to QT Com using Delphi. I have looked
at the TLB sources but its not very clear?

Register for an event as follows. You need to supply an event class and event ID:


QTControl1.Movie.EventListeners.Add(qtEventClassStateChange,
     qtEventRateWillChange, 0, 0);

The event handler will look like:

procedure TForm1.QTControl1QTEvent(Sender: TObject; EventClass, EventID,
  Phase: Integer; const EventObject: IQTEventObject; var Cancel: WordBool);
var
  vRate : Variant;
begin

  case EventID of
    qtEventRateWillChange:
      begin
        vRate := EventObject.GetParam(qtEventParamMovieRate);
      end;
  end;

end.

I want to detect when an export has finished.

You will need to register for the following event on the QTExporter object:

        class:  qtEventClassProgress
        ID:     qtEventExportProgress

and query the qtEventParamAmount parameter in the QTEvent handler each time the event is fired, until it reaches 100.

Hope this helps,

John.

_________________________________________________________
John Cromie
Skylark Associates Ltd. http://www.skylark.ie


_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.