Click or drag to resize

IMcViewSetNotifyPriority Method

Specify or inquire as to the order in which event clients will receive events.

Namespace:  MediaCy.IQL.Display.Viewer
Assembly:  MediaCy.IQL.Display.Viewer (in MediaCy.IQL.Display.Viewer.dll) Version: 10.0.6912.0
Syntax
VB
Function SetNotifyPriority ( 
	NotifyClient As Object,
	Priority As Integer
) As Integer

Parameters

NotifyClient
Type: SystemObject
An object that has previously registered as an event notify client for one of the two event interfaces. The custom _IMcBasicViewEvents is search for this client first, then the late binding _IMcViewEvents interface.
Priority
Type: SystemInt32
The desired new notify order priority. Any negative number implies the largest priority order (i.e., the last to be notified), while 1 specifies that the desired priority is the first to be notified. If 0 is supplied, then no priority change will be made, but the existing priority is returned.

Return Value

Type: Int32
The notify priority on entry, or zero if the NotifyClient is not an event notify client for either event interface. The notify priority is 1 for the first client notified for either event interface.
Remarks
All clients of the custom events interface _IMcBasicViewEvents receive notifications before any clients of the late binding _IMcViewEvents events interface (this is the one that VB will reference when "With Events" is used). However, within each group of clients, the order in which each client is notified may be set. The order is important for two reasons --- (1) many event methods supply a "bHandled" argument which the client may set to prevent any subsequent clients from being notified, and (2) clients which draw onto the view's device context during a PostPaint event will do their drawing in the order they receive this event. Thus clients that wish to be sure to be the only one allowed to handle some event (e.g., a MouseDown event) will want to be notified first, while clients that want to make sure that their drawings appear on top of all others will want to be notified last (see Example). Overlays drawn by McGraphOverlay instances are clients of the custom interface and thus will display their drawings underneath any drawings done by VB late binding event clients that draw during the PostPaint event.
Note Note
There is also a corresponding Display method mirroring this one; either may be used with identical results.
Examples
VB
'Display AOI overlays on top of all others in the ActiveWindow
Dim lOldPriority As Long
lOldPriority = ThisApplication.ActiveWindow.View.SetNotifyPriority( _
ThisApplication.ActiveImage.Aoi.DisplayOverlays.MasterGraphOverlay, -1) 'notify last
'....
'Some time later, we can put it back where it was
ThisApplication.ActiveWindow.View.SetNotifyPriority _
ThisApplication.ActiveImage.Aoi.DisplayOverlays.MasterGraphOverlay, lOldPriority
See Also