VpeSetMsgCallback

<< Click to Display Table of Contents >>

Navigation:  Management Functions >

VpeSetMsgCallback

Previous pageReturn to chapter overviewNext page

Installs a message callback function. If you install a callback function, VPE will not send events via SendMessage() or PostMessage() to your application window, instead it will call your callback function. This is very useful, if you want to run VPE on servers or in batch jobs in windowless applications.

void VpeSetMsgCallback(

VpeHandle hDoc,

VPE_MSG_CALLBACK callback

)

VpeHandle hDoc

Document Handle

VPE_MSG_CALLBACK callback

The pointer to your application’s callback function. In case of an event, VPE will call this function with one of the events listed in the chapter "Messages Generated by VPE - DLL".

Remarks:

The callback function VPE_MSG_CALLBACK is defined in vpiface.h as follows:

typedef LRESULT (EXPO *VPE_MSG_CALLBACK)(UINT Msg, WPARAM wParam, LPARAM lParam);

The parameters are equal to a normal Windows-Procedure. The parameter Msg contains the VPE message code, like for example VPE_DESTROYWINDOW. The message codes are not transformed, i.e. you must not call VpeMapMessage().

 

The values which should be returned by your callback function depend on the VPE message code. If not otherwise explained for each individual message, zero should be returned.