LDialogImageEffect::DoModalStitch

Summary

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.

Syntax

#include "ltwrappr.h"

virtual L_INT LDialogImageEffect::DoModalStitch(hWndOwner)

Parameters

HWND hWndOwner

Handle of the window which owns the dialog.

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

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.

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT ShowStitchDialog(HWND hWnd, LPDLGBITMAPLIST pList, LBitmap* pResultBitmap) 
{ 
   L_INT nRet = 0; 
 
   LDialogImageEffect DlgImageEffect; 
 
   DlgImageEffect.SetBitmap(pResultBitmap); 
 
   nRet = LDialogImageEffect::Initialize(0); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   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); 
 
   nRet = DlgImageEffect.SetStitchParams(&DlgParams); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   nRet = DlgImageEffect.DoModalStitch(hWnd); 
   if(nRet < 1) 
      return nRet; 
 
   // Gets the updated values for the structure 
 
   nRet = DlgImageEffect.GetStitchParams(&DlgParams, sizeof(DlgParams)); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   nRet = LDialogImageEffect::Free(); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   return SUCCESS; 
} 
 
L_INT LDialogImageEffect_DoModalStitchExample( HWND hWnd, LBitmap* pBitmap, LBitmap* pResultBitmap) 
{ 
   L_INT             nRet; 
   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; 
 
   nRet = ShowStitchDialog ( hWnd, &bmplist, pResultBitmap ); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   return SUCCESS; 
} 
Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Common Dialog C++ Class Library Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.