+1 800 256 3608 (toll-free in North America) or +49 7531 90 60 10| service@combit.com

Determine Last Save or Export Path From Preview

export
(combit Team) #1
Valid from List & Label 15
The last used path when saving or exporting from the preview can be determined as follows.

When using the Preview Control under .NET
Simply call the SaveAsFileName property from the Control.
PreviewControl.SaveAsFileName


Print/Export to Preview (without Control)
In this case, a message must be sent to the preview window, e.g. via SendMessage.

::SendMessage(m_hWndLLPreviewCtrl, LS_VIEWERCONTROL_GET_OPTION, (WPARAM)LS_OPTION_SAVEASFILEPATH, (LPARAM)sSelectedFileNameWithPathByUser.GetBuffer(_MAX_PATH));


The constants (such as LS_VIEWERCONTROL_GET_OPTION) can be found in the List & Label header files cmll??.h or cmls??.h.

Tip:
With the Visual Studio tool Spy++ the window class of the preview window can be determined, so that it can be found e.g. with the API “FindWindow”. The window handle determined in this way (see m_hWndLLPreviewCtrl in the above example) can then be used for the message to the window.

IDKBTE001378 KBTE001378