Share

acdbDisplayPreviewFromDwg

C++

enum class code_page_id ACDB_PORT bool acdbDisplayPreviewFromDwg(
    const ACHAR * pszDwgfilename, 
    void* pPreviewWnd, 
    const Adesk::UInt32* pBgColor = nullptr
);

File

dbmain.h

Description

This function obtains the preview image (if any) of the drawing specified by pszDwgfilename and displays it in the window identified by the HWND argument pPreviewWnd.

The image size varies up to a maximum size no larger than 256 x 188 pixels. If the pPreviewWnd window is larger than the image, then the image will be stretched to fit. But, if the window is smaller than the image, the image will not be adjusted and will spill out beyond the window's borders.

If it is non-null, pBgColor must be a long that represents an RGB color. The format for the long is the format used by the Windows SDK COLORREF type.

Returns true if successful; otherwise, it returns false.

Parameters

Parameters Description
pszDwgfilename Input pathfilename string
pPreviewWnd Input HWND for window within which to display preview
pBgColor Input RGB color for preview background

Was this information helpful?