Displays the Get Transition dialog box, and gets the options for LPaintEffect::PaintTransition.
#include "ltwrappr.h"
virtual L_INT LDialogEffect::DoModalGetTransition ( hWndOwner)
Handle of the window which owns the dialog.
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. |
LDialogEffect::SetTransitionParams must be called before using this function to set the initial values for the dialog. You can get the updated TRANSITIONDLGPARAMS with the values entered by the user through the dialog by using LDialogEffect::GetTransitionParams.
L_INT LDialogEffect_DoModalGetTransitionExample(LBitmap * pBitmap, HWND hWnd)
{
L_INT nRet;
LDialogEffect DlgEffect;
nRet = LDialogEffect::Initialize (0);
if(nRet != SUCCESS)
return nRet;
DlgEffect.SetBitmap (pBitmap);
TRANSITIONDLGPARAMS DlgParams;
memset ( &DlgParams, 0, sizeof ( TRANSITIONDLGPARAMS ) ) ;
DlgParams.uStructSize = sizeof ( TRANSITIONDLGPARAMS ) ;
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 ;
DlgEffect.EnableCallBack (FALSE);
nRet = DlgEffect.SetTransitionParams(&DlgParams) ;
if(nRet != SUCCESS)
return nRet;
nRet = DlgEffect.DoModalGetTransition(hWnd);
if(nRet < 1)
return nRet;
// Gets the updated values for the structure
nRet = DlgEffect.GetTransitionParams (&DlgParams, sizeof(DlgParams)) ;
if(nRet != SUCCESS)
return nRet;
nRet = LDialogEffect::Free ();
if(nRet != SUCCESS)
return nRet;
return SUCCESS;
}