LDialogImageEffect::DoModalStitch
#include "ltwrappr.h"
virtual L_INT LDialogImageEffect::DoModalStitch(hWndOwner)
HWND hWndOwner; |
/* handle of the window which owns the dialog */ |
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 which owns the dialog. |
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
LDialogImageEffect::SetStitchParams must be called before using this function to set the initial values for the dialog. You can get the updated STITCHDLGPARAMS with the values entered by the user through the dialog by using LDialogImageEffect::GetStitchParams.
The Stitch dialog is shown in the following figure:
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
Example
L_VOID ShowStitchDialog
(
HWND hWnd,
LPDLGBITMAPLIST pList,
LBitmap* pResultBitmap
)
{
L_INT nRet = 0;
LDialogImageEffect DlgImageEffect;
DlgImageEffect.SetBitmap(pResultBitmap);
LDialogImageEffect::Initialize(0);
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;
DlgImageEffect.EnableCallBack(FALSE);
DlgImageEffect.SetStitchParams(&DlgParams);
nRet = DlgImageEffect.DoModalStitch(hWnd);
// Gets the updated values for the structure
DlgImageEffect.GetStitchParams(&DlgParams, sizeof(DlgParams));
LDialogImageEffect::Free();
}
L_VOID DoStitchDialogSingleImage
(
HWND hWnd,
LBitmap* pBitmap,
LBitmap* pResultBitmap
)
{
DLGBITMAPLISTITEM Items [ 1 ];
DLGBITMAPLIST bmplist;
Items [ 0 ].pszDescription = NULL;
Items [ 0 ].pszFileName = NULL;
Items [ 0 ].pBitmap = pBitmap-> GetHandle();
bmplist.uStructSize = sizeof ( DLGBITMAPLIST );
bmplist.pBitmapList = Items;
bmplist.nCount = 1;
ShowStitchDialog ( hWnd, &bmplist, pResultBitmap );
}