#include "ltwrappr.h"
virtual L_INT LDialogEffect::DoModalGetEffect ( hWndOwner)
HWND hWndOwner; |
handle of the window which owns the dialog |
Displays the Get Effect dialog box, and gets the options for LPaintEffect::PaintBitmap.
Parameter |
Description |
hWndOwner |
Handle of the window which owns the dialog. |
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::SetEffectParams must be called before using this function to set the initial values for the dialog. You can get the updated EFFECTDLGPARAMS with the values entered by the user through the dialog by using LDialogEffect::GetEffectParams.
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 |
L_INT LDialogEffect_DoModalGetEffectExample(LBitmap * pBitmap, HWND hWnd)
{
L_INT nRet;
LDialogEffect DlgEffect;
nRet = LDialogEffect::Initialize (0);
if(nRet != SUCCESS)
return nRet;
DlgEffect.SetBitmap (pBitmap);
EFFECTDLGPARAMS DlgParams;
memset ( &DlgParams, 0, sizeof ( EFFECTDLGPARAMS ) ) ;
DlgParams.uStructSize = sizeof ( EFFECTDLGPARAMS ) ;
DlgParams.uEffect = EFX_EFFECT_ROLL4_T_R_T_L ;
DlgParams.uGrain = 5 ;
DlgParams.uDelay = 50 ;
DlgParams.uMaxPass = 1 ;
DlgParams.bTransparent = FALSE ;
DlgParams.crTransparent = RGB(0,0,0) ;
DlgParams.uWandWidth = 3 ;
DlgParams.crWand = RGB(255,0,0) ;
DlgParams.uDlgFlags = DLG_EFFECT_SHOW_PREVIEW |
DLG_EFFECT_DELAY |
DLG_EFFECT_GRAIN |
DLG_EFFECT_PASSES |
DLG_EFFECT_TRANSPARENT |
DLG_EFFECT_WAND |
DLG_EFFECT_CLASS_WIPE |
DLG_EFFECT_CLASS_WIPERECT |
DLG_EFFECT_CLASS_WIPECIRCLE |
DLG_EFFECT_CLASS_PUSH |
DLG_EFFECT_CLASS_SLIDE |
DLG_EFFECT_CLASS_ROLL |
DLG_EFFECT_CLASS_ROTATE |
DLG_EFFECT_CLASS_ZOOM |
DLG_EFFECT_CLASS_DRIP |
DLG_EFFECT_CLASS_BLIND |
DLG_EFFECT_CLASS_RANDOM |
DLG_EFFECT_CLASS_CHECK |
DLG_EFFECT_CLASS_BLOCKS |
DLG_EFFECT_CLASS_CIRCLE |
DLG_EFFECT_CLASS_ELLIPSE ;
DlgEffect.EnableCallBack (FALSE);
nRet = DlgEffect.SetEffectParams (&DlgParams) ;
if(nRet != SUCCESS)
return nRet;
nRet = DlgEffect.DoModalGetEffect(hWnd);
if(nRet < 1)
return nRet;
// Gets the updated values for the structure
nRet = DlgEffect.GetEffectParams (&DlgParams, sizeof(DlgParams)) ;
if(nRet != SUCCESS)
return nRet;
nRet = LDialogEffect::Free ();
if(nRet != SUCCESS)
return nRet;
return SUCCESS;
}