LRasterDialog::DoModalRegion

Summary

Brings up the region properties dialog box.

Syntax

#include "Ltwrappr.h"

L_INT LRasterDialog::DoModalRegion(hWnd, pRegionDlgInfo)

Parameters

HWND hWnd

Handle of the window that owns the dialog.

pPAINTDLGREGIONINFO pRegionDlgInfo

Pointer to a PAINTDLGREGIONINFO structure that contains region information. The values present in pRegionDlgInfo when the function is called are used to initialize the dialog, if PAINT_DLG_REGION_INITUSEDEFAULT is not set in the dwFlags member of pRegionDlgInfo. When this function returns, this parameter is updated with the values entered through the dialog.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example will display the Region common dialog.

L_INT LRasterDialog_DoModalRegionExample( HWND hWnd, L_BOOL bUseDef ) 
{ 
   L_INT                nRet; 
   PAINTDLGREGIONINFO   DlgRegionInfo ; 
   LRasterDialog        lRstDlg ; 
 
   if ( bUseDef == TRUE )  
   { 
      DlgRegionInfo.dwFlags = PAINT_DLG_REGION_SHOWALL | PAINT_DLG_REGION_INITUSEDEFAULT ; 
   } 
   else 
   { 
      DlgRegionInfo.nSize                    = sizeof ( PAINTDLGREGIONINFO ) ; 
      DlgRegionInfo.dwFlags                  = PAINT_DLG_REGION_SHOWLOWERTOLERANCE |  
                                                                      PAINT_DLG_REGION_SHOWUPPERTOLERANCE | 
                                                                      PAINT_DLG_REGION_SHOWELLIPSEWIDTH  | 
                                                                      PAINT_DLG_REGION_SHOWELLIPSEHEIGHT ; 
 
      DlgRegionInfo.pszTitle                 = TEXT("Lead Region Common Dialog ") ; 
      DlgRegionInfo.crLowerTolerance         = RGB ( 10, 10, 10 ) ; 
      DlgRegionInfo.crUpperTolerance         = RGB ( 10, 10, 10 ) ; 
      DlgRegionInfo.nRoundRectEllipseWidth   = 20 ;  
      DlgRegionInfo.nRoundRectEllipseHeight  = 20 ; 
   } 
 
   nRet = lRstDlg.DoModalRegion ( hWnd, &DlgRegionInfo  ) ; 
   if(nRet != SUCCESS) 
      return nRet; 
 
   return SUCCESS; 
} 

Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS DigitalPaint C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.