LDialogEffect::DoModalGetTransition
#include "ltwrappr.h"
virtual L_INT LDialogEffect::DoModalGetTransition ( hWndOwner)
HWND hWndOwner; |
/* handle of the window which owns the dialog */ |
Displays the Get Transition dialog box, and gets the options for LPaintEffect::PaintTransition.
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
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.
The Get Transition dialog is shown in the following figure:
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
Example
void TestFunction(LBitmap * pBitmap, HWND hWnd)
{
LDialogEffect DlgEffect;
LDialogEffect::Initialize (0);
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);
DlgEffect.SetTransitionParams(&DlgParams) ;
DlgEffect.DoModalGetTransition(hWnd);
// Gets the updated values for the structure
DlgEffect.GetTransitionParams (&DlgParams, sizeof(DlgParams)) ;
LDialogEffect::Free ();
}