LPaintEffect::DrawFrame

Summary

Draws a rectangular frame with the specified style into the associated device context.

Syntax

#include "ltwrappr.h"

virtual L_INT LPaintEffect::DrawFrame(pRect, uFrameStyle=EFX_FRAME_OUTER_RAISED|EFX_FRAME_ADJUST_RECT)

Parameters

LPRECT pRect

The bounding rectangle.

L_UINT uFrameStyle

Type of frame style to draw. Possible values are:

Value Meaning
EFX_FRAME_INNER_INSET [0x0000] Inner band inset
EFX_FRAME_INNER_RAISED [0x0001] Inner band raised
EFX_FRAME_OUTER_INSET [0x0000] Outer band inset
EFX_FRAME_OUTER_RAISED [0x0010] Outer band raised
EFX_FRAME_ADJUST_RECT [0x0100] Adjust dimensions of the destination rectangle

Returns

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

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

L_INT LPaintEffect__DrawFrameExample(LBitmapBase& LeadBitmap,HDC hDC) 
{ 
   L_INT nRet; 
   LPaintEffect LeadPaintEffect ; 
   RECT Rect ; 
 
   LeadPaintEffect.SetBitmap(&LeadBitmap) ; 
   LeadPaintEffect.SetDC(hDC); 
 
   if (LeadPaintEffect.GetBackgroundColor() != RGB(0,255,0)) 
   { 
      nRet = LeadPaintEffect.SetBackgroundColor(RGB(0,255,0)) ; 
      if(nRet != SUCCESS) 
         return nRet; 
   } 
 
   if (LeadPaintEffect.GetForegroundColor() != RGB(255,255,0)) 
   { 
      nRet = LeadPaintEffect.SetForegroundColor(RGB(255,255,0)) ; 
      if(nRet != SUCCESS) 
         return nRet; 
   } 
 
   if (LeadPaintEffect.GetMiddleBandColor() != RGB(255,0,0)) 
   { 
      nRet = LeadPaintEffect.SetMiddleBandColor(RGB(255,0,0)) ; 
      if(nRet != SUCCESS) 
         return nRet; 
   } 
 
   if (LeadPaintEffect.GetMiddleBandWidth() != RGB(255,10,0)) 
   { 
      nRet = LeadPaintEffect.SetMiddleBandWidth(RGB(255,10,0)) ; 
      if(nRet != SUCCESS) 
         return nRet; 
   } 
 
   if (LeadPaintEffect.GetOuterBandWidth() != 3) 
   { 
      nRet = LeadPaintEffect.SetOuterBandWidth(3) ; 
      if(nRet != SUCCESS) 
         return nRet; 
   } 
 
   if (LeadPaintEffect.GetOuterBandShadowColor() != RGB(255,255,255)) 
   { 
      nRet = LeadPaintEffect.SetOuterBandShadowColor(RGB(255,255,255)) ; 
      if(nRet != SUCCESS) 
         return nRet; 
   } 
 
   if (LeadPaintEffect.GetOuterBandHilite() != RGB(255,0,255)) 
   { 
      nRet = LeadPaintEffect.SetOuterBandHilite(RGB(255,0,255)) ; 
      if(nRet != SUCCESS) 
         return nRet; 
   } 
 
   if (LeadPaintEffect.GetInnerBandWidth() != 3) 
   { 
      nRet = LeadPaintEffect.SetInnerBandWidth(3) ; 
      if(nRet != SUCCESS) 
         return nRet; 
   } 
 
   if (LeadPaintEffect.GetInnerBandShadowColor() != RGB(255,255,255)) 
   { 
      nRet = LeadPaintEffect.SetOuterBandShadowColor(RGB(255,255,255)) ; 
      if(nRet != SUCCESS) 
         return nRet; 
   } 
 
   if (LeadPaintEffect.GetInnerBandHilite() != RGB(255,0,255)) 
   { 
      nRet = LeadPaintEffect.SetInnerBandHilite(RGB(255,0,255)) ; 
      if(nRet != SUCCESS) 
         return nRet; 
   } 
 
   Rect.left = 50 ; 
   Rect.top = 50 ; 
   Rect.right = 200 ; 
   Rect.bottom = 200 ; 
 
   nRet = LeadPaintEffect.DrawFrame(&Rect); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   nRet = LeadPaintEffect.DrawPattern(&Rect,EFX_PATTERN_HORZ_LINE); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   return SUCCESS; 
} 
Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

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