Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
L_DlgGetTransition
#include "l_bitmap.h"
L_LTDLG_API L_INT L_DlgGetTransition(hWndOwner, pDlgParams)
L_HWND hWndOwner; |
/* owner of dialog */ |
LPTRANSITIONDLGPARAMS pDlgParams; |
/* pointer to a TRANSITIONDLGPARAMS structure */ |
Displays the Get Transition dialog box, and gets the options for L_EfxPaintTransition.
Parameter |
Description |
hWndOwner |
Handle of the window which owns the dialog. |
pDlgParams |
Pointer to a TRANSITIONDLGPARAMS 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
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
Required DLLs and Libraries
LTDLGEFX 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_INT ShowDlgGetTransitionExample(HWND hWnd, pBITMAPHANDLE pBitmap) { L_INT nRet; TRANSITIONDLGPARAMS DlgParams ; L_UINT x ; HDC hDC ; RECT rcDst ; memset ( &DlgParams, 0, sizeof ( TRANSITIONDLGPARAMS ) ) ; DlgParams.uStructSize = sizeof ( TRANSITIONDLGPARAMS ) ; DlgParams.pBitmap = pBitmap ; DlgParams.uTransition = 0 ; DlgParams.uEffect = EFX_EFFECT_WIPE_L_TO_R ; DlgParams.crFore = RGB ( 255,255,0 ) ; DlgParams.crBack = RGB ( 255,0,255 ) ; DlgParams.uSteps = 120 ; DlgParams.uDelay = 20 ; DlgParams.uGrain = 5 ; DlgParams.uWandWidth = 5 ; DlgParams.crWand = RGB ( 255,255,0 ) ; DlgParams.bTransparent = TRUE ; DlgParams.crTransparent = RGB ( 255,0,0 ) ; DlgParams.uDlgFlags = DLG_TRANSITION_SHOW_PREVIEW | DLG_TRANSITION_FORECOLOR | DLG_TRANSITION_BACKCOLOR | DLG_TRANSITION_DELAY | DLG_TRANSITION_GRAIN | DLG_TRANSITION_EFFECT | DLG_TRANSITION_PASSES | DLG_TRANSITION_WAND | DLG_TRANSITION_TRANSPARENT | DLG_TRANSITION_GRADIENT ; nRet = L_DlgInit ( DLG_INIT_COLOR ) ; if(nRet != SUCCESS && nRet != ERROR_DLG_ALREADYINITIATED) return nRet; nRet = L_DlgGetTransition ( hWnd, &DlgParams ); if ( SUCCESS_DLG_OK == nRet ) { hDC = GetDC ( hWnd ) ; GetClientRect ( hWnd, &rcDst ) ; for ( x = 1 ; x <= DlgParams.uMaxPass ; x++ ) { nRet = L_EfxPaintTransition(hDC, DlgParams.uTransition, DlgParams.crBack, DlgParams.crFore, DlgParams.uSteps, &rcDst, DlgParams.uEffect, DlgParams.uGrain, DlgParams.uDelay, 0, 0, x, DlgParams.uMaxPass, DlgParams.bTransparent, DlgParams.crTransparent, DlgParams.uWandWidth, DlgParams.crWand, SRCCOPY ) ; if(nRet != SUCCESS) return nRet; } ReleaseDC ( hWnd, hDC ) ; } else if( nRet < 1 ) return nRet; nRet = L_DlgFree(); if(nRet != SUCCESS) return nRet; return SUCCESS; }