LPaintEffect::DrawFrame

#include "ltwrappr.h"

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

LPRECT pRect;

/* the bounding rectangle */

L_UINT uFrameStyle;

/* type of frame style */

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

Parameter

Description

pRect

The bounding rectangle.

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

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LTDIS
LTEFX

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:

Class Members

Topics:

Implementing Special Effects

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