L_DlgUnderlay

#include "l_bitmap.h"

L_LTDLG_API L_INT L_DlgUnderlay(hWndOwner, pDlgParams)

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

Parameters

L_HWND hWndOwner

Handle of the window which owns the dialog.

LPUNDERLAYDLGPARAMS 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

Value Meaning
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

See Also

Functions

Topics

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,MAKE_IMAGE_PATH(TEXT("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; 
} 
Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Common Dialog C API Help