#include "l_bitmap.h"
L_LTDLG_API L_INT L_DlgStitch(hWndOwner, pDlgParams)
L_HWND hWndOwner; |
owner of the dialog |
LPSTITCHDLGPARAMS pDlgParams; |
pointer to a structure |
Displays the Stitch dialog box for composing images. Use this dialog to produce a new bitmap that is composed of 1 or more source bitmaps.
Parameter |
Description |
hWndOwner |
Handle of the window that owns the dialog. |
pDlgParams |
Pointer to a STITCHDLGPARAMS structure to initialize the stitch dialog. |
SUCCESS_DLG_EXPORTANDEXIT |
"Exit and Export" was selected from the menu and the dialog exited successfully. The pResultingBitmap member of the STITCHDLGPARAMS structure will be updated with the exported bitmap. The user is responsible for freeing the pResultingBitmap member. |
SUCCESS_DLG_EXIT |
"Exit" was selected from the menu or the window was closed, and the dialog exited successfully. |
< 1 |
An error occurred. Refer to Return Codes. |
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 |
Functions: |
|
Topics: |
|
|
L_INT DLGStitchFirstExample(HWND hWnd,LPDLGBITMAPLIST pList)
{
L_INT nRet;
BITMAPHANDLE bmpOutput ;
STITCHDLGPARAMS DlgParams ;
memset ( &DlgParams, 0, sizeof ( STITCHDLGPARAMS ) ) ;
DlgParams.uStructSize = sizeof ( STITCHDLGPARAMS ) ;
DlgParams.nResultingBitmapWidth = 320 ;
DlgParams.nResultingBitmapHeight = 200 ;
DlgParams.nResultingBitmapBitsPerPixel = 24 ;
DlgParams.nRes = 72 ;
DlgParams.crBackGround = RGB ( 255, 255, 255 ) ;
DlgParams.pBitmapList = pList ;
DlgParams.hWindowIcon = NULL ;
DlgParams.nCmdShow = SW_SHOW ;
DlgParams.pResultingBitmap = &bmpOutput ;
DlgParams. uResultingBitmapStructSize = sizeof ( BITMAPHANDLE ) ;
nRet = L_InitBitmap( &bmpOutput, sizeof ( BITMAPHANDLE ), 0, 0, 0 ) ;
if(nRet != SUCCESS)
return nRet;
nRet = L_DlgInit ( DLG_INIT_COLOR ) ;
if(nRet != SUCCESS && nRet != ERROR_DLG_ALREADYINITIATED)
return nRet;
nRet = L_DlgStitch ( hWnd, &DlgParams );
if(nRet < 1 )
return nRet;
L_FreeBitmap( &bmpOutput ) ;
nRet = L_DlgFree () ;
if(nRet != SUCCESS)
return nRet;
return SUCCESS;
}
L_INT DLGStitchSecondExample(HWND hWnd,pBITMAPHANDLE pBitmap)
{
DLGBITMAPLISTITEM Items [ 1 ] ;
DLGBITMAPLIST bmplist ;
Items [ 0 ].pszDescription = NULL ;
Items [ 0 ].pszFileName = NULL ;
Items [ 0 ].pBitmap = pBitmap ;
bmplist.uStructSize = sizeof ( DLGBITMAPLIST ) ;
bmplist.pBitmapList = Items ;
bmplist.nCount = 1 ;
return (DLGStitchFirstExample(hWnd, &bmplist )) ;
}