PXL_RETURN_CODE PxLSetPreviewStateEx ( IN HANDLE hCamera, IN U32 previewState, OUT HWND* phWnd, IN LPVOID pContext, IN U32 (PXL_APICALL * ChangeFunction)( IN HANDLE hCamera, IN U32 changeCode, IN LPVOID pContext));
Performs a similar function as PxLSetPreviewState, but accommodates a user supplied callback function that will be called when certain windows based operations are performed to the preview window. The changeCode field will identify the ‘reason’ for the callback. For Windows based systems, the callback function will only be called if the user closes the preview window (a changeCode of PREVIEW_CLOSED is returned). However, for Linux based systems, the callback will not only be called for PREVIEW_CLOSED reasons, but also for other reasons (such as PREVIEW_MOVED, PREVIEW_RESIZED, PREVIEW_MINIMIZED, and PREVIEW_RESTORED).
Set Preview StateEx Types
The user closed the window (by an action such as clicking the 'red x'
The user minimized the preview window
The user restored (un-minimized) the preview window
The preview window has become the active window (in focus)
The preview window was deactivated (some other window now has the focus)
The preview window has been resized
The preview window was moved
Comments, Restrictions and Limitations
On Windows systems, the callback will only be called when the preview window is closed.