Draws a rectangular frame having the specified style, color, and border width into the target device context.
#include "l_bitmap.h"
L_LTEFX_API L_INT L_EfxDrawFrame(hDC, pRect, uFlags, uFrameWidth, crFrame, uInnerWidth, crInner1, crInner2, uOuterWidth, crOuter1, crOuter2)
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.
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 windowHPALETTE hSavedPalette = NULL; // Temporary copy of the current system paletteHPALETTE hOurPalette = NULL; // The palette that we will use to paintL_INT nBitsPerPixel;// Get the device contexthdc = GetDC(hWnd);// Check the device to see if we need a palettenBitsPerPixel = GetDeviceCaps(hdc, BITSPIXEL) * GetDeviceCaps(hdc, PLANES);if (nBitsPerPixel <= 8){hOurPalette = (HPALETTE)GetStockObject(DEFAULT_PALETTE);hSavedPalette = SelectPalette(hdc, hOurPalette, FALSE);// Realize our paletteRealizePalette(hdc);}// Draw the framenRet = L_EfxDrawFrame(hdc, // Device contextpDest, // Destination rectangleEFX_FRAME_OUTER_RAISED, // outer band raised2, // middle band widthRGB(255, 0, 0), // middle band color2, // inner band widthRGB(100, 100, 100), // inner band shadow colorRGB(0, 0, 0), // inner band highlight color2, // outer band widthRGB(128, 128, 128), // inner band shadow colorRGB(255, 255, 0)); // inner band highlight colorif (nRet != SUCCESS)return nRet;// Restore the old paletteif (hOurPalette)SelectPalette(hdc, hSavedPalette, FALSE);// Release the device contextReleaseDC(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
