L_DlgUnderlay
#include "l_bitmap.h"
L_INT EXT_FUNCTION L_DlgUnderlay(hWndOwner, pDlgParams)
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 dialog’s 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 can be seen below:
Required DLLs and Libraries
LTDLGIMGEFX 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: |
|
Topics: |
|
|
Example
L_VOID ShowDialog ( HWND hWnd, pBITMAPHANDLE pBitmap )
{
UNDERLAYDLGPARAMS DlgParam ;
DLGBITMAPLISTITEM Items [ 1 ] ;
DLGBITMAPLIST BitmapList ;
memset ( &DlgParam, 0, sizeof ( UNDERLAYDLGPARAMS ) ) ;
Items [ 0 ].pszFileName = ( L_TCHAR L_FAR * ) malloc ( sizeof ( L_TCHAR ) * 20 ) ;
Items [ 0 ].pBitmap = (pBITMAPHANDLE) malloc ( sizeof ( BITMAPHANDLE ) );
lstrcpy ( Items [ 0 ].pszFileName, TEXT("C:\\Patterns.bmp") ) ;
L_LoadBitmapResize( Items [ 0 ].pszFileName,
Items [ 0 ].pBitmap,
sizeof( BITMAPHANDLE ),
100,
0,
24,
0,
ORDER_BGR,
NULL,
NULL ) ;
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 ;
L_DlgInit ( 0 ) ;
L_DlgUnderlay ( hWnd,
&DlgParam ) ;
L_DlgFree ( ) ;
L_FreeBitmap( Items [ 0 ].pBitmap ) ;
free ( Items [ 0 ].pszFileName ) ;
free ( Items [ 0 ].pBitmap ) ;
}