L_DlgUnderlay

#include "l_bitmap.h"

L_LTDLG_API L_INT L_DlgUnderlay(hWndOwner, pDlgParams)

L_HWND hWndOwner;

/* owner of dialog */

LPUNDERLAYDLGPARAMS pDlgParams;

/* pointer to a UNDERLAYDLGPARAMS structure */

Displays the Underlay dialog box, and gets the options for L_UnderlayBitmap.

Parameter

Description

hWndOwner

Handle of the window which owns the dialog.

pDlgParams

Pointer to a UNDERLAYDLGPARAMS structure to be updated with the values entered by the user, through the dialog. Set members of this structure, before calling this function, to set the dialogs initial values.

Returns

SUCCESS_DLG_OK

The "OK" button was pressed, and the dialog exited successfully.

SUCCESS_DLG_CANCEL

The "Cancel" button was pressed, and the dialog exited successfully.

< 1

An error occurred. Refer to Return Codes.

Comments

The Underlay dialog.

Required DLLs and Libraries

LTDLGIMGEFX
LTDLGKRN
LTDLGUTL
LTDLGCTRL
LTDLGCOM
LTDIS
LTIMGUTL
LTIMGEFX
LTKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions:

L_DlgInit, L_UnderlayBitmap

Topics:

Dialogs: Artistic Effects

 

Using Imaging Common Dialog

Example

 L_INT DLGUnderlayExample(HWND hWnd,pBITMAPHANDLE  pBitmap)
{
   L_INT nRet;
   UNDERLAYDLGPARAMS DlgParam ;
   DLGBITMAPLISTITEM Items [ 1 ] ;
   DLGBITMAPLIST     BitmapList ;
   memset ( &DlgParam, 0, sizeof ( UNDERLAYDLGPARAMS ) ) ;
   Items [ 0 ].pszFileName = ( L_TCHAR* ) malloc ( sizeof ( L_TCHAR ) * L_MAXPATH ) ;
   Items [ 0 ].pBitmap     = (pBITMAPHANDLE) malloc ( sizeof ( BITMAPHANDLE ) );
   lstrcpy ( Items [ 0 ].pszFileName, TEXT("C:\\Program Files\\LEAD Technologies\\LEADTOOLS 15\\Images\\ULAY1.BMP") )  ;
   nRet = L_LoadBitmapResize(Items [ 0 ].pszFileName,
                      Items [ 0 ].pBitmap,
                      sizeof( BITMAPHANDLE ),
                      100,
                      0,
                      24,
                      0,
                      ORDER_BGR,
                      NULL,
                      NULL ) ;
   if(nRet != SUCCESS)
      return nRet;
   BitmapList.uStructSize = sizeof ( DLGBITMAPLIST ) ;
   BitmapList.pBitmapList = Items ;
   BitmapList.nCount      = 1 ;
   DlgParam.uStructSize          = sizeof ( UNDERLAYDLGPARAMS ) ;
   DlgParam.pBitmap              = pBitmap ;
   DlgParam.uDlgFlags            = DLG_UNDERLAY_AUTOPROCESS        |
                                   DLG_UNDERLAY_SHOW_PREVIEW       |
                                   DLG_UNDERLAY_SHOW_TOOL_ZOOMLEVEL;
   DlgParam.uUnderlayFlags       = UB_TILE ;
   DlgParam.nUnderlayBitmapIndex = 0 ;
   DlgParam.pBitmapList          = &BitmapList ;
   nRet = L_DlgInit ( DLG_INIT_COLOR ) ;
   if(nRet != SUCCESS && nRet != ERROR_DLG_ALREADYINITIATED)
      return nRet;
   nRet = L_DlgUnderlay (hWnd, &DlgParam ) ;
   if(nRet < 1)
      return nRet;
   nRet = L_DlgFree () ;
   if(nRet != SUCCESS)
      return nRet;
   L_FreeBitmap( Items [ 0 ].pBitmap ) ;
   free ( Items [ 0 ].pszFileName ) ;
   free ( Items [ 0 ].pBitmap ) ;
   return SUCCESS;
}