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.

Required DLLs and Libraries

LTDLGEFX
LTDLGFILE
LTDLGKRN
LTDLGUTL
LTDLGCTRL
LTDLGCOM
LTDIS
LTIMG

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:

LDialogEffect::GetTransitionParams, LDialogEffect::SetTransitionParams, LDialogBase::Initialize, LPaintEffect::PaintTransition , LBase::EnableCallBack , LDialogBase::EnablePreview, LDialogBase::EnableAutoProcess, LDialogBase::EnableToolbar, LDialogBase::Free

Topics:

Using Imaging Common Dialog

Example

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;
}