L_DlgGetTransition

#include "l_bitmap.h"

L_LTDLG_API L_INT L_DlgGetTransition(hWndOwner, pDlgParams)

Displays the Get Transition dialog box, and gets the options for L_EfxPaintTransition.

Parameters

L_HWND hWndOwner

Handle of the window which owns the dialog.

LPTRANSITIONDLGPARAMS 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

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

The Get Transition dialog.

Required DLLs and Libraries

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; 
} 
Help Version 20.0.2019.9.19
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2019 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Common Dialog C API Help