ProcessViewerEvent

The ProcessViewerEvent function informs plugins about different internal viewer events.
int WINAPI ProcessViewerEvent(
  int Event,
  void *Param
);

Parameters

Event
Event type.
Can be one of the following values (VIEWER_EVENTS enum):
EventDescription
VE_CLOSE One of the internal viewers is closing. Plugins can use this event to free internal data structures. Note that several viewers can be active at the same time. Param points to an integer variable containing the ViewerID parameter of the viewer instance beeing closed. The ViewerID of the current viewer can be obtained earlier using the VCTL_GETINFO ViewerControl command. But the plugin should not call the ViewerControl function when processing this event, because the viewer is already closed.
Return value must be 0.
VE_READ A new file has just been loaded.
Param = NULL.
Return value must be 0.
VE_KILLFOCUS Программа просмотра потеряла фокус ввода.
Param указывает на переменную, содержащую значение ViewerID вьювера, теряющего фокус.
Функция должна вернуть 0.
VE_GOTFOCUS Программа просмотра получила фокус ввода.
Param указывает на переменную, содержащую значение ViewerID вьювера, получающего фокус.
Функция должна вернуть 0.
Param
Points to data dependent on the event type.

Return value

Return value depends on the event type.
Return 0 for unknown event types.

Remarks

  • VE_READ is called only once for each file.
  • See also:
    ViewerControl