#include "l_bitmap.h"
L_LTEFX_API L_INT L_EfxDrawFrame(hDC, pRect, uFlags, uFrameWidth, crFrame, uInnerWidth, crInner1, crInner2, uOuterWidth, crOuter1, crOuter2)
Draws a rectangular frame having the specified style, color, and border width into the target device context.
Handle to the target device context.
Pointer to the display destination rectangle.
Frame style. The following are valid values:
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 |
Middle band width.
COLORREF value that specifies the middle band color.
Inner band width.
COLORREF value that specifies the inner band shadow color.
COLORREF value that specifies the inner band highlight color.
Outer band width.
COLORREF value that specifies the outer band shadow color.
COLORREF value that specifies the outer band highlight color.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
For general information, refer to Implementing Special Effects.
Required DLLs and Libraries
Win32, x64.
This example shows the minimum requirements for using the L_EfxDrawFrame function to draw a frame with a palette.
L_INT EfxDrawFrameExample(HWND hWnd,RECT* pDest)
{
L_INT nRet;
HDC hdc; /* Device context for the current window */
HPALETTE hSavedPalette = NULL; /* Temporary copy of the current system palette */
HPALETTE hOurPalette = NULL; /* The palette that we will use to paint */
L_INT nBitsPerPixel;
/* Get the device context */
hdc = GetDC (hWnd);
/* Check the device to see if we need a palette */
nBitsPerPixel = GetDeviceCaps( hdc, BITSPIXEL ) * GetDeviceCaps ( hdc, PLANES );
if ( nBitsPerPixel <=8 )
{
hOurPalette = (HPALETTE)GetStockObject (DEFAULT_PALETTE);
hSavedPalette = SelectPalette (hdc, hOurPalette, FALSE);
/* Realize our palette */
RealizePalette (hdc);
}
/* Draw the frame */
nRet = L_EfxDrawFrame(hdc, /* Device context */
pDest, /* Destination rectangle */
EFX_FRAME_OUTER_RAISED, /* outer band raised */
2, /* middle band width*/
RGB ( 255,0,0 ), /* middle band color */
2, /* inner band width*/
RGB ( 100,100,100 ), /* inner band shadow color */
RGB ( 0,0,0 ), /* inner band highlight color */
2, /* outer band width*/
RGB ( 128,128,128 ), /* inner band shadow color */
RGB ( 255,255,0 ) ); /* inner band highlight color */
if(nRet != SUCCESS)
return nRet;
/* Restore the old palette */
if ( hOurPalette )
SelectPalette (hdc, hSavedPalette, FALSE);
/* Release the device context */
ReleaseDC(hWnd, hdc);
return SUCCESS;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document