// -------------------------------------------------------------------------- // ========================================================================== // File: TDDCaps.CPP // Authors: BCB_Code_Generator v1.62, // Darren Dwyer (source code, documentation, demos, website), // Hugh Edwards (documentation, icons) // Description: This file contains the code for the TDDCaps Component // // "TDx_Draw_Library v1.62" // (c) 2002 BCB-Tools.com Pty. Ltd., Sydney, Australia. // All Rights Reserved. // // Refer to the 'Licence.Txt' file for licencing & copyright information. // ========================================================================== // -------------------------------------------------------------------------- // #includes ... // -------------------------------------------------------------------------- #include #pragma hdrstop // -------------------------------------------------------------------------- #include "TDDCaps.H" // -------------------------------------------------------------------------- #pragma link "TDx_Library_Defns" #pragma link "TDx_Library_Functions" #pragma link "TDx_Draw_Library_Defns" #pragma link "TDx_Draw_Library_Functions" // -------------------------------------------------------------------------- // Object Registration... // -------------------------------------------------------------------------- #if (__BORLANDC__ >= 0x0530) // BCB Version 3+ #pragma package(smart_init) #endif // -------------------------------------------------------------------------- static inline void ValidCtrCheck(TDDCaps*) { new TDDCaps(NULL); } // -------------------------------------------------------------------------- namespace Tddcaps { #if (__BORLANDC__ >= 0x0530) // BCB Version 3+ void __fastcall PACKAGE Register() #else void __fastcall Register() #endif { TComponentClass classes[1] = {__classid(TDDCaps)}; RegisterComponents("TDx_Draw", classes, 0); } } // -------------------------------------------------------------------------- // Constructor: TDDCaps::TDDCaps() // Description: The default constructor for the TDDCaps object. // -------------------------------------------------------------------------- __fastcall TDDCaps::TDDCaps(TComponent* Owner) : TComponent(Owner) { Clear(); fCKeyCaps_Strings=NULL; fCaps_Strings=NULL; fCaps2_Strings=NULL; fFXAlphaCaps_Strings=NULL; fFXCaps_Strings=NULL; fNLVBCKeyCaps_Strings=NULL; fNLVBCaps_Strings=NULL; fNLVBCaps2_Strings=NULL; fNLVBFXCaps_Strings=NULL; fPalCaps_Strings=NULL; fSSBCKeyCaps_Strings=NULL; fSSBCaps_Strings=NULL; fSVBCKeyCaps_Strings=NULL; fSVBCaps_Strings=NULL; fSVBCaps2_Strings=NULL; fSVBFXCaps_Strings=NULL; fSVCaps_Strings=NULL; fVSBCKeyCaps_Strings=NULL; fVSBCaps_Strings=NULL; fVSBFXCaps_Strings=NULL; } // -------------------------------------------------------------------------- // Destructor: TDDCaps::~TDDCaps() // Description: The destructor for the TDDCaps object. // -------------------------------------------------------------------------- __fastcall TDDCaps::~TDDCaps() { if (fCKeyCaps_Strings!=NULL) delete fCKeyCaps_Strings; if (fCaps_Strings!=NULL) delete fCaps_Strings; if (fCaps2_Strings!=NULL) delete fCaps2_Strings; if (fFXAlphaCaps_Strings!=NULL) delete fFXAlphaCaps_Strings; if (fFXCaps_Strings!=NULL) delete fFXCaps_Strings; if (fNLVBCKeyCaps_Strings!=NULL) delete fNLVBCKeyCaps_Strings; if (fNLVBCaps_Strings!=NULL) delete fNLVBCaps_Strings; if (fNLVBCaps2_Strings!=NULL) delete fNLVBCaps2_Strings; if (fNLVBFXCaps_Strings!=NULL) delete fNLVBFXCaps_Strings; if (fPalCaps_Strings!=NULL) delete fPalCaps_Strings; if (fSSBCKeyCaps_Strings!=NULL) delete fSSBCKeyCaps_Strings; if (fSSBCaps_Strings!=NULL) delete fSSBCaps_Strings; if (fSVBCKeyCaps_Strings!=NULL) delete fSVBCKeyCaps_Strings; if (fSVBCaps_Strings!=NULL) delete fSVBCaps_Strings; if (fSVBCaps2_Strings!=NULL) delete fSVBCaps2_Strings; if (fSVBFXCaps_Strings!=NULL) delete fSVBFXCaps_Strings; if (fSVCaps_Strings!=NULL) delete fSVCaps_Strings; if (fVSBCKeyCaps_Strings!=NULL) delete fVSBCKeyCaps_Strings; if (fVSBCaps_Strings!=NULL) delete fVSBCaps_Strings; if (fVSBFXCaps_Strings!=NULL) delete fVSBFXCaps_Strings; } // -------------------------------------------------------------------------- // Property: AlignBoundaryDest // Description: The AlignBoundaryDest property defines the alignment, in // pixels, needed for positioning the destination rectangle when // displaying an overlay if DDCAPS_ALIGNBOUNDARYSRC is set in // TDDCaps::Caps. // The top left corner of the destination rectangle must have an // X axis value that is a multiple of this property to // successfully display the overlay. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetAlignBoundaryDest() { return fDDCAPS.dwAlignBoundaryDest; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetAlignBoundaryDest( dword pAlignBoundaryDest ) { fDDCAPS.dwAlignBoundaryDest = pAlignBoundaryDest; } // -------------------------------------------------------------------------- // Property: AlignBoundarySrc // Description: The AlignBoundarySrc property defines the alignment, in // pixels, needed for positioning the source rectangle when // displaying an overlay if DDCAPS_ALIGNBOUNDARYSRC is set in // TDDCaps::Caps. // The top left corner of the source rectangle must have an X // axis value that is a multiple of this property to // successfully display the overlay. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetAlignBoundarySrc() { return fDDCAPS.dwAlignBoundarySrc; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetAlignBoundarySrc( dword pAlignBoundarySrc ) { fDDCAPS.dwAlignBoundarySrc = pAlignBoundarySrc; } // -------------------------------------------------------------------------- // Property: AlignSizeDest // Description: The AlignSizeDest property defines the alignment, in pixels, // needed to set the width of the destination rectangle of an // overlay when DDCAPS_ALIGNSIZEDEST is set in TDDCaps::Caps. // The width of the destination rectangle must be a multiple of // this property to successfully display an overlay. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetAlignSizeDest() { return fDDCAPS.dwAlignSizeDest; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetAlignSizeDest( dword pAlignSizeDest ) { fDDCAPS.dwAlignSizeDest = pAlignSizeDest; } // -------------------------------------------------------------------------- // Property: AlignSizeSrc // Description: The AlignSizeSrc property defines the alignment, in pixels, // needed to set the width of the source rectangle of an overlay // when DDCAPS_ALIGNSIZEDEST is set in TDDCaps::Caps. // The width of the source rectangle must be a multiple of this // property to successfully display an overlay. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetAlignSizeSrc() { return fDDCAPS.dwAlignSizeSrc; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetAlignSizeSrc( dword pAlignSizeSrc ) { fDDCAPS.dwAlignSizeSrc = pAlignSizeSrc; } // -------------------------------------------------------------------------- // Property: AlignStrideAlign // Description: The AlignStrideAlign property defines the stride alignment // used when creating display memory surfaces if // DDCAPS_ALIGNSTRIDE is set in TDDCaps::Caps. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetAlignStrideAlign() { return fDDCAPS.dwAlignStrideAlign; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetAlignStrideAlign( dword pAlignStrideAlign ) { fDDCAPS.dwAlignStrideAlign = pAlignStrideAlign; } // -------------------------------------------------------------------------- // Property: AlphaBltConstBitDepths // Description: The AlphaBltConstBitDepths property has a value of DDBD_2, // DDBD_4 or DDBD_8 representing that the bit depth of the alpha // constant on blits is 2, 4 or 8 bits per pixel respectively. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetAlphaBltConstBitDepths() { return fDDCAPS.dwAlphaBltConstBitDepths; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetAlphaBltConstBitDepths( dword pAlphaBltConstBitDepths ) { fDDCAPS.dwAlphaBltConstBitDepths = pAlphaBltConstBitDepths; } // -------------------------------------------------------------------------- // Property: AlphaBltPixelBitDepths // Description: The AlphaBltPixelBitDepths property has a value of DDBD_1, // DDBD_2, DDBD_4, or DDBD_8 representing that the bit depth of // alpha pixels on blits is 1, 2, 4 or 8 bits per pixel // respectively. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetAlphaBltPixelBitDepths() { return fDDCAPS.dwAlphaBltPixelBitDepths; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetAlphaBltPixelBitDepths( dword pAlphaBltPixelBitDepths ) { fDDCAPS.dwAlphaBltPixelBitDepths = pAlphaBltPixelBitDepths; } // -------------------------------------------------------------------------- // Property: AlphaBltSurfaceBitDepths // Description: The AlphaBltSurfaceBitDepths property has a value of DDBD_1, // DDBD_2, DDBD_4, or DDBD_8 representing that the bit depth of // the alpha surface on blits is 1, 2, 4 or 8 bits per pixel // respectively. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetAlphaBltSurfaceBitDepths() { return fDDCAPS.dwAlphaBltSurfaceBitDepths; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetAlphaBltSurfaceBitDepths( dword pAlphaBltSurfaceBitDepths ) { fDDCAPS.dwAlphaBltSurfaceBitDepths = pAlphaBltSurfaceBitDepths; } // -------------------------------------------------------------------------- // Property: AlphaOverlayConstBitDepths // Description: The AlphaOverlayConstBitDepths property has a value of // DDBD_2, DDBD_4, or DDBD_8 representing that the bit depth of // the alpha overlay constant is 2, 4 or 8 bits per pixel // respectively. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetAlphaOverlayConstBitDepths() { return fDDCAPS.dwAlphaOverlayConstBitDepths; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetAlphaOverlayConstBitDepths( dword pAlphaOverlayConstBitDepths ) { fDDCAPS.dwAlphaOverlayConstBitDepths = pAlphaOverlayConstBitDepths; } // -------------------------------------------------------------------------- // Property: AlphaOverlayPixelBitDepths // Description: The AlphaOverlayPixelBitDepths property has a value of // DDBD_1, DDBD_2, DDBD_4, or DDBD_8 representing that the bit // depth of the alpha overlay pixels is 1, 2, 4 or 8 bits per // pixel respectively. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetAlphaOverlayPixelBitDepths() { return fDDCAPS.dwAlphaOverlayPixelBitDepths; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetAlphaOverlayPixelBitDepths( dword pAlphaOverlayPixelBitDepths ) { fDDCAPS.dwAlphaOverlayPixelBitDepths = pAlphaOverlayPixelBitDepths; } // -------------------------------------------------------------------------- // Property: AlphaOverlaySurfaceBitDepths // Description: The AlphaOverlaySurfaceBitDepths property has a value of // DDBD_1, DDBD_2, DDBD_4, or DDBD_8 representing that the bit // depth of the alpha overlay surface is 1, 2, 4 or 8 bits per // pixel respectively. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetAlphaOverlaySurfaceBitDepths() { return fDDCAPS.dwAlphaOverlaySurfaceBitDepths; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetAlphaOverlaySurfaceBitDepths( dword pAlphaOverlaySurfaceBitDepths ) { fDDCAPS.dwAlphaOverlaySurfaceBitDepths = pAlphaOverlaySurfaceBitDepths; } // -------------------------------------------------------------------------- // Property: CKeyCaps // Description: The CKeyCaps property defines flags indicating the available // color key capabilities. // The described effect applies when the flag is set. // Flags: DDCKEYCAPS_DESTBLT - // Support for RGB blitting while using a color key to // identify replacable pixels of the destination surface is // availaible. // DDCKEYCAPS_DESTBLTCLRSPACE - // Support for RGB blitting while using a color space to // identify replacable pixels of the destination surface is // availaible. // DDCKEYCAPS_DESTBLTCLRSPACEYUV - // Support for YUV blitting while using a color key to // identify replacable pixels of the destination surface is // availaible. // DDCKEYCAPS_DESTBLTYUV - // Support for YUV blitting while using a color key to // identify replacable pixels of the destination surface is // availaible. // DDCKEYCAPS_DESTOVERLAY - // Support for RGB overlaying while using a color key to // identify replacable pixels of the destination surface is // availaible. // DDCKEYCAPS_DESTOVERLAYCLRSPACE - // Support for RGB overlaying while using a color space to // identify replacable pixels of the destination surface is // availaible. // DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV - // Support for YUV overlaying while using a color space to // identify replacable pixels of the destination surface is // availaible. // DDCKEYCAPS_DESTOVERLAYONEACTIVE - // Support is only available for one active destination color // key at a time for visible overlay surfaces. // DDCKEYCAPS_DESTOVERLAYYUV - // Support for YUV overlaying while using a color key to // identify replacable pixels of the destination surface is // availaible. // DDCKEYCAPS_NOCOSTOVERLAY - // Overlay color keying will incur no performance degradation. // DDCKEYCAPS_SRCBLT - // Support for RGB blitting while using a color key to // identify which pixels of the source surface should not be // transferred is availaible. // DDCKEYCAPS_SRCBLTCLRSPACE - // Support for RGB blitting while using a color space to // identify which pixels of the source surface should not be // transferred is availaible. // DDCKEYCAPS_SRCBLTCLRSPACEYUV - // Support for YUV blitting while using a color space to // identify which pixels of the source surface should not be // transferred is availaible. // DDCKEYCAPS_SRCBLTYUV - // Support for YUV blitting while using a color key to // identify which pixels of the source surface should not be // transferred is availaible. // DDCKEYCAPS_SRCOVERLAY - // Support for RGB overlaying while using a color key to // identify which pixels of the source surface should not be // transferred is availaible. // DDCKEYCAPS_SRCOVERLAYCLRSPACE - // Support for RGB overlaying while using a color space to // identify which pixels of the source surface should not be // transferred is availaible. // DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV - // Support for YUV overlaying while using a color key to // identify which pixels of the source surface should not be // transferred is availaible. // DDCKEYCAPS_SRCOVERLAYONEACTIVE - // Support is available for only one active source color key // at a time for visible overlay surfaces. // DDCKEYCAPS_SRCOVERLAYYUV - // Support for YUV overlaying while using a color key to // identify which pixels of the source surface should not be // transferred is availaible. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetCKeyCaps() { return fDDCAPS.dwCKeyCaps; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetCKeyCaps( dword pCKeyCaps ) { fDDCAPS.dwCKeyCaps = pCKeyCaps; } // -------------------------------------------------------------------------- // Property: Caps // Description: The Caps property defines flags indicating the driver // specific capabilities that are available. // The described effect applies when the flag is set. // Flags: DDCAPS_3D - // Support for 3-D acceleration is available. // DDCAPS_ALIGNBOUNDARYDEST - // Support for destination overlay rectangles is limited to // those with the X axis aligned such as to be a multiple of // the value, in pixels, of TDDCaps::AlignBoundaryDest. // DDCAPS_ALIGNBOUNDARYSRC - // Support for source overlay rectangles is limited to those // with the X axis aligned such as to be a multiple of the // value, in pixels, of TDDCaps::AlignBoundarySrc. // DDCAPS_ALIGNSIZEDEST - // Support for destination overlay rectangles is limited to // those with an X axis size that is a multiple of the value, // in pixels, of TDDCaps::AlignSizeDest. // DDCAPS_ALIGNSIZESRC - // Support for source overlay rectangles is limited to those // with an X axis size that is a multiple of the value, in // pixels, of TDDCaps::AlignSizeSrc. // DDCAPS_ALIGNSTRIDE - // The value of TDDCaps::AlignStrideAlign will be used to // define the stride alignment when creating display memory // surfaces. // DDCAPS_ALPHA - // Support for alpha only surfaces is available. // DDCAPS_BANKSWITCHED - // The display hardware uses bank switched memory. // When this flag is set make sure to copy aligned to display // memory as an unaligned copy may cause system suspension or // poor performance if the copy spans memory banks. // DDCAPS_BLT - // Support for blitting is available. // DDCAPS_BLTCOLORFILL - // Support for color filling when blitting is available. // DDCAPS_BLTDEPTHFILL - // Support for depth filling z-buffers using the blitter is // available. // DDCAPS_BLTFOURCC - // Support for color space conversions during blits is // available. // DDCAPS_BLTQUEUE - // Support for asynchronous blitting is available. // DDCAPS_BLTSTRETCH - // Support for stretching during blits is available. // DDCAPS_CANBLTSYSMEM - // Support for blitting to or from system memory is available. // DDCAPS_CANCLIP - // Support for clipping during blits is available. // DDCAPS_CANCLIPSTRETCHED - // Support for clipping while also stretching during blits is // available. // DDCAPS_COLORKEY - // Support for color keying in some form is available. // This could be blit and/or overlay color keying support. // Refer to TDDCaps::CKeyCaps for more detailed information on // color keying capabilities. // DDCAPS_COLORKEYHWASSIST - // Support for color keying is only partially hardware // assisted. // Some CPU and/or video memory resources may also be required // to execute color keyed operations. // If this flag is not set then full hardware support is // available. // DDCAPS_GDI - // The display hardware is being shared with the GDI. // DDCAPS_NOHARDWARE - // There is no hardware support available at all. // DDCAPS_OVERLAY - // Support for overlays is available. // DDCAPS_OVERLAYCANTCLIP - // Support for overlays is limited by the fact that hardware // clipping of overlays is not available. // DDCAPS_OVERLAYFOURCC - // Support for color space conversions during overlay // operations is available. // DDCAPS_OVERLAYSTRETCH - // Support for the stretching of overlays is available. // When this flag is set TDDCaps::MinOverlayStretch and // TDDCaps::MaxOverlayStretch will contain valid data. // DDCAPS_PALETTE - // Support for palette's on more surfaces than just the // primary surface is available. // DDCAPS_PALETTEVSYNC - // Support for synchronizing palette updates with the vertical // blank is available. // DDCAPS_READSCANLINE - // Support for retrieving the current scan line number from // the display hardware is available. // DDCAPS_VBI - // Support for hardware generated vertical blank interrupts is // available. // DDCAPS_ZBLTS - // Support for using z-buffers during blit operations is // available. // DDCAPS_ZOVERLAYS - // Support for using TDx_DrawSurface::UpdateOverlayZOrder() to // control overlay layering is available. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetCaps() { return fDDCAPS.dwCaps; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetCaps( dword pCaps ) { fDDCAPS.dwCaps = pCaps; } // -------------------------------------------------------------------------- // Property: Caps2 // Description: The Caps2 property defines flags indicating more of the // driver specific capabilities that are available. // The described effect applies when the flag is set. // Flags: DDCAPS2_AUTOFLIPOVERLAY - // Support for automatically flipping an overlay to the next // surface in a flip chain each time a video port VSYNC occurs // is available, but only when the surface is actually // recieving data from a video port. // The video port and the overlay effectively double buffer // the video without any CPU overhead. // When the video port data is non-interlaced or // non-interleaved, a flip will occur on every VSYNC. // When the video port data is being interleaved in memory, a // flip will occur on every other VSYNC. // DDCAPS2_CANBOBHARDWARE - // Support for individually displaying each field of an // interlaced video stream without artifacts is available. // DDCAPS2_CANBOBINTERLEAVED - // Support for the individual display of each field of a // interlaced video stream while it is interleaved in memory // is available. // This only applies if the surface is receiving data from a // video port and is zoomed at least 2 times in the vertical // direction. // DDCAPS2_CANBOBNONINTERLEAVED - // Support for the individual display of each field of a // interlaced video stream without interleaving in memory is // available. // This only applies if the surface is receiving data from a // video port and is zoomed at least 2 times in the vertical // direction. // DDCAPS2_CANCALIBRATEGAMMA - // Support for the automatic adjustment of the gamma ramp to // achieve identical results on different systems is // available. // Gamma calibration incurrs some overhead and thus should not // be used excessively. // DDCAPS2_CANDROPZ16BIT - // Support for converting 16 bit RGBZ values to 16 bit RGB // values is available. // There is no support for converting 8 bit RGBZ values. // DDCAPS2_CANFLIPODDEVEN - // Support for odd and even flip operations by the hardware is // available. // DDFLIP_ODD and DDFLIP_EVEN may be used in the Flags // parameter of TDx_DrawSurface::Flip() if this capability is // available. // DDCAPS2_CANMANAGETEXTURE - // The TDx_3D texture manager will put the surfaces it is // managing into nonlocal video memory. // This flag should not be set if your video drivers cannot // texture from local video memory. // DDCAPS2_CANRENDERWINDOWED - // Support for rendering while in windowed mode is available. // DDCAPS2_CERTIFIED - // The display hardware has been certified by Microsoft. // DDCAPS2_COLORCONTROLOVERLAY - // The overlay surface contains color controls defining // contrast, brightness, etc. // DDCAPS2_COLORCONTROLPRIMARY - // The primary surface contains color controls defining gamma, // brightness, contrast, etc. // DDCAPS2_COPYFOURCC - // Support for blitting from any FOURCC surface to another of // the same format is available. // DDCAPS2_FLIPINTERVAL - // Support for the use of the various DDFLIP_INTERVAL flags by // TDx_DrawSurface::Flip() is available. // DDCAPS2_FLIPNOVSYNC - // Support for the use of DDFLIP_NOSYNC by // TDx_DrawSurface::Flip() is available. // DDCAPS2_NO2DDURING3DSCENE - // No 2-D operations may be performed on 3D surfaces between // calls to TDx_3DDevice::BeginScene() and // TDx_3DDevice::EndScene(). // DDCAPS2_NONLOCALVIDMEM - // Support for non local video memory surfaces is available. // DDCAPS2_NONLOCALVIDMEMCAPS - // The blitting capabilities for non local video memory // surfaces are different from those on local video memory // surfaces. // DDCAPS2_NOPAGELOCKREQUIRED - // Support for DMA blit operations on non pagelocked system // memory surfaces is available. // DDCAPS2_PRIMARYGAMMA - // Support for dynamic primary surface gamma ramps is // available. // DDCAPS2_STEREO - // At least one stereo display mode more than the current mode // is supported by the video driver. // TDx_Draw::GetDisplayMode() or TDx_Draw::EnumDisplayModes() // can be used to retrieve information about each stereo mode. // DDCAPS2_TEXMANINNONLOCALVIDMEM - // The TDx_3D texture manager will put the surfaces it is // managing into nonlocal video memory. // This flag should not be set if your video drivers cannot // texture from local video memory. // DDCAPS2_VIDEOPORT - // Support for live video is available. // DDCAPS2_WIDESURFACES - // Support for display memory surfaces wider than the primary // surface is available. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetCaps2() { return fDDCAPS.dwCaps2; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetCaps2( dword pCaps2 ) { fDDCAPS.dwCaps2 = pCaps2; } // -------------------------------------------------------------------------- // Property: CurrVideoPorts // Description: The CurrVideoPorts property defines the current number of // live video ports. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetCurrVideoPorts() { return fDDCAPS.dwCurrVideoPorts; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetCurrVideoPorts( dword pCurrVideoPorts ) { fDDCAPS.dwCurrVideoPorts = pCurrVideoPorts; } // -------------------------------------------------------------------------- // Property: CurrVisibleOverlays // Description: The CurrVisibleOverlays property defines the current number // of visible overlays. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetCurrVisibleOverlays() { return fDDCAPS.dwCurrVisibleOverlays; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetCurrVisibleOverlays( dword pCurrVisibleOverlays ) { fDDCAPS.dwCurrVisibleOverlays = pCurrVisibleOverlays; } // -------------------------------------------------------------------------- // Property: ErrorValue // Description: The ErrorValue property contains the last error value // returned from a call to a TDDCaps method or fget/fset. eg. // DD_OK or DDERR_SURFACELOST or TDX_ERROR // -------------------------------------------------------------------------- HRESULT __fastcall TDDCaps::FGetErrorValue() { return fErrorValue; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetErrorValue( HRESULT pErrorValue ) { fErrorValue = pErrorValue; } // -------------------------------------------------------------------------- // Property: FXAlphaCaps // Description: The FXAlphaCaps property defines flags indicating the // available alpha channel capabilities. // The described effect applies when the flag is set. // Flags: DDFXALPHACAPS_BLTALPHAEDGEBLEND - // Support for alpha blending around the edge of a source // color-keyed surface while blitting is available. // DDFXALPHACAPS_BLTALPHAPIXELS - // Support for blitting with the alpha information included in // the pixel format is available. // DDFXALPHACAPS_BLTALPHAPIXELSNEG - // Support for blitting with reversed alpha information // included in the pixel format is available. // This flag will only be set if DDCAPS_ALPHA in TDDCaps::Caps // is also set. // DDFXALPHACAPS_BLTALPHASURFACES - // Support for alpha only surfaces when blitting is available. // DDFXALPHACAPS_BLTALPHASURFACESNEG - // Support for reversed alpha only surfaces when blitting is // available. // This flag will only be set if DDCAPS_ALPHA in TDDCaps::Caps // is also set. // DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND - // Support for alpha blending around the edge of a source // color keyed surface when overlaying is available. // DDFXALPHACAPS_OVERLAYALPHAPIXELS - // Support for overlays with alpha information included in the // pixel format is available. // DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG - // Support for overlays with reversed alpha information // included in the pixel format is available. // This flag will only be set if DDCAPS_ALPHA in TDDCaps::Caps // is also set. // DDFXALPHACAPS_OVERLAYALPHASURFACES - // Support for alpha only surfaces with overlays is available. // DDFXALPHACAPS_OVERLAYALPHASURFACESNEG - // Support for reversed alpha only surfaces with overlays is // available. // This flag will only be set if DDCAPS_ALPHA in TDDCaps::Caps // is also set. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetFXAlphaCaps() { return fDDCAPS.dwFXAlphaCaps; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetFXAlphaCaps( dword pFXAlphaCaps ) { fDDCAPS.dwFXAlphaCaps = pFXAlphaCaps; } // -------------------------------------------------------------------------- // Property: FXCaps // Description: The FXCaps property defines flags indicating the available // driver specific stretching and effects capabilities. // The described effect applies when the flag is set. // Flags: DDFXCAPS_BLTALPHA - // Support for alpha blending while blitting is available. // DDFXCAPS_BLTARITHSTRETCHY - // Support for the arithmetic stretching or shrinking of a // surface along the Y axis while blitting is available. // DDFXCAPS_BLTARITHSTRETCHYN - // Support for the arithmetic stretching or shrinking of a // surface along the Y axis by an integer multiple, while // blitting, is available. // DDFXCAPS_BLTFILTER - // Support for surface reconstruction filtering of warped // blits is available. // DDFXCAPS_BLTMIRRORLEFTRIGHT - // Support for blitting while mirroring from left to right by // turning the surface on its Y axis is available. // DDFXCAPS_BLTMIRRORUPDOWN - // Support for blitting while mirroring from top to bottom by // turning the surface on its X axis is available. // DDFXCAPS_BLTROTATION - // Support for rotation by arbitrary amounts when blitting is // available. // DDFXCAPS_BLTROTATION90 - // Support for rotation by 90 degrees when blitting is // available. // DDFXCAPS_BLTSHRINKX - // Support for shrinking a surface along the X axis by an // arbitrary amount while blitting is available. // DDFXCAPS_BLTSHRINKXN - // Support for shrinking a surface along the X axis by an // integer divisor while blitting is available. // DDFXCAPS_BLTSHRINKY - // Support for shrinking a surface along the Y axis by an // arbitary amount while blitting is available. // DDFXCAPS_BLTSHRINKYN - // Support for shrinking a surface along the Y axis by an // integer divisor while blitting is available. // DDFXCAPS_BLTSTRETCHX - // Support for stretching a surface along the X axis by an // arbitrary amount while blitting is available. // DDFXCAPS_BLTSTRETCHXN - // Support for stretching a surface along the X axis by an // integer multiple while blitting is available. // DDFXCAPS_BLTSTRETCHY - // Support for stretching a surface along the Y axis by an // arbitrary amount while blitting is available. // DDFXCAPS_BLTSTRETCHYN - // Support for stretching a surface along the Y axis by an // integer multiple while blitting is available. // DDFXCAPS_OVERLAYALPHA - // Support for alpha blending overlays is available. // DDFXCAPS_OVERLAYARITHSTRETCHY - // Support for the arithmetic stretching or shrinking of a // surface along the Y axis while overlaying is available. // DDFXCAPS_OVERLAYARITHSTRETCHYN - // Support for the arithmetic stretching or shrinking of a // surface along the Y axis by an integer multiple, while // overlaying, is available. // DDFXCAPS_OVERLAYFILTER - // Support for surface reconstruction filtering of warped // overlay sprites is available. // This capability is not currently supported for overlays // displayed using TDx_DrawSurface::UpDateOverlay(). // DDFXCAPS_OVERLAYMIRRORLEFTRIGHT - // Support for mirroring an overlay from left to right by // turning the surface on its Y axis is available. // DDFXCAPS_OVERLAYMIRRORUPDOWN - // Support for mirroring an overlay from top to bottom by // turning the surface on its X axis is available. // DDFXCAPS_OVERLAYSHRINKX - // Support for shrinking an overlay surface along the X axis // by an arbitrary amount is available. // Only valid for overlay surfaces. // This refers to the surface's capabilities, not the // availability of shrinking. // DDFXCAPS_OVERLAYSHRINKXN - // Support for shrinking an overlay surface along the X axis // by an integer divisor is available. // Only valid for overlay surfaces. // This refers to the surface's capabilities, not the // availability of shrinking. // DDFXCAPS_OVERLAYSHRINKY - // Support for shrinking an overlay surface along the Y axis // by an arbitrary amount is available. // Only valid for overlay surfaces. // This refers to the surface's capabilities, not the // availability of shrinking. // DDFXCAPS_OVERLAYSHRINKYN - // Support for shrinking an overlay surface along the Y axis // by an integer divisor is available. // Only valid for overlay surfaces. // This refers to the surface's capabilities, not the // availability of shrinking. // DDFXCAPS_OVERLAYSTRETCHX - // Support for stretching an overlay surface along the X axis // by an arbitrary amount is available. // Only valid for overlay surfaces. // This refers to the surface's capabilities, not the // availability of stretching. // DDFXCAPS_OVERLAYSTRETCHXN - // Support for stretching an overlay surface along the X axis // by an integer multiple is available. // Only valid for overlay surfaces. // This refers to the surface's capabilities, not the // availability of stretching. // DDFXCAPS_OVERLAYSTRETCHY - // Support for stretching an overlay surface along the Y axis // by an arbitary amount is available. // Only valid for overlay surfaces. // This refers to the surface's capabilities, not the // availability of stretching. // DDFXCAPS_OVERLAYSTRETCHYN - // Support for stretching an overlay surface along the Y axis // by an integer multiplier is available. // Only valid for overlay surfaces. // This refers to the surface's capabilities, not the // availability of stretching. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetFXCaps() { return fDDCAPS.dwFXCaps; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetFXCaps( dword pFXCaps ) { fDDCAPS.dwFXCaps = pFXCaps; } // -------------------------------------------------------------------------- // Property: MaxOverlayStretch // Description: The MaxOverlayStretch property defines the maximum overlay // stretch factor. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetMaxOverlayStretch() { return fDDCAPS.dwMaxOverlayStretch; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetMaxOverlayStretch( dword pMaxOverlayStretch ) { fDDCAPS.dwMaxOverlayStretch = pMaxOverlayStretch; } // -------------------------------------------------------------------------- // Property: MaxVideoPorts // Description: The MaxVideoPorts property defines the maximum number of live // video ports that can be supported. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetMaxVideoPorts() { return fDDCAPS.dwMaxVideoPorts; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetMaxVideoPorts( dword pMaxVideoPorts ) { fDDCAPS.dwMaxVideoPorts = pMaxVideoPorts; } // -------------------------------------------------------------------------- // Property: MaxVisibleOverlays // Description: The MaxVisibleOverlays property defines the maximum number of // visible overlays that can be supported. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetMaxVisibleOverlays() { return fDDCAPS.dwMaxVisibleOverlays; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetMaxVisibleOverlays( dword pMaxVisibleOverlays ) { fDDCAPS.dwMaxVisibleOverlays = pMaxVisibleOverlays; } // -------------------------------------------------------------------------- // Property: MinOverlayStretch // Description: The MinOverlayStretch property defines the minimum overlay // stretch factor. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetMinOverlayStretch() { return fDDCAPS.dwMinOverlayStretch; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetMinOverlayStretch( dword pMinOverlayStretch ) { fDDCAPS.dwMinOverlayStretch = pMinOverlayStretch; } // -------------------------------------------------------------------------- // Property: NLVBCKeyCaps // Description: The NLVBCKeyCaps property defines flags indicating the // available driver specific color key capabilities for nonlocal // to local video memory blits in a way similar to // TDDCaps::CKeyCaps. // Only the blit related flags of this property should be used. // The described effect applies when the flag is set. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetNLVBCKeyCaps() { return fDDCAPS.dwNLVBCKeyCaps; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetNLVBCKeyCaps( dword pNLVBCKeyCaps ) { fDDCAPS.dwNLVBCKeyCaps = pNLVBCKeyCaps; } // -------------------------------------------------------------------------- // Property: NLVBCaps // Description: The NLVBCaps property defines flags indicating the available // driver specific capabilities for nonlocal to local video // memory blits in a way similar to TDDCaps::Caps. // Only the blit related flags of this property should be used. // The described effect applies when the flag is set. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetNLVBCaps() { return fDDCAPS.dwNLVBCaps; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetNLVBCaps( dword pNLVBCaps ) { fDDCAPS.dwNLVBCaps = pNLVBCaps; } // -------------------------------------------------------------------------- // Property: NLVBCaps2 // Description: The NLVBCaps2 property defines flags indicating more of the // available driver specific capabilities for nonlocal to local // video memory blits in a way similar to TDDCaps::Caps2. // Only the blit related flags of this property should be used. // The described effect applies when the flag is set. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetNLVBCaps2() { return fDDCAPS.dwNLVBCaps2; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetNLVBCaps2( dword pNLVBCaps2 ) { fDDCAPS.dwNLVBCaps2 = pNLVBCaps2; } // -------------------------------------------------------------------------- // Property: NLVBFXCaps // Description: The NLVBFXCaps property defines flags indicating the // available driver specific stretching and effects capabilities // for nonlocal to local video memory blits in a way similar to // TDDCaps::FXCaps. // Only the blit related flags of this property should be used. // The described effect applies when the flag is set. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetNLVBFXCaps() { return fDDCAPS.dwNLVBFXCaps; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetNLVBFXCaps( dword pNLVBFXCaps ) { fDDCAPS.dwNLVBFXCaps = pNLVBFXCaps; } // -------------------------------------------------------------------------- // Property: NLVBRops // Description: The NLVBRops property defines the raster operations that are // supported for nonlocal to local video memory blits. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetNLVBRops( dword pIndex ) { if (pIndex>=DD_ROP_SPACE) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetNLVBRops()", "TDX_ERROR", "'pIndex' parameter is out of bounds." ); return (DWORD) NULL; } return fDDCAPS.dwNLVBRops[pIndex]; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetNLVBRops( dword pIndex, dword pNLVBRops ) { fDDCAPS.dwNLVBRops[pIndex] = pNLVBRops; } // -------------------------------------------------------------------------- // Property: NumFourCCCodes // Description: The NumFourCCCodes property defines the number of FourCC // codes. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetNumFourCCCodes() { return fDDCAPS.dwNumFourCCCodes; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetNumFourCCCodes( dword pNumFourCCCodes ) { fDDCAPS.dwNumFourCCCodes = pNumFourCCCodes; } // -------------------------------------------------------------------------- // Property: PalCaps // Description: The PalCaps property defines flags indicating palette // capabilities. // The described effect applies when the flag is set. // Flags: DDPCAPS_1BIT - // The palette index will be 1 bit. // There will be 2 entries in the color table. // DDPCAPS_2BIT - // The palette index will be 2 bits. // There will be 4 entries in the color table. // DDPCAPS_4BIT - // The palette index will be 4 bits. // There will be 16 entries in the color table. // DDPCAPS_8BIT - // The palette index will be 8 bits. // There will be 256 entries in the color table. // DDPCAPS_8BITENTRIES - // The palette index will reference an 8 bit color index. // This flag is only valid when DDPCAPS_1BIT, DDPCAPS_2BIT or // DDPCAPS_4BIT is set and the surface which is to use the new // palette has a bit depth of 8. // Each color entry is an 8 bit index into the destination // surface's 8 bpp palette. // DDPCAPS_ALLOW256 - // All 256 entries of the created palette may be accessed. // Entry 0 and entry 255 on 8-bit palettes are reserved for // system use unless this flag is set. // DDPCAPS_ALPHA - // Support for palettes with an alpha component is available. // The peFlags member of the associated PALETTEENTRY structure // will be interpreted as an 8-bit alpha value. // Palettes utilizing this capability may only be attached to // textures. // DDPCAPS_PRIMARYSURFACE - // The palette is attached to the primary surface. // Changes to the palette will have an immediate effect on the // display unless the DDPCAPS_VSYNC capability is specified // and supported. // DDPCAPS_PRIMARYSURFACELEFT - // The palette is attached to the primary surface for the left // eye. // Changes to the palette will have an immediate effect on the // left eye display unless the DDPCAPS_VSYNC capability is // specified and supported. // DDPCAPS_VSYNC - // The palette can be modified synchronously with the // monitor's refresh rate. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetPalCaps() { return fDDCAPS.dwPalCaps; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetPalCaps( dword pPalCaps ) { fDDCAPS.dwPalCaps = pPalCaps; } // -------------------------------------------------------------------------- // Property: Rops // Description: The Rops property defines the raster operations that are // supported. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetRops( dword pIndex ) { if (pIndex>=DD_ROP_SPACE) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetRops()", "TDX_ERROR", "'pIndex' parameter is out of bounds." ); return (DWORD) NULL; } return fDDCAPS.dwRops[pIndex]; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetRops( dword pIndex, dword pRops ) { fDDCAPS.dwRops[pIndex] = pRops; } // -------------------------------------------------------------------------- // Property: SCaps // Description: The SCaps property references a TDDSCaps component describing // the general surface capabilities that are available. // -------------------------------------------------------------------------- TDDSCaps* __fastcall TDDCaps::FGetSCaps() { if (ComponentState.Contains(csDesigning) && (fSCaps!=NULL) && (Owner!=NULL)) { bool component_exists = false; for (int i=0;iComponentCount;i++) if (Owner->Components[i]==fSCaps) { component_exists = true; break; } if (!component_exists) fSCaps=NULL; } return fSCaps; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetSCaps( TDDSCaps* pSCaps ) { fSCaps = pSCaps; } // -------------------------------------------------------------------------- // Property: SSBCKeyCaps // Description: The SSBCKeyCaps property defines flags indicating the // available driver specific color key capabilities for system // memory to system memory blits in a way similar to // TDDCaps::CKeyCaps. // Only the blit related flags of this property should be used. // The described effect applies when the flag is set. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetSSBCKeyCaps() { return fDDCAPS.dwSSBCKeyCaps; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetSSBCKeyCaps( dword pSSBCKeyCaps ) { fDDCAPS.dwSSBCKeyCaps = pSSBCKeyCaps; } // -------------------------------------------------------------------------- // Property: SSBCaps // Description: The SSBCaps property defines flags indicating the available // driver specific capabilities for system memory to system // memory blits in a way similar to TDDCaps::Caps. // Only the blit related flags of this property should be used. // The described effect applies when the flag is set. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetSSBCaps() { return fDDCAPS.dwSSBCaps; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetSSBCaps( dword pSSBCaps ) { fDDCAPS.dwSSBCaps = pSSBCaps; } // -------------------------------------------------------------------------- // Property: SSBRops // Description: The SSBRops property defines the raster operations that are // supported for system memory to system memory blits. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetSSBRops( dword pIndex ) { if (pIndex>=DD_ROP_SPACE) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetSSBRops()", "TDX_ERROR", "'pIndex' parameter is out of bounds." ); return (DWORD) NULL; } return fDDCAPS.dwSSBRops[pIndex]; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetSSBRops( dword pIndex, dword pSSBRops ) { fDDCAPS.dwSSBRops[pIndex] = pSSBRops; } // -------------------------------------------------------------------------- // Property: SVBCKeyCaps // Description: The SVBCKeyCaps property defines flags indicating the // available driver specific color key capabilities for system // memory to display memory blits in a way similar to // TDDCaps::CKeyCaps. // Only the blit related flags of this property should be used. // The described effect applies when the flag is set. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetSVBCKeyCaps() { return fDDCAPS.dwSVBCKeyCaps; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetSVBCKeyCaps( dword pSVBCKeyCaps ) { fDDCAPS.dwSVBCKeyCaps = pSVBCKeyCaps; } // -------------------------------------------------------------------------- // Property: SVBCaps // Description: The SVBCaps property defines flags indicating the available // driver specific capabilities for system memory to display // memory blits in a way similar to TDDCaps::Caps. // Only the blit related flags of this property should be used. // The described effect applies when the flag is set. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetSVBCaps() { return fDDCAPS.dwSVBCaps; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetSVBCaps( dword pSVBCaps ) { fDDCAPS.dwSVBCaps = pSVBCaps; } // -------------------------------------------------------------------------- // Property: SVBCaps2 // Description: The SVBCaps2 property defines flags indicating more of the // available driver specific capabilities for system memory to // display memory blits in a way similar to TDDCaps::Caps2. // Only the blit related flags of this property should be used. // The described effect applies when the flag is set. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetSVBCaps2() { return fDDCAPS.dwSVBCaps2; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetSVBCaps2( dword pSVBCaps2 ) { fDDCAPS.dwSVBCaps2 = pSVBCaps2; } // -------------------------------------------------------------------------- // Property: SVBFXCaps // Description: The SVBFXCaps property defines flags indicating the available // driver specific stretching and effects capabilities for // system memory to display memory blits in a way similar to // TDDCaps::FXCaps. // Only the blit related flags of this property should be used. // The described effect applies when the flag is set. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetSVBFXCaps() { return fDDCAPS.dwSVBFXCaps; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetSVBFXCaps( dword pSVBFXCaps ) { fDDCAPS.dwSVBFXCaps = pSVBFXCaps; } // -------------------------------------------------------------------------- // Property: SVBRops // Description: The SVBRops property defines the raster operations that are // supported for system memory to display memory blits. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetSVBRops( dword pIndex ) { if (pIndex>=DD_ROP_SPACE) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetSVBRops()", "TDX_ERROR", "'pIndex' parameter is out of bounds." ); return (DWORD) NULL; } return fDDCAPS.dwSVBRops[pIndex]; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetSVBRops( dword pIndex, dword pSVBRops ) { fDDCAPS.dwSVBRops[pIndex] = pSVBRops; } // -------------------------------------------------------------------------- // Property: SVCaps // Description: The SVCaps property defines a flag indicating whether stereo // vision capabilities are supported. // The described effect applies when the flag is set. // Flags: DDSVCAPS_STEREOSEQUENTIAL - // At least one stereo display mode more than the current mode // is supported by the video driver. // TDx_Draw::GetDisplayMode() or TDx_Draw::EnumDisplayModes() // can be used to retrieve information about each stereo mode. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetSVCaps() { return fDDCAPS.dwSVCaps; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetSVCaps( dword pSVCaps ) { fDDCAPS.dwSVCaps = pSVCaps; } // -------------------------------------------------------------------------- // Property: Size // Description: The Size property defines the size, in bytes, of the internal // structure used by this component. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetSize() { return fDDCAPS.dwSize; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetSize( dword pSize ) { fDDCAPS.dwSize = pSize; } // -------------------------------------------------------------------------- // Property: VSBCKeyCaps // Description: The VSBCKeyCaps property defines flags indicating the // available driver specific color key capabilities for display // memory to system memory blits in a way similar to // TDDCaps::CKeyCaps. // Only the blit related flags of this property should be used. // The described effect applies when the flag is set. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetVSBCKeyCaps() { return fDDCAPS.dwVSBCKeyCaps; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetVSBCKeyCaps( dword pVSBCKeyCaps ) { fDDCAPS.dwVSBCKeyCaps = pVSBCKeyCaps; } // -------------------------------------------------------------------------- // Property: VSBCaps // Description: The VSBCaps property defines flags indicating the available // driver specific capabilities for display memory to system // memory blits in a way similar to TDDCaps::Caps. // Only the blit related flags of this property should be used. // The described effect applies when the flag is set. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetVSBCaps() { return fDDCAPS.dwVSBCaps; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetVSBCaps( dword pVSBCaps ) { fDDCAPS.dwVSBCaps = pVSBCaps; } // -------------------------------------------------------------------------- // Property: VSBFXCaps // Description: The VSBFXCaps property defines flags indicating the available // driver specific stretching and effects capabilities for // display memory to system memory blits in a way similar to // TDDCaps::FXCaps. // Only the blit related flags of this property should be used. // The described effect applies when the flag is set. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetVSBFXCaps() { return fDDCAPS.dwVSBFXCaps; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetVSBFXCaps( dword pVSBFXCaps ) { fDDCAPS.dwVSBFXCaps = pVSBFXCaps; } // -------------------------------------------------------------------------- // Property: VSBRops // Description: The VSBRops property defines the raster operations that are // supported for display memory to system memory blits. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetVSBRops( dword pIndex ) { if (pIndex>=DD_ROP_SPACE) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetVSBRops()", "TDX_ERROR", "'pIndex' parameter is out of bounds." ); return (DWORD) NULL; } return fDDCAPS.dwVSBRops[pIndex]; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetVSBRops( dword pIndex, dword pVSBRops ) { fDDCAPS.dwVSBRops[pIndex] = pVSBRops; } // -------------------------------------------------------------------------- // Property: VidMemFree // Description: The VidMemFree property defines the total amount of display // memory minus any memory that is allocated to surfaces. // This value indicates the memory available for any type of // surface, unlike TDx_Draw::GetAvailableVidMem() which reports // how much memory is available for a specific type of surface. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetVidMemFree() { return fDDCAPS.dwVidMemFree; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetVidMemFree( dword pVidMemFree ) { fDDCAPS.dwVidMemFree = pVidMemFree; } // -------------------------------------------------------------------------- // Property: VidMemTotal // Description: The VidMemTotal property defines the total amount of display // memory, in bytes, minus any memory reserved for the primary // surface and private data structures used by the driver. // TDx_Draw::GetAvailableVidMem() will report the same total // memory value as this property. // -------------------------------------------------------------------------- dword __fastcall TDDCaps::FGetVidMemTotal() { return fDDCAPS.dwVidMemTotal; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetVidMemTotal( dword pVidMemTotal ) { fDDCAPS.dwVidMemTotal = pVidMemTotal; } // -------------------------------------------------------------------------- // Method: Clear() // Description: The Clear() method can be used to clear the contents of the // TDDCaps's internal DDCAPS structure. // Note: if you have manually linked a structure member to a // chunk of memory, make sure you release this memory before // calling Clear(). // -------------------------------------------------------------------------- void __fastcall TDDCaps::Clear() { fDDCAPS.dwAlignBoundaryDest = 0; fDDCAPS.dwAlignBoundarySrc = 0; fDDCAPS.dwAlignSizeDest = 0; fDDCAPS.dwAlignSizeSrc = 0; fDDCAPS.dwAlignStrideAlign = 0; fDDCAPS.dwAlphaBltConstBitDepths = 0; fDDCAPS.dwAlphaBltPixelBitDepths = 0; fDDCAPS.dwAlphaBltSurfaceBitDepths = 0; fDDCAPS.dwAlphaOverlayConstBitDepths = 0; fDDCAPS.dwAlphaOverlayPixelBitDepths = 0; fDDCAPS.dwAlphaOverlaySurfaceBitDepths = 0; fDDCAPS.dwCKeyCaps = 0; fDDCAPS.dwCaps = 0; fDDCAPS.dwCaps2 = 0; fDDCAPS.dwCurrVideoPorts = 0; fDDCAPS.dwCurrVisibleOverlays = 0; fErrorValue = DD_OK; fDDCAPS.dwFXAlphaCaps = 0; fDDCAPS.dwFXCaps = 0; fDDCAPS.dwMaxOverlayStretch = 0; fDDCAPS.dwMaxVideoPorts = 0; fDDCAPS.dwMaxVisibleOverlays = 0; fDDCAPS.dwMinOverlayStretch = 0; fDDCAPS.dwNLVBCKeyCaps = 0; fDDCAPS.dwNLVBCaps = 0; fDDCAPS.dwNLVBCaps2 = 0; fDDCAPS.dwNLVBFXCaps = 0; for (int NLVBRops_index=0;NLVBRops_indexInternal_DDSCAPS2_Ptr, sizeof(DDSCAPS2) ); return &fDDCAPS; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetInternal_DDCAPS( DDCAPS* pDDCAPS ) { if (pDDCAPS==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FSetInternal_DDCAPS()", "TDX_ERROR", "The supplied DDCAPS* was NULL" ); return; } CopyMemory( &fDDCAPS, pDDCAPS, sizeof(DDCAPS) ); Internal_DDCAPS_Update(); } // -------------------------------------------------------------------------- void __fastcall TDDCaps::Internal_DDCAPS_Update() { if (fSCaps!=NULL) CopyMemory( fSCaps->Internal_DDSCAPS2_Ptr, &fDDCAPS.ddsCaps, sizeof(DDSCAPS2) ); } // -------------------------------------------------------------------------- // Method: FGetCKeyCaps_ // Description: This method returns a TDDCaps_CKeyCaps_Set<> of the flags in // the current fDDCAPS.dwCKeyCaps. // Note: Wrapper components use the following method to modify flags // via the BCB Object Inspector. // -------------------------------------------------------------------------- TDDCaps_CKeyCaps_Set __fastcall TDDCaps::FGetCKeyCaps_() { TDDCaps_CKeyCaps_Set TempCKeyCaps_; TempCKeyCaps_.Clear(); if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_DESTBLT) TempCKeyCaps_ = TempCKeyCaps_ << ddckeycaps_destblt; if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_DESTBLTCLRSPACE) TempCKeyCaps_ = TempCKeyCaps_ << ddckeycaps_destbltclrspace; if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_DESTBLTCLRSPACEYUV) TempCKeyCaps_ = TempCKeyCaps_ << ddckeycaps_destbltclrspaceyuv; if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_DESTBLTYUV) TempCKeyCaps_ = TempCKeyCaps_ << ddckeycaps_destbltyuv; if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_DESTOVERLAY) TempCKeyCaps_ = TempCKeyCaps_ << ddckeycaps_destoverlay; if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_DESTOVERLAYCLRSPACE) TempCKeyCaps_ = TempCKeyCaps_ << ddckeycaps_destoverlayclrspace; if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV) TempCKeyCaps_ = TempCKeyCaps_ << ddckeycaps_destoverlayclrspaceyuv; if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_DESTOVERLAYONEACTIVE) TempCKeyCaps_ = TempCKeyCaps_ << ddckeycaps_destoverlayoneactive; if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_DESTOVERLAYYUV) TempCKeyCaps_ = TempCKeyCaps_ << ddckeycaps_destoverlayyuv; if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_NOCOSTOVERLAY) TempCKeyCaps_ = TempCKeyCaps_ << ddckeycaps_nocostoverlay; if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_SRCBLT) TempCKeyCaps_ = TempCKeyCaps_ << ddckeycaps_srcblt; if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_SRCBLTCLRSPACE) TempCKeyCaps_ = TempCKeyCaps_ << ddckeycaps_srcbltclrspace; if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_SRCBLTCLRSPACEYUV) TempCKeyCaps_ = TempCKeyCaps_ << ddckeycaps_srcbltclrspaceyuv; if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_SRCBLTYUV) TempCKeyCaps_ = TempCKeyCaps_ << ddckeycaps_srcbltyuv; if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_SRCOVERLAY) TempCKeyCaps_ = TempCKeyCaps_ << ddckeycaps_srcoverlay; if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_SRCOVERLAYCLRSPACE) TempCKeyCaps_ = TempCKeyCaps_ << ddckeycaps_srcoverlayclrspace; if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV) TempCKeyCaps_ = TempCKeyCaps_ << ddckeycaps_srcoverlayclrspaceyuv; if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_SRCOVERLAYONEACTIVE) TempCKeyCaps_ = TempCKeyCaps_ << ddckeycaps_srcoverlayoneactive; if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_SRCOVERLAYYUV) TempCKeyCaps_ = TempCKeyCaps_ << ddckeycaps_srcoverlayyuv; return TempCKeyCaps_; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetCKeyCaps_( TDDCaps_CKeyCaps_Set pCKeyCaps_ ) { fDDCAPS.dwCKeyCaps = 0; if (pCKeyCaps_.Contains(ddckeycaps_destblt)) fDDCAPS.dwCKeyCaps |= DDCKEYCAPS_DESTBLT; if (pCKeyCaps_.Contains(ddckeycaps_destbltclrspace)) fDDCAPS.dwCKeyCaps |= DDCKEYCAPS_DESTBLTCLRSPACE; if (pCKeyCaps_.Contains(ddckeycaps_destbltclrspaceyuv)) fDDCAPS.dwCKeyCaps |= DDCKEYCAPS_DESTBLTCLRSPACEYUV; if (pCKeyCaps_.Contains(ddckeycaps_destbltyuv)) fDDCAPS.dwCKeyCaps |= DDCKEYCAPS_DESTBLTYUV; if (pCKeyCaps_.Contains(ddckeycaps_destoverlay)) fDDCAPS.dwCKeyCaps |= DDCKEYCAPS_DESTOVERLAY; if (pCKeyCaps_.Contains(ddckeycaps_destoverlayclrspace)) fDDCAPS.dwCKeyCaps |= DDCKEYCAPS_DESTOVERLAYCLRSPACE; if (pCKeyCaps_.Contains(ddckeycaps_destoverlayclrspaceyuv)) fDDCAPS.dwCKeyCaps |= DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV; if (pCKeyCaps_.Contains(ddckeycaps_destoverlayoneactive)) fDDCAPS.dwCKeyCaps |= DDCKEYCAPS_DESTOVERLAYONEACTIVE; if (pCKeyCaps_.Contains(ddckeycaps_destoverlayyuv)) fDDCAPS.dwCKeyCaps |= DDCKEYCAPS_DESTOVERLAYYUV; if (pCKeyCaps_.Contains(ddckeycaps_nocostoverlay)) fDDCAPS.dwCKeyCaps |= DDCKEYCAPS_NOCOSTOVERLAY; if (pCKeyCaps_.Contains(ddckeycaps_srcblt)) fDDCAPS.dwCKeyCaps |= DDCKEYCAPS_SRCBLT; if (pCKeyCaps_.Contains(ddckeycaps_srcbltclrspace)) fDDCAPS.dwCKeyCaps |= DDCKEYCAPS_SRCBLTCLRSPACE; if (pCKeyCaps_.Contains(ddckeycaps_srcbltclrspaceyuv)) fDDCAPS.dwCKeyCaps |= DDCKEYCAPS_SRCBLTCLRSPACEYUV; if (pCKeyCaps_.Contains(ddckeycaps_srcbltyuv)) fDDCAPS.dwCKeyCaps |= DDCKEYCAPS_SRCBLTYUV; if (pCKeyCaps_.Contains(ddckeycaps_srcoverlay)) fDDCAPS.dwCKeyCaps |= DDCKEYCAPS_SRCOVERLAY; if (pCKeyCaps_.Contains(ddckeycaps_srcoverlayclrspace)) fDDCAPS.dwCKeyCaps |= DDCKEYCAPS_SRCOVERLAYCLRSPACE; if (pCKeyCaps_.Contains(ddckeycaps_srcoverlayclrspaceyuv)) fDDCAPS.dwCKeyCaps |= DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV; if (pCKeyCaps_.Contains(ddckeycaps_srcoverlayoneactive)) fDDCAPS.dwCKeyCaps |= DDCKEYCAPS_SRCOVERLAYONEACTIVE; if (pCKeyCaps_.Contains(ddckeycaps_srcoverlayyuv)) fDDCAPS.dwCKeyCaps |= DDCKEYCAPS_SRCOVERLAYYUV; } // -------------------------------------------------------------------------- // Method: FGetCKeyCaps_Strings() // This method creates and then returns a TStringList containing // the current set of 'CKeyCaps' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDDCaps::FGetCKeyCaps_Strings() { // if the strings have not been allocated if (fCKeyCaps_Strings==NULL) { // attempt to allocate the strings fCKeyCaps_Strings = new TStringList(); // if the allocation failed if (fCKeyCaps_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetCKeyCaps_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various CKeyCaps_Strings" ); return NULL; } } fCKeyCaps_Strings->Clear(); if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_DESTBLT) fCKeyCaps_Strings->Add("DDCKEYCAPS_DESTBLT"); if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_DESTBLTCLRSPACE) fCKeyCaps_Strings->Add("DDCKEYCAPS_DESTBLTCLRSPACE"); if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_DESTBLTCLRSPACEYUV) fCKeyCaps_Strings->Add("DDCKEYCAPS_DESTBLTCLRSPACEYUV"); if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_DESTBLTYUV) fCKeyCaps_Strings->Add("DDCKEYCAPS_DESTBLTYUV"); if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_DESTOVERLAY) fCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAY"); if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_DESTOVERLAYCLRSPACE) fCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAYCLRSPACE"); if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV) fCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV"); if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_DESTOVERLAYONEACTIVE) fCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAYONEACTIVE"); if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_DESTOVERLAYYUV) fCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAYYUV"); if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_NOCOSTOVERLAY) fCKeyCaps_Strings->Add("DDCKEYCAPS_NOCOSTOVERLAY"); if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_SRCBLT) fCKeyCaps_Strings->Add("DDCKEYCAPS_SRCBLT"); if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_SRCBLTCLRSPACE) fCKeyCaps_Strings->Add("DDCKEYCAPS_SRCBLTCLRSPACE"); if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_SRCBLTCLRSPACEYUV) fCKeyCaps_Strings->Add("DDCKEYCAPS_SRCBLTCLRSPACEYUV"); if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_SRCBLTYUV) fCKeyCaps_Strings->Add("DDCKEYCAPS_SRCBLTYUV"); if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_SRCOVERLAY) fCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAY"); if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_SRCOVERLAYCLRSPACE) fCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAYCLRSPACE"); if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV) fCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV"); if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_SRCOVERLAYONEACTIVE) fCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAYONEACTIVE"); if (fDDCAPS.dwCKeyCaps & DDCKEYCAPS_SRCOVERLAYYUV) fCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAYYUV"); return fCKeyCaps_Strings; } // -------------------------------------------------------------------------- // Method: FGetCaps_ // Description: This method returns a TDDCaps_Caps_Set<> of the flags in the // current fDDCAPS.dwCaps. // Note: Wrapper components use the following method to modify flags // via the BCB Object Inspector. // -------------------------------------------------------------------------- TDDCaps_Caps_Set __fastcall TDDCaps::FGetCaps_() { TDDCaps_Caps_Set TempCaps_; TempCaps_.Clear(); if (fDDCAPS.dwCaps & DDCAPS_3D) TempCaps_ = TempCaps_ << ddcaps_3d; if (fDDCAPS.dwCaps & DDCAPS_ALIGNBOUNDARYDEST) TempCaps_ = TempCaps_ << ddcaps_alignboundarydest; if (fDDCAPS.dwCaps & DDCAPS_ALIGNBOUNDARYSRC) TempCaps_ = TempCaps_ << ddcaps_alignboundarysrc; if (fDDCAPS.dwCaps & DDCAPS_ALIGNSIZEDEST) TempCaps_ = TempCaps_ << ddcaps_alignsizedest; if (fDDCAPS.dwCaps & DDCAPS_ALIGNSIZESRC) TempCaps_ = TempCaps_ << ddcaps_alignsizesrc; if (fDDCAPS.dwCaps & DDCAPS_ALIGNSTRIDE) TempCaps_ = TempCaps_ << ddcaps_alignstride; if (fDDCAPS.dwCaps & DDCAPS_ALPHA) TempCaps_ = TempCaps_ << ddcaps_alpha; if (fDDCAPS.dwCaps & DDCAPS_BANKSWITCHED) TempCaps_ = TempCaps_ << ddcaps_bankswitched; if (fDDCAPS.dwCaps & DDCAPS_BLT) TempCaps_ = TempCaps_ << ddcaps_blt; if (fDDCAPS.dwCaps & DDCAPS_BLTCOLORFILL) TempCaps_ = TempCaps_ << ddcaps_bltcolorfill; if (fDDCAPS.dwCaps & DDCAPS_BLTDEPTHFILL) TempCaps_ = TempCaps_ << ddcaps_bltdepthfill; if (fDDCAPS.dwCaps & DDCAPS_BLTFOURCC) TempCaps_ = TempCaps_ << ddcaps_bltfourcc; if (fDDCAPS.dwCaps & DDCAPS_BLTQUEUE) TempCaps_ = TempCaps_ << ddcaps_bltqueue; if (fDDCAPS.dwCaps & DDCAPS_BLTSTRETCH) TempCaps_ = TempCaps_ << ddcaps_bltstretch; if (fDDCAPS.dwCaps & DDCAPS_CANBLTSYSMEM) TempCaps_ = TempCaps_ << ddcaps_canbltsysmem; if (fDDCAPS.dwCaps & DDCAPS_CANCLIP) TempCaps_ = TempCaps_ << ddcaps_canclip; if (fDDCAPS.dwCaps & DDCAPS_CANCLIPSTRETCHED) TempCaps_ = TempCaps_ << ddcaps_canclipstretched; if (fDDCAPS.dwCaps & DDCAPS_COLORKEY) TempCaps_ = TempCaps_ << ddcaps_colorkey; if (fDDCAPS.dwCaps & DDCAPS_COLORKEYHWASSIST) TempCaps_ = TempCaps_ << ddcaps_colorkeyhwassist; if (fDDCAPS.dwCaps & DDCAPS_GDI) TempCaps_ = TempCaps_ << ddcaps_gdi; if (fDDCAPS.dwCaps & DDCAPS_NOHARDWARE) TempCaps_ = TempCaps_ << ddcaps_nohardware; if (fDDCAPS.dwCaps & DDCAPS_OVERLAY) TempCaps_ = TempCaps_ << ddcaps_overlay; if (fDDCAPS.dwCaps & DDCAPS_OVERLAYCANTCLIP) TempCaps_ = TempCaps_ << ddcaps_overlaycantclip; if (fDDCAPS.dwCaps & DDCAPS_OVERLAYFOURCC) TempCaps_ = TempCaps_ << ddcaps_overlayfourcc; if (fDDCAPS.dwCaps & DDCAPS_OVERLAYSTRETCH) TempCaps_ = TempCaps_ << ddcaps_overlaystretch; if (fDDCAPS.dwCaps & DDCAPS_PALETTE) TempCaps_ = TempCaps_ << ddcaps_palette; if (fDDCAPS.dwCaps & DDCAPS_PALETTEVSYNC) TempCaps_ = TempCaps_ << ddcaps_palettevsync; if (fDDCAPS.dwCaps & DDCAPS_READSCANLINE) TempCaps_ = TempCaps_ << ddcaps_readscanline; if (fDDCAPS.dwCaps & DDCAPS_VBI) TempCaps_ = TempCaps_ << ddcaps_vbi; if (fDDCAPS.dwCaps & DDCAPS_ZBLTS) TempCaps_ = TempCaps_ << ddcaps_zblts; if (fDDCAPS.dwCaps & DDCAPS_ZOVERLAYS) TempCaps_ = TempCaps_ << ddcaps_zoverlays; return TempCaps_; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetCaps_( TDDCaps_Caps_Set pCaps_ ) { fDDCAPS.dwCaps = 0; if (pCaps_.Contains(ddcaps_3d)) fDDCAPS.dwCaps |= DDCAPS_3D; if (pCaps_.Contains(ddcaps_alignboundarydest)) fDDCAPS.dwCaps |= DDCAPS_ALIGNBOUNDARYDEST; if (pCaps_.Contains(ddcaps_alignboundarysrc)) fDDCAPS.dwCaps |= DDCAPS_ALIGNBOUNDARYSRC; if (pCaps_.Contains(ddcaps_alignsizedest)) fDDCAPS.dwCaps |= DDCAPS_ALIGNSIZEDEST; if (pCaps_.Contains(ddcaps_alignsizesrc)) fDDCAPS.dwCaps |= DDCAPS_ALIGNSIZESRC; if (pCaps_.Contains(ddcaps_alignstride)) fDDCAPS.dwCaps |= DDCAPS_ALIGNSTRIDE; if (pCaps_.Contains(ddcaps_alpha)) fDDCAPS.dwCaps |= DDCAPS_ALPHA; if (pCaps_.Contains(ddcaps_bankswitched)) fDDCAPS.dwCaps |= DDCAPS_BANKSWITCHED; if (pCaps_.Contains(ddcaps_blt)) fDDCAPS.dwCaps |= DDCAPS_BLT; if (pCaps_.Contains(ddcaps_bltcolorfill)) fDDCAPS.dwCaps |= DDCAPS_BLTCOLORFILL; if (pCaps_.Contains(ddcaps_bltdepthfill)) fDDCAPS.dwCaps |= DDCAPS_BLTDEPTHFILL; if (pCaps_.Contains(ddcaps_bltfourcc)) fDDCAPS.dwCaps |= DDCAPS_BLTFOURCC; if (pCaps_.Contains(ddcaps_bltqueue)) fDDCAPS.dwCaps |= DDCAPS_BLTQUEUE; if (pCaps_.Contains(ddcaps_bltstretch)) fDDCAPS.dwCaps |= DDCAPS_BLTSTRETCH; if (pCaps_.Contains(ddcaps_canbltsysmem)) fDDCAPS.dwCaps |= DDCAPS_CANBLTSYSMEM; if (pCaps_.Contains(ddcaps_canclip)) fDDCAPS.dwCaps |= DDCAPS_CANCLIP; if (pCaps_.Contains(ddcaps_canclipstretched)) fDDCAPS.dwCaps |= DDCAPS_CANCLIPSTRETCHED; if (pCaps_.Contains(ddcaps_colorkey)) fDDCAPS.dwCaps |= DDCAPS_COLORKEY; if (pCaps_.Contains(ddcaps_colorkeyhwassist)) fDDCAPS.dwCaps |= DDCAPS_COLORKEYHWASSIST; if (pCaps_.Contains(ddcaps_gdi)) fDDCAPS.dwCaps |= DDCAPS_GDI; if (pCaps_.Contains(ddcaps_nohardware)) fDDCAPS.dwCaps |= DDCAPS_NOHARDWARE; if (pCaps_.Contains(ddcaps_overlay)) fDDCAPS.dwCaps |= DDCAPS_OVERLAY; if (pCaps_.Contains(ddcaps_overlaycantclip)) fDDCAPS.dwCaps |= DDCAPS_OVERLAYCANTCLIP; if (pCaps_.Contains(ddcaps_overlayfourcc)) fDDCAPS.dwCaps |= DDCAPS_OVERLAYFOURCC; if (pCaps_.Contains(ddcaps_overlaystretch)) fDDCAPS.dwCaps |= DDCAPS_OVERLAYSTRETCH; if (pCaps_.Contains(ddcaps_palette)) fDDCAPS.dwCaps |= DDCAPS_PALETTE; if (pCaps_.Contains(ddcaps_palettevsync)) fDDCAPS.dwCaps |= DDCAPS_PALETTEVSYNC; if (pCaps_.Contains(ddcaps_readscanline)) fDDCAPS.dwCaps |= DDCAPS_READSCANLINE; if (pCaps_.Contains(ddcaps_vbi)) fDDCAPS.dwCaps |= DDCAPS_VBI; if (pCaps_.Contains(ddcaps_zblts)) fDDCAPS.dwCaps |= DDCAPS_ZBLTS; if (pCaps_.Contains(ddcaps_zoverlays)) fDDCAPS.dwCaps |= DDCAPS_ZOVERLAYS; } // -------------------------------------------------------------------------- // Method: FGetCaps_Strings() // This method creates and then returns a TStringList containing // the current set of 'Caps' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDDCaps::FGetCaps_Strings() { // if the strings have not been allocated if (fCaps_Strings==NULL) { // attempt to allocate the strings fCaps_Strings = new TStringList(); // if the allocation failed if (fCaps_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetCaps_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various Caps_Strings" ); return NULL; } } fCaps_Strings->Clear(); if (fDDCAPS.dwCaps & DDCAPS_3D) fCaps_Strings->Add("DDCAPS_3D"); if (fDDCAPS.dwCaps & DDCAPS_ALIGNBOUNDARYDEST) fCaps_Strings->Add("DDCAPS_ALIGNBOUNDARYDEST"); if (fDDCAPS.dwCaps & DDCAPS_ALIGNBOUNDARYSRC) fCaps_Strings->Add("DDCAPS_ALIGNBOUNDARYSRC"); if (fDDCAPS.dwCaps & DDCAPS_ALIGNSIZEDEST) fCaps_Strings->Add("DDCAPS_ALIGNSIZEDEST"); if (fDDCAPS.dwCaps & DDCAPS_ALIGNSIZESRC) fCaps_Strings->Add("DDCAPS_ALIGNSIZESRC"); if (fDDCAPS.dwCaps & DDCAPS_ALIGNSTRIDE) fCaps_Strings->Add("DDCAPS_ALIGNSTRIDE"); if (fDDCAPS.dwCaps & DDCAPS_ALPHA) fCaps_Strings->Add("DDCAPS_ALPHA"); if (fDDCAPS.dwCaps & DDCAPS_BANKSWITCHED) fCaps_Strings->Add("DDCAPS_BANKSWITCHED"); if (fDDCAPS.dwCaps & DDCAPS_BLT) fCaps_Strings->Add("DDCAPS_BLT"); if (fDDCAPS.dwCaps & DDCAPS_BLTCOLORFILL) fCaps_Strings->Add("DDCAPS_BLTCOLORFILL"); if (fDDCAPS.dwCaps & DDCAPS_BLTDEPTHFILL) fCaps_Strings->Add("DDCAPS_BLTDEPTHFILL"); if (fDDCAPS.dwCaps & DDCAPS_BLTFOURCC) fCaps_Strings->Add("DDCAPS_BLTFOURCC"); if (fDDCAPS.dwCaps & DDCAPS_BLTQUEUE) fCaps_Strings->Add("DDCAPS_BLTQUEUE"); if (fDDCAPS.dwCaps & DDCAPS_BLTSTRETCH) fCaps_Strings->Add("DDCAPS_BLTSTRETCH"); if (fDDCAPS.dwCaps & DDCAPS_CANBLTSYSMEM) fCaps_Strings->Add("DDCAPS_CANBLTSYSMEM"); if (fDDCAPS.dwCaps & DDCAPS_CANCLIP) fCaps_Strings->Add("DDCAPS_CANCLIP"); if (fDDCAPS.dwCaps & DDCAPS_CANCLIPSTRETCHED) fCaps_Strings->Add("DDCAPS_CANCLIPSTRETCHED"); if (fDDCAPS.dwCaps & DDCAPS_COLORKEY) fCaps_Strings->Add("DDCAPS_COLORKEY"); if (fDDCAPS.dwCaps & DDCAPS_COLORKEYHWASSIST) fCaps_Strings->Add("DDCAPS_COLORKEYHWASSIST"); if (fDDCAPS.dwCaps & DDCAPS_GDI) fCaps_Strings->Add("DDCAPS_GDI"); if (fDDCAPS.dwCaps & DDCAPS_NOHARDWARE) fCaps_Strings->Add("DDCAPS_NOHARDWARE"); if (fDDCAPS.dwCaps & DDCAPS_OVERLAY) fCaps_Strings->Add("DDCAPS_OVERLAY"); if (fDDCAPS.dwCaps & DDCAPS_OVERLAYCANTCLIP) fCaps_Strings->Add("DDCAPS_OVERLAYCANTCLIP"); if (fDDCAPS.dwCaps & DDCAPS_OVERLAYFOURCC) fCaps_Strings->Add("DDCAPS_OVERLAYFOURCC"); if (fDDCAPS.dwCaps & DDCAPS_OVERLAYSTRETCH) fCaps_Strings->Add("DDCAPS_OVERLAYSTRETCH"); if (fDDCAPS.dwCaps & DDCAPS_PALETTE) fCaps_Strings->Add("DDCAPS_PALETTE"); if (fDDCAPS.dwCaps & DDCAPS_PALETTEVSYNC) fCaps_Strings->Add("DDCAPS_PALETTEVSYNC"); if (fDDCAPS.dwCaps & DDCAPS_READSCANLINE) fCaps_Strings->Add("DDCAPS_READSCANLINE"); if (fDDCAPS.dwCaps & DDCAPS_VBI) fCaps_Strings->Add("DDCAPS_VBI"); if (fDDCAPS.dwCaps & DDCAPS_ZBLTS) fCaps_Strings->Add("DDCAPS_ZBLTS"); if (fDDCAPS.dwCaps & DDCAPS_ZOVERLAYS) fCaps_Strings->Add("DDCAPS_ZOVERLAYS"); return fCaps_Strings; } // -------------------------------------------------------------------------- // Method: FGetCaps2_ // Description: This method returns a TDDCaps_Caps2_Set<> of the flags in the // current fDDCAPS.dwCaps2. // Note: Wrapper components use the following method to modify flags // via the BCB Object Inspector. // -------------------------------------------------------------------------- TDDCaps_Caps2_Set __fastcall TDDCaps::FGetCaps2_() { TDDCaps_Caps2_Set TempCaps2_; TempCaps2_.Clear(); if (fDDCAPS.dwCaps2 & DDCAPS2_AUTOFLIPOVERLAY) TempCaps2_ = TempCaps2_ << ddcaps2_autoflipoverlay; if (fDDCAPS.dwCaps2 & DDCAPS2_CANBOBHARDWARE) TempCaps2_ = TempCaps2_ << ddcaps2_canbobhardware; if (fDDCAPS.dwCaps2 & DDCAPS2_CANBOBINTERLEAVED) TempCaps2_ = TempCaps2_ << ddcaps2_canbobinterleaved; if (fDDCAPS.dwCaps2 & DDCAPS2_CANBOBNONINTERLEAVED) TempCaps2_ = TempCaps2_ << ddcaps2_canbobnoninterleaved; if (fDDCAPS.dwCaps2 & DDCAPS2_CANCALIBRATEGAMMA) TempCaps2_ = TempCaps2_ << ddcaps2_cancalibrategamma; if (fDDCAPS.dwCaps2 & DDCAPS2_CANDROPZ16BIT) TempCaps2_ = TempCaps2_ << ddcaps2_candropz16bit; if (fDDCAPS.dwCaps2 & DDCAPS2_CANFLIPODDEVEN) TempCaps2_ = TempCaps2_ << ddcaps2_canflipoddeven; if (fDDCAPS.dwCaps2 & DDCAPS2_CANMANAGETEXTURE) TempCaps2_ = TempCaps2_ << ddcaps2_canmanagetexture; if (fDDCAPS.dwCaps2 & DDCAPS2_CANRENDERWINDOWED) TempCaps2_ = TempCaps2_ << ddcaps2_canrenderwindowed; if (fDDCAPS.dwCaps2 & DDCAPS2_CERTIFIED) TempCaps2_ = TempCaps2_ << ddcaps2_certified; if (fDDCAPS.dwCaps2 & DDCAPS2_COLORCONTROLOVERLAY) TempCaps2_ = TempCaps2_ << ddcaps2_colorcontroloverlay; if (fDDCAPS.dwCaps2 & DDCAPS2_COLORCONTROLPRIMARY) TempCaps2_ = TempCaps2_ << ddcaps2_colorcontrolprimary; if (fDDCAPS.dwCaps2 & DDCAPS2_COPYFOURCC) TempCaps2_ = TempCaps2_ << ddcaps2_copyfourcc; if (fDDCAPS.dwCaps2 & DDCAPS2_FLIPINTERVAL) TempCaps2_ = TempCaps2_ << ddcaps2_flipinterval; if (fDDCAPS.dwCaps2 & DDCAPS2_FLIPNOVSYNC) TempCaps2_ = TempCaps2_ << ddcaps2_flipnovsync; if (fDDCAPS.dwCaps2 & DDCAPS2_NO2DDURING3DSCENE) TempCaps2_ = TempCaps2_ << ddcaps2_no2dduring3dscene; if (fDDCAPS.dwCaps2 & DDCAPS2_NONLOCALVIDMEM) TempCaps2_ = TempCaps2_ << ddcaps2_nonlocalvidmem; if (fDDCAPS.dwCaps2 & DDCAPS2_NONLOCALVIDMEMCAPS) TempCaps2_ = TempCaps2_ << ddcaps2_nonlocalvidmemcaps; if (fDDCAPS.dwCaps2 & DDCAPS2_NOPAGELOCKREQUIRED) TempCaps2_ = TempCaps2_ << ddcaps2_nopagelockrequired; if (fDDCAPS.dwCaps2 & DDCAPS2_PRIMARYGAMMA) TempCaps2_ = TempCaps2_ << ddcaps2_primarygamma; if (fDDCAPS.dwCaps2 & DDCAPS2_STEREO) TempCaps2_ = TempCaps2_ << ddcaps2_stereo; if (fDDCAPS.dwCaps2 & DDCAPS2_TEXMANINNONLOCALVIDMEM) TempCaps2_ = TempCaps2_ << ddcaps2_texmaninnonlocalvidmem; if (fDDCAPS.dwCaps2 & DDCAPS2_VIDEOPORT) TempCaps2_ = TempCaps2_ << ddcaps2_videoport; if (fDDCAPS.dwCaps2 & DDCAPS2_WIDESURFACES) TempCaps2_ = TempCaps2_ << ddcaps2_widesurfaces; return TempCaps2_; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetCaps2_( TDDCaps_Caps2_Set pCaps2_ ) { fDDCAPS.dwCaps2 = 0; if (pCaps2_.Contains(ddcaps2_autoflipoverlay)) fDDCAPS.dwCaps2 |= DDCAPS2_AUTOFLIPOVERLAY; if (pCaps2_.Contains(ddcaps2_canbobhardware)) fDDCAPS.dwCaps2 |= DDCAPS2_CANBOBHARDWARE; if (pCaps2_.Contains(ddcaps2_canbobinterleaved)) fDDCAPS.dwCaps2 |= DDCAPS2_CANBOBINTERLEAVED; if (pCaps2_.Contains(ddcaps2_canbobnoninterleaved)) fDDCAPS.dwCaps2 |= DDCAPS2_CANBOBNONINTERLEAVED; if (pCaps2_.Contains(ddcaps2_cancalibrategamma)) fDDCAPS.dwCaps2 |= DDCAPS2_CANCALIBRATEGAMMA; if (pCaps2_.Contains(ddcaps2_candropz16bit)) fDDCAPS.dwCaps2 |= DDCAPS2_CANDROPZ16BIT; if (pCaps2_.Contains(ddcaps2_canflipoddeven)) fDDCAPS.dwCaps2 |= DDCAPS2_CANFLIPODDEVEN; if (pCaps2_.Contains(ddcaps2_canmanagetexture)) fDDCAPS.dwCaps2 |= DDCAPS2_CANMANAGETEXTURE; if (pCaps2_.Contains(ddcaps2_canrenderwindowed)) fDDCAPS.dwCaps2 |= DDCAPS2_CANRENDERWINDOWED; if (pCaps2_.Contains(ddcaps2_certified)) fDDCAPS.dwCaps2 |= DDCAPS2_CERTIFIED; if (pCaps2_.Contains(ddcaps2_colorcontroloverlay)) fDDCAPS.dwCaps2 |= DDCAPS2_COLORCONTROLOVERLAY; if (pCaps2_.Contains(ddcaps2_colorcontrolprimary)) fDDCAPS.dwCaps2 |= DDCAPS2_COLORCONTROLPRIMARY; if (pCaps2_.Contains(ddcaps2_copyfourcc)) fDDCAPS.dwCaps2 |= DDCAPS2_COPYFOURCC; if (pCaps2_.Contains(ddcaps2_flipinterval)) fDDCAPS.dwCaps2 |= DDCAPS2_FLIPINTERVAL; if (pCaps2_.Contains(ddcaps2_flipnovsync)) fDDCAPS.dwCaps2 |= DDCAPS2_FLIPNOVSYNC; if (pCaps2_.Contains(ddcaps2_no2dduring3dscene)) fDDCAPS.dwCaps2 |= DDCAPS2_NO2DDURING3DSCENE; if (pCaps2_.Contains(ddcaps2_nonlocalvidmem)) fDDCAPS.dwCaps2 |= DDCAPS2_NONLOCALVIDMEM; if (pCaps2_.Contains(ddcaps2_nonlocalvidmemcaps)) fDDCAPS.dwCaps2 |= DDCAPS2_NONLOCALVIDMEMCAPS; if (pCaps2_.Contains(ddcaps2_nopagelockrequired)) fDDCAPS.dwCaps2 |= DDCAPS2_NOPAGELOCKREQUIRED; if (pCaps2_.Contains(ddcaps2_primarygamma)) fDDCAPS.dwCaps2 |= DDCAPS2_PRIMARYGAMMA; if (pCaps2_.Contains(ddcaps2_stereo)) fDDCAPS.dwCaps2 |= DDCAPS2_STEREO; if (pCaps2_.Contains(ddcaps2_texmaninnonlocalvidmem)) fDDCAPS.dwCaps2 |= DDCAPS2_TEXMANINNONLOCALVIDMEM; if (pCaps2_.Contains(ddcaps2_videoport)) fDDCAPS.dwCaps2 |= DDCAPS2_VIDEOPORT; if (pCaps2_.Contains(ddcaps2_widesurfaces)) fDDCAPS.dwCaps2 |= DDCAPS2_WIDESURFACES; } // -------------------------------------------------------------------------- // Method: FGetCaps2_Strings() // This method creates and then returns a TStringList containing // the current set of 'Caps2' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDDCaps::FGetCaps2_Strings() { // if the strings have not been allocated if (fCaps2_Strings==NULL) { // attempt to allocate the strings fCaps2_Strings = new TStringList(); // if the allocation failed if (fCaps2_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetCaps2_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various Caps2_Strings" ); return NULL; } } fCaps2_Strings->Clear(); if (fDDCAPS.dwCaps2 & DDCAPS2_AUTOFLIPOVERLAY) fCaps2_Strings->Add("DDCAPS2_AUTOFLIPOVERLAY"); if (fDDCAPS.dwCaps2 & DDCAPS2_CANBOBHARDWARE) fCaps2_Strings->Add("DDCAPS2_CANBOBHARDWARE"); if (fDDCAPS.dwCaps2 & DDCAPS2_CANBOBINTERLEAVED) fCaps2_Strings->Add("DDCAPS2_CANBOBINTERLEAVED"); if (fDDCAPS.dwCaps2 & DDCAPS2_CANBOBNONINTERLEAVED) fCaps2_Strings->Add("DDCAPS2_CANBOBNONINTERLEAVED"); if (fDDCAPS.dwCaps2 & DDCAPS2_CANCALIBRATEGAMMA) fCaps2_Strings->Add("DDCAPS2_CANCALIBRATEGAMMA"); if (fDDCAPS.dwCaps2 & DDCAPS2_CANDROPZ16BIT) fCaps2_Strings->Add("DDCAPS2_CANDROPZ16BIT"); if (fDDCAPS.dwCaps2 & DDCAPS2_CANFLIPODDEVEN) fCaps2_Strings->Add("DDCAPS2_CANFLIPODDEVEN"); if (fDDCAPS.dwCaps2 & DDCAPS2_CANMANAGETEXTURE) fCaps2_Strings->Add("DDCAPS2_CANMANAGETEXTURE"); if (fDDCAPS.dwCaps2 & DDCAPS2_CANRENDERWINDOWED) fCaps2_Strings->Add("DDCAPS2_CANRENDERWINDOWED"); if (fDDCAPS.dwCaps2 & DDCAPS2_CERTIFIED) fCaps2_Strings->Add("DDCAPS2_CERTIFIED"); if (fDDCAPS.dwCaps2 & DDCAPS2_COLORCONTROLOVERLAY) fCaps2_Strings->Add("DDCAPS2_COLORCONTROLOVERLAY"); if (fDDCAPS.dwCaps2 & DDCAPS2_COLORCONTROLPRIMARY) fCaps2_Strings->Add("DDCAPS2_COLORCONTROLPRIMARY"); if (fDDCAPS.dwCaps2 & DDCAPS2_COPYFOURCC) fCaps2_Strings->Add("DDCAPS2_COPYFOURCC"); if (fDDCAPS.dwCaps2 & DDCAPS2_FLIPINTERVAL) fCaps2_Strings->Add("DDCAPS2_FLIPINTERVAL"); if (fDDCAPS.dwCaps2 & DDCAPS2_FLIPNOVSYNC) fCaps2_Strings->Add("DDCAPS2_FLIPNOVSYNC"); if (fDDCAPS.dwCaps2 & DDCAPS2_NO2DDURING3DSCENE) fCaps2_Strings->Add("DDCAPS2_NO2DDURING3DSCENE"); if (fDDCAPS.dwCaps2 & DDCAPS2_NONLOCALVIDMEM) fCaps2_Strings->Add("DDCAPS2_NONLOCALVIDMEM"); if (fDDCAPS.dwCaps2 & DDCAPS2_NONLOCALVIDMEMCAPS) fCaps2_Strings->Add("DDCAPS2_NONLOCALVIDMEMCAPS"); if (fDDCAPS.dwCaps2 & DDCAPS2_NOPAGELOCKREQUIRED) fCaps2_Strings->Add("DDCAPS2_NOPAGELOCKREQUIRED"); if (fDDCAPS.dwCaps2 & DDCAPS2_PRIMARYGAMMA) fCaps2_Strings->Add("DDCAPS2_PRIMARYGAMMA"); if (fDDCAPS.dwCaps2 & DDCAPS2_STEREO) fCaps2_Strings->Add("DDCAPS2_STEREO"); if (fDDCAPS.dwCaps2 & DDCAPS2_TEXMANINNONLOCALVIDMEM) fCaps2_Strings->Add("DDCAPS2_TEXMANINNONLOCALVIDMEM"); if (fDDCAPS.dwCaps2 & DDCAPS2_VIDEOPORT) fCaps2_Strings->Add("DDCAPS2_VIDEOPORT"); if (fDDCAPS.dwCaps2 & DDCAPS2_WIDESURFACES) fCaps2_Strings->Add("DDCAPS2_WIDESURFACES"); return fCaps2_Strings; } // -------------------------------------------------------------------------- // Method: FGetFXAlphaCaps_ // Description: This method returns a TDDCaps_FXAlphaCaps_Set<> of the flags // in the current fDDCAPS.dwFXAlphaCaps. // Note: Wrapper components use the following method to modify flags // via the BCB Object Inspector. // -------------------------------------------------------------------------- TDDCaps_FXAlphaCaps_Set __fastcall TDDCaps::FGetFXAlphaCaps_() { TDDCaps_FXAlphaCaps_Set TempFXAlphaCaps_; TempFXAlphaCaps_.Clear(); if (fDDCAPS.dwFXAlphaCaps & DDFXALPHACAPS_BLTALPHAEDGEBLEND) TempFXAlphaCaps_ = TempFXAlphaCaps_ << ddfxalphacaps_bltalphaedgeblend; if (fDDCAPS.dwFXAlphaCaps & DDFXALPHACAPS_BLTALPHAPIXELS) TempFXAlphaCaps_ = TempFXAlphaCaps_ << ddfxalphacaps_bltalphapixels; if (fDDCAPS.dwFXAlphaCaps & DDFXALPHACAPS_BLTALPHAPIXELSNEG) TempFXAlphaCaps_ = TempFXAlphaCaps_ << ddfxalphacaps_bltalphapixelsneg; if (fDDCAPS.dwFXAlphaCaps & DDFXALPHACAPS_BLTALPHASURFACES) TempFXAlphaCaps_ = TempFXAlphaCaps_ << ddfxalphacaps_bltalphasurfaces; if (fDDCAPS.dwFXAlphaCaps & DDFXALPHACAPS_BLTALPHASURFACESNEG) TempFXAlphaCaps_ = TempFXAlphaCaps_ << ddfxalphacaps_bltalphasurfacesneg; if (fDDCAPS.dwFXAlphaCaps & DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND) TempFXAlphaCaps_ = TempFXAlphaCaps_ << ddfxalphacaps_overlayalphaedgeblend; if (fDDCAPS.dwFXAlphaCaps & DDFXALPHACAPS_OVERLAYALPHAPIXELS) TempFXAlphaCaps_ = TempFXAlphaCaps_ << ddfxalphacaps_overlayalphapixels; if (fDDCAPS.dwFXAlphaCaps & DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG) TempFXAlphaCaps_ = TempFXAlphaCaps_ << ddfxalphacaps_overlayalphapixelsneg; if (fDDCAPS.dwFXAlphaCaps & DDFXALPHACAPS_OVERLAYALPHASURFACES) TempFXAlphaCaps_ = TempFXAlphaCaps_ << ddfxalphacaps_overlayalphasurfaces; if (fDDCAPS.dwFXAlphaCaps & DDFXALPHACAPS_OVERLAYALPHASURFACESNEG) TempFXAlphaCaps_ = TempFXAlphaCaps_ << ddfxalphacaps_overlayalphasurfacesneg; return TempFXAlphaCaps_; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetFXAlphaCaps_( TDDCaps_FXAlphaCaps_Set pFXAlphaCaps_ ) { fDDCAPS.dwFXAlphaCaps = 0; if (pFXAlphaCaps_.Contains(ddfxalphacaps_bltalphaedgeblend)) fDDCAPS.dwFXAlphaCaps |= DDFXALPHACAPS_BLTALPHAEDGEBLEND; if (pFXAlphaCaps_.Contains(ddfxalphacaps_bltalphapixels)) fDDCAPS.dwFXAlphaCaps |= DDFXALPHACAPS_BLTALPHAPIXELS; if (pFXAlphaCaps_.Contains(ddfxalphacaps_bltalphapixelsneg)) fDDCAPS.dwFXAlphaCaps |= DDFXALPHACAPS_BLTALPHAPIXELSNEG; if (pFXAlphaCaps_.Contains(ddfxalphacaps_bltalphasurfaces)) fDDCAPS.dwFXAlphaCaps |= DDFXALPHACAPS_BLTALPHASURFACES; if (pFXAlphaCaps_.Contains(ddfxalphacaps_bltalphasurfacesneg)) fDDCAPS.dwFXAlphaCaps |= DDFXALPHACAPS_BLTALPHASURFACESNEG; if (pFXAlphaCaps_.Contains(ddfxalphacaps_overlayalphaedgeblend)) fDDCAPS.dwFXAlphaCaps |= DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND; if (pFXAlphaCaps_.Contains(ddfxalphacaps_overlayalphapixels)) fDDCAPS.dwFXAlphaCaps |= DDFXALPHACAPS_OVERLAYALPHAPIXELS; if (pFXAlphaCaps_.Contains(ddfxalphacaps_overlayalphapixelsneg)) fDDCAPS.dwFXAlphaCaps |= DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG; if (pFXAlphaCaps_.Contains(ddfxalphacaps_overlayalphasurfaces)) fDDCAPS.dwFXAlphaCaps |= DDFXALPHACAPS_OVERLAYALPHASURFACES; if (pFXAlphaCaps_.Contains(ddfxalphacaps_overlayalphasurfacesneg)) fDDCAPS.dwFXAlphaCaps |= DDFXALPHACAPS_OVERLAYALPHASURFACESNEG; } // -------------------------------------------------------------------------- // Method: FGetFXAlphaCaps_Strings() // This method creates and then returns a TStringList containing // the current set of 'FXAlphaCaps' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDDCaps::FGetFXAlphaCaps_Strings() { // if the strings have not been allocated if (fFXAlphaCaps_Strings==NULL) { // attempt to allocate the strings fFXAlphaCaps_Strings = new TStringList(); // if the allocation failed if (fFXAlphaCaps_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetFXAlphaCaps_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various FXAlphaCaps_Strings" ); return NULL; } } fFXAlphaCaps_Strings->Clear(); if (fDDCAPS.dwFXAlphaCaps & DDFXALPHACAPS_BLTALPHAEDGEBLEND) fFXAlphaCaps_Strings->Add("DDFXALPHACAPS_BLTALPHAEDGEBLEND"); if (fDDCAPS.dwFXAlphaCaps & DDFXALPHACAPS_BLTALPHAPIXELS) fFXAlphaCaps_Strings->Add("DDFXALPHACAPS_BLTALPHAPIXELS"); if (fDDCAPS.dwFXAlphaCaps & DDFXALPHACAPS_BLTALPHAPIXELSNEG) fFXAlphaCaps_Strings->Add("DDFXALPHACAPS_BLTALPHAPIXELSNEG"); if (fDDCAPS.dwFXAlphaCaps & DDFXALPHACAPS_BLTALPHASURFACES) fFXAlphaCaps_Strings->Add("DDFXALPHACAPS_BLTALPHASURFACES"); if (fDDCAPS.dwFXAlphaCaps & DDFXALPHACAPS_BLTALPHASURFACESNEG) fFXAlphaCaps_Strings->Add("DDFXALPHACAPS_BLTALPHASURFACESNEG"); if (fDDCAPS.dwFXAlphaCaps & DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND) fFXAlphaCaps_Strings->Add("DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND"); if (fDDCAPS.dwFXAlphaCaps & DDFXALPHACAPS_OVERLAYALPHAPIXELS) fFXAlphaCaps_Strings->Add("DDFXALPHACAPS_OVERLAYALPHAPIXELS"); if (fDDCAPS.dwFXAlphaCaps & DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG) fFXAlphaCaps_Strings->Add("DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG"); if (fDDCAPS.dwFXAlphaCaps & DDFXALPHACAPS_OVERLAYALPHASURFACES) fFXAlphaCaps_Strings->Add("DDFXALPHACAPS_OVERLAYALPHASURFACES"); if (fDDCAPS.dwFXAlphaCaps & DDFXALPHACAPS_OVERLAYALPHASURFACESNEG) fFXAlphaCaps_Strings->Add("DDFXALPHACAPS_OVERLAYALPHASURFACESNEG"); return fFXAlphaCaps_Strings; } // -------------------------------------------------------------------------- // Method: FGetFXCaps_ // Description: This method returns a TDDCaps_FXCaps_Set<> of the flags in // the current fDDCAPS.dwFXCaps. // Note: Wrapper components use the following method to modify flags // via the BCB Object Inspector. // -------------------------------------------------------------------------- TDDCaps_FXCaps_Set __fastcall TDDCaps::FGetFXCaps_() { TDDCaps_FXCaps_Set TempFXCaps_; TempFXCaps_.Clear(); if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTALPHA) TempFXCaps_ = TempFXCaps_ << ddfxcaps_bltalpha; if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTARITHSTRETCHY) TempFXCaps_ = TempFXCaps_ << ddfxcaps_bltarithstretchy; if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTARITHSTRETCHYN) TempFXCaps_ = TempFXCaps_ << ddfxcaps_bltarithstretchyn; if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTFILTER) TempFXCaps_ = TempFXCaps_ << ddfxcaps_bltfilter; if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTMIRRORLEFTRIGHT) TempFXCaps_ = TempFXCaps_ << ddfxcaps_bltmirrorleftright; if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTMIRRORUPDOWN) TempFXCaps_ = TempFXCaps_ << ddfxcaps_bltmirrorupdown; if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTROTATION) TempFXCaps_ = TempFXCaps_ << ddfxcaps_bltrotation; if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTROTATION90) TempFXCaps_ = TempFXCaps_ << ddfxcaps_bltrotation90; if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTSHRINKX) TempFXCaps_ = TempFXCaps_ << ddfxcaps_bltshrinkx; if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTSHRINKXN) TempFXCaps_ = TempFXCaps_ << ddfxcaps_bltshrinkxn; if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTSHRINKY) TempFXCaps_ = TempFXCaps_ << ddfxcaps_bltshrinky; if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTSHRINKYN) TempFXCaps_ = TempFXCaps_ << ddfxcaps_bltshrinkyn; if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTSTRETCHX) TempFXCaps_ = TempFXCaps_ << ddfxcaps_bltstretchx; if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTSTRETCHXN) TempFXCaps_ = TempFXCaps_ << ddfxcaps_bltstretchxn; if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTSTRETCHY) TempFXCaps_ = TempFXCaps_ << ddfxcaps_bltstretchy; if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTSTRETCHYN) TempFXCaps_ = TempFXCaps_ << ddfxcaps_bltstretchyn; if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYALPHA) TempFXCaps_ = TempFXCaps_ << ddfxcaps_overlayalpha; if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYARITHSTRETCHY) TempFXCaps_ = TempFXCaps_ << ddfxcaps_overlayarithstretchy; if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYARITHSTRETCHYN) TempFXCaps_ = TempFXCaps_ << ddfxcaps_overlayarithstretchyn; if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYFILTER) TempFXCaps_ = TempFXCaps_ << ddfxcaps_overlayfilter; if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYMIRRORLEFTRIGHT) TempFXCaps_ = TempFXCaps_ << ddfxcaps_overlaymirrorleftright; if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYMIRRORUPDOWN) TempFXCaps_ = TempFXCaps_ << ddfxcaps_overlaymirrorupdown; if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYSHRINKX) TempFXCaps_ = TempFXCaps_ << ddfxcaps_overlayshrinkx; if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYSHRINKXN) TempFXCaps_ = TempFXCaps_ << ddfxcaps_overlayshrinkxn; if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYSHRINKY) TempFXCaps_ = TempFXCaps_ << ddfxcaps_overlayshrinky; if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYSHRINKYN) TempFXCaps_ = TempFXCaps_ << ddfxcaps_overlayshrinkyn; if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYSTRETCHX) TempFXCaps_ = TempFXCaps_ << ddfxcaps_overlaystretchx; if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYSTRETCHXN) TempFXCaps_ = TempFXCaps_ << ddfxcaps_overlaystretchxn; if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYSTRETCHY) TempFXCaps_ = TempFXCaps_ << ddfxcaps_overlaystretchy; if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYSTRETCHYN) TempFXCaps_ = TempFXCaps_ << ddfxcaps_overlaystretchyn; return TempFXCaps_; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetFXCaps_( TDDCaps_FXCaps_Set pFXCaps_ ) { fDDCAPS.dwFXCaps = 0; if (pFXCaps_.Contains(ddfxcaps_bltalpha)) fDDCAPS.dwFXCaps |= DDFXCAPS_BLTALPHA; if (pFXCaps_.Contains(ddfxcaps_bltarithstretchy)) fDDCAPS.dwFXCaps |= DDFXCAPS_BLTARITHSTRETCHY; if (pFXCaps_.Contains(ddfxcaps_bltarithstretchyn)) fDDCAPS.dwFXCaps |= DDFXCAPS_BLTARITHSTRETCHYN; if (pFXCaps_.Contains(ddfxcaps_bltfilter)) fDDCAPS.dwFXCaps |= DDFXCAPS_BLTFILTER; if (pFXCaps_.Contains(ddfxcaps_bltmirrorleftright)) fDDCAPS.dwFXCaps |= DDFXCAPS_BLTMIRRORLEFTRIGHT; if (pFXCaps_.Contains(ddfxcaps_bltmirrorupdown)) fDDCAPS.dwFXCaps |= DDFXCAPS_BLTMIRRORUPDOWN; if (pFXCaps_.Contains(ddfxcaps_bltrotation)) fDDCAPS.dwFXCaps |= DDFXCAPS_BLTROTATION; if (pFXCaps_.Contains(ddfxcaps_bltrotation90)) fDDCAPS.dwFXCaps |= DDFXCAPS_BLTROTATION90; if (pFXCaps_.Contains(ddfxcaps_bltshrinkx)) fDDCAPS.dwFXCaps |= DDFXCAPS_BLTSHRINKX; if (pFXCaps_.Contains(ddfxcaps_bltshrinkxn)) fDDCAPS.dwFXCaps |= DDFXCAPS_BLTSHRINKXN; if (pFXCaps_.Contains(ddfxcaps_bltshrinky)) fDDCAPS.dwFXCaps |= DDFXCAPS_BLTSHRINKY; if (pFXCaps_.Contains(ddfxcaps_bltshrinkyn)) fDDCAPS.dwFXCaps |= DDFXCAPS_BLTSHRINKYN; if (pFXCaps_.Contains(ddfxcaps_bltstretchx)) fDDCAPS.dwFXCaps |= DDFXCAPS_BLTSTRETCHX; if (pFXCaps_.Contains(ddfxcaps_bltstretchxn)) fDDCAPS.dwFXCaps |= DDFXCAPS_BLTSTRETCHXN; if (pFXCaps_.Contains(ddfxcaps_bltstretchy)) fDDCAPS.dwFXCaps |= DDFXCAPS_BLTSTRETCHY; if (pFXCaps_.Contains(ddfxcaps_bltstretchyn)) fDDCAPS.dwFXCaps |= DDFXCAPS_BLTSTRETCHYN; if (pFXCaps_.Contains(ddfxcaps_overlayalpha)) fDDCAPS.dwFXCaps |= DDFXCAPS_OVERLAYALPHA; if (pFXCaps_.Contains(ddfxcaps_overlayarithstretchy)) fDDCAPS.dwFXCaps |= DDFXCAPS_OVERLAYARITHSTRETCHY; if (pFXCaps_.Contains(ddfxcaps_overlayarithstretchyn)) fDDCAPS.dwFXCaps |= DDFXCAPS_OVERLAYARITHSTRETCHYN; if (pFXCaps_.Contains(ddfxcaps_overlayfilter)) fDDCAPS.dwFXCaps |= DDFXCAPS_OVERLAYFILTER; if (pFXCaps_.Contains(ddfxcaps_overlaymirrorleftright)) fDDCAPS.dwFXCaps |= DDFXCAPS_OVERLAYMIRRORLEFTRIGHT; if (pFXCaps_.Contains(ddfxcaps_overlaymirrorupdown)) fDDCAPS.dwFXCaps |= DDFXCAPS_OVERLAYMIRRORUPDOWN; if (pFXCaps_.Contains(ddfxcaps_overlayshrinkx)) fDDCAPS.dwFXCaps |= DDFXCAPS_OVERLAYSHRINKX; if (pFXCaps_.Contains(ddfxcaps_overlayshrinkxn)) fDDCAPS.dwFXCaps |= DDFXCAPS_OVERLAYSHRINKXN; if (pFXCaps_.Contains(ddfxcaps_overlayshrinky)) fDDCAPS.dwFXCaps |= DDFXCAPS_OVERLAYSHRINKY; if (pFXCaps_.Contains(ddfxcaps_overlayshrinkyn)) fDDCAPS.dwFXCaps |= DDFXCAPS_OVERLAYSHRINKYN; if (pFXCaps_.Contains(ddfxcaps_overlaystretchx)) fDDCAPS.dwFXCaps |= DDFXCAPS_OVERLAYSTRETCHX; if (pFXCaps_.Contains(ddfxcaps_overlaystretchxn)) fDDCAPS.dwFXCaps |= DDFXCAPS_OVERLAYSTRETCHXN; if (pFXCaps_.Contains(ddfxcaps_overlaystretchy)) fDDCAPS.dwFXCaps |= DDFXCAPS_OVERLAYSTRETCHY; if (pFXCaps_.Contains(ddfxcaps_overlaystretchyn)) fDDCAPS.dwFXCaps |= DDFXCAPS_OVERLAYSTRETCHYN; } // -------------------------------------------------------------------------- // Method: FGetFXCaps_Strings() // This method creates and then returns a TStringList containing // the current set of 'FXCaps' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDDCaps::FGetFXCaps_Strings() { // if the strings have not been allocated if (fFXCaps_Strings==NULL) { // attempt to allocate the strings fFXCaps_Strings = new TStringList(); // if the allocation failed if (fFXCaps_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetFXCaps_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various FXCaps_Strings" ); return NULL; } } fFXCaps_Strings->Clear(); if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTALPHA) fFXCaps_Strings->Add("DDFXCAPS_BLTALPHA"); if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTARITHSTRETCHY) fFXCaps_Strings->Add("DDFXCAPS_BLTARITHSTRETCHY"); if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTARITHSTRETCHYN) fFXCaps_Strings->Add("DDFXCAPS_BLTARITHSTRETCHYN"); if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTFILTER) fFXCaps_Strings->Add("DDFXCAPS_BLTFILTER"); if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTMIRRORLEFTRIGHT) fFXCaps_Strings->Add("DDFXCAPS_BLTMIRRORLEFTRIGHT"); if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTMIRRORUPDOWN) fFXCaps_Strings->Add("DDFXCAPS_BLTMIRRORUPDOWN"); if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTROTATION) fFXCaps_Strings->Add("DDFXCAPS_BLTROTATION"); if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTROTATION90) fFXCaps_Strings->Add("DDFXCAPS_BLTROTATION90"); if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTSHRINKX) fFXCaps_Strings->Add("DDFXCAPS_BLTSHRINKX"); if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTSHRINKXN) fFXCaps_Strings->Add("DDFXCAPS_BLTSHRINKXN"); if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTSHRINKY) fFXCaps_Strings->Add("DDFXCAPS_BLTSHRINKY"); if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTSHRINKYN) fFXCaps_Strings->Add("DDFXCAPS_BLTSHRINKYN"); if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTSTRETCHX) fFXCaps_Strings->Add("DDFXCAPS_BLTSTRETCHX"); if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTSTRETCHXN) fFXCaps_Strings->Add("DDFXCAPS_BLTSTRETCHXN"); if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTSTRETCHY) fFXCaps_Strings->Add("DDFXCAPS_BLTSTRETCHY"); if (fDDCAPS.dwFXCaps & DDFXCAPS_BLTSTRETCHYN) fFXCaps_Strings->Add("DDFXCAPS_BLTSTRETCHYN"); if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYALPHA) fFXCaps_Strings->Add("DDFXCAPS_OVERLAYALPHA"); if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYARITHSTRETCHY) fFXCaps_Strings->Add("DDFXCAPS_OVERLAYARITHSTRETCHY"); if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYARITHSTRETCHYN) fFXCaps_Strings->Add("DDFXCAPS_OVERLAYARITHSTRETCHYN"); if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYFILTER) fFXCaps_Strings->Add("DDFXCAPS_OVERLAYFILTER"); if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYMIRRORLEFTRIGHT) fFXCaps_Strings->Add("DDFXCAPS_OVERLAYMIRRORLEFTRIGHT"); if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYMIRRORUPDOWN) fFXCaps_Strings->Add("DDFXCAPS_OVERLAYMIRRORUPDOWN"); if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYSHRINKX) fFXCaps_Strings->Add("DDFXCAPS_OVERLAYSHRINKX"); if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYSHRINKXN) fFXCaps_Strings->Add("DDFXCAPS_OVERLAYSHRINKXN"); if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYSHRINKY) fFXCaps_Strings->Add("DDFXCAPS_OVERLAYSHRINKY"); if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYSHRINKYN) fFXCaps_Strings->Add("DDFXCAPS_OVERLAYSHRINKYN"); if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYSTRETCHX) fFXCaps_Strings->Add("DDFXCAPS_OVERLAYSTRETCHX"); if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYSTRETCHXN) fFXCaps_Strings->Add("DDFXCAPS_OVERLAYSTRETCHXN"); if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYSTRETCHY) fFXCaps_Strings->Add("DDFXCAPS_OVERLAYSTRETCHY"); if (fDDCAPS.dwFXCaps & DDFXCAPS_OVERLAYSTRETCHYN) fFXCaps_Strings->Add("DDFXCAPS_OVERLAYSTRETCHYN"); return fFXCaps_Strings; } // -------------------------------------------------------------------------- // Method: FGetNLVBCKeyCaps_ // Description: This method returns a TDDCaps_NLVBCKeyCaps_Set<> of the flags // in the current fDDCAPS.dwNLVBCKeyCaps. // Note: Wrapper components use the following method to modify flags // via the BCB Object Inspector. // -------------------------------------------------------------------------- TDDCaps_CKeyCaps_Set __fastcall TDDCaps::FGetNLVBCKeyCaps_() { TDDCaps_CKeyCaps_Set TempNLVBCKeyCaps_; TempNLVBCKeyCaps_.Clear(); if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_DESTBLT) TempNLVBCKeyCaps_ = TempNLVBCKeyCaps_ << ddckeycaps_destblt; if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_DESTBLTCLRSPACE) TempNLVBCKeyCaps_ = TempNLVBCKeyCaps_ << ddckeycaps_destbltclrspace; if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_DESTBLTCLRSPACEYUV) TempNLVBCKeyCaps_ = TempNLVBCKeyCaps_ << ddckeycaps_destbltclrspaceyuv; if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_DESTBLTYUV) TempNLVBCKeyCaps_ = TempNLVBCKeyCaps_ << ddckeycaps_destbltyuv; if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_DESTOVERLAY) TempNLVBCKeyCaps_ = TempNLVBCKeyCaps_ << ddckeycaps_destoverlay; if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_DESTOVERLAYCLRSPACE) TempNLVBCKeyCaps_ = TempNLVBCKeyCaps_ << ddckeycaps_destoverlayclrspace; if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV) TempNLVBCKeyCaps_ = TempNLVBCKeyCaps_ << ddckeycaps_destoverlayclrspaceyuv; if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_DESTOVERLAYONEACTIVE) TempNLVBCKeyCaps_ = TempNLVBCKeyCaps_ << ddckeycaps_destoverlayoneactive; if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_DESTOVERLAYYUV) TempNLVBCKeyCaps_ = TempNLVBCKeyCaps_ << ddckeycaps_destoverlayyuv; if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_NOCOSTOVERLAY) TempNLVBCKeyCaps_ = TempNLVBCKeyCaps_ << ddckeycaps_nocostoverlay; if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_SRCBLT) TempNLVBCKeyCaps_ = TempNLVBCKeyCaps_ << ddckeycaps_srcblt; if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_SRCBLTCLRSPACE) TempNLVBCKeyCaps_ = TempNLVBCKeyCaps_ << ddckeycaps_srcbltclrspace; if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_SRCBLTCLRSPACEYUV) TempNLVBCKeyCaps_ = TempNLVBCKeyCaps_ << ddckeycaps_srcbltclrspaceyuv; if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_SRCBLTYUV) TempNLVBCKeyCaps_ = TempNLVBCKeyCaps_ << ddckeycaps_srcbltyuv; if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_SRCOVERLAY) TempNLVBCKeyCaps_ = TempNLVBCKeyCaps_ << ddckeycaps_srcoverlay; if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_SRCOVERLAYCLRSPACE) TempNLVBCKeyCaps_ = TempNLVBCKeyCaps_ << ddckeycaps_srcoverlayclrspace; if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV) TempNLVBCKeyCaps_ = TempNLVBCKeyCaps_ << ddckeycaps_srcoverlayclrspaceyuv; if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_SRCOVERLAYONEACTIVE) TempNLVBCKeyCaps_ = TempNLVBCKeyCaps_ << ddckeycaps_srcoverlayoneactive; if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_SRCOVERLAYYUV) TempNLVBCKeyCaps_ = TempNLVBCKeyCaps_ << ddckeycaps_srcoverlayyuv; return TempNLVBCKeyCaps_; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetNLVBCKeyCaps_( TDDCaps_CKeyCaps_Set pNLVBCKeyCaps_ ) { fDDCAPS.dwNLVBCKeyCaps = 0; if (pNLVBCKeyCaps_.Contains(ddckeycaps_destblt)) fDDCAPS.dwNLVBCKeyCaps |= DDCKEYCAPS_DESTBLT; if (pNLVBCKeyCaps_.Contains(ddckeycaps_destbltclrspace)) fDDCAPS.dwNLVBCKeyCaps |= DDCKEYCAPS_DESTBLTCLRSPACE; if (pNLVBCKeyCaps_.Contains(ddckeycaps_destbltclrspaceyuv)) fDDCAPS.dwNLVBCKeyCaps |= DDCKEYCAPS_DESTBLTCLRSPACEYUV; if (pNLVBCKeyCaps_.Contains(ddckeycaps_destbltyuv)) fDDCAPS.dwNLVBCKeyCaps |= DDCKEYCAPS_DESTBLTYUV; if (pNLVBCKeyCaps_.Contains(ddckeycaps_destoverlay)) fDDCAPS.dwNLVBCKeyCaps |= DDCKEYCAPS_DESTOVERLAY; if (pNLVBCKeyCaps_.Contains(ddckeycaps_destoverlayclrspace)) fDDCAPS.dwNLVBCKeyCaps |= DDCKEYCAPS_DESTOVERLAYCLRSPACE; if (pNLVBCKeyCaps_.Contains(ddckeycaps_destoverlayclrspaceyuv)) fDDCAPS.dwNLVBCKeyCaps |= DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV; if (pNLVBCKeyCaps_.Contains(ddckeycaps_destoverlayoneactive)) fDDCAPS.dwNLVBCKeyCaps |= DDCKEYCAPS_DESTOVERLAYONEACTIVE; if (pNLVBCKeyCaps_.Contains(ddckeycaps_destoverlayyuv)) fDDCAPS.dwNLVBCKeyCaps |= DDCKEYCAPS_DESTOVERLAYYUV; if (pNLVBCKeyCaps_.Contains(ddckeycaps_nocostoverlay)) fDDCAPS.dwNLVBCKeyCaps |= DDCKEYCAPS_NOCOSTOVERLAY; if (pNLVBCKeyCaps_.Contains(ddckeycaps_srcblt)) fDDCAPS.dwNLVBCKeyCaps |= DDCKEYCAPS_SRCBLT; if (pNLVBCKeyCaps_.Contains(ddckeycaps_srcbltclrspace)) fDDCAPS.dwNLVBCKeyCaps |= DDCKEYCAPS_SRCBLTCLRSPACE; if (pNLVBCKeyCaps_.Contains(ddckeycaps_srcbltclrspaceyuv)) fDDCAPS.dwNLVBCKeyCaps |= DDCKEYCAPS_SRCBLTCLRSPACEYUV; if (pNLVBCKeyCaps_.Contains(ddckeycaps_srcbltyuv)) fDDCAPS.dwNLVBCKeyCaps |= DDCKEYCAPS_SRCBLTYUV; if (pNLVBCKeyCaps_.Contains(ddckeycaps_srcoverlay)) fDDCAPS.dwNLVBCKeyCaps |= DDCKEYCAPS_SRCOVERLAY; if (pNLVBCKeyCaps_.Contains(ddckeycaps_srcoverlayclrspace)) fDDCAPS.dwNLVBCKeyCaps |= DDCKEYCAPS_SRCOVERLAYCLRSPACE; if (pNLVBCKeyCaps_.Contains(ddckeycaps_srcoverlayclrspaceyuv)) fDDCAPS.dwNLVBCKeyCaps |= DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV; if (pNLVBCKeyCaps_.Contains(ddckeycaps_srcoverlayoneactive)) fDDCAPS.dwNLVBCKeyCaps |= DDCKEYCAPS_SRCOVERLAYONEACTIVE; if (pNLVBCKeyCaps_.Contains(ddckeycaps_srcoverlayyuv)) fDDCAPS.dwNLVBCKeyCaps |= DDCKEYCAPS_SRCOVERLAYYUV; } // -------------------------------------------------------------------------- // Method: FGetNLVBCKeyCaps_Strings() // This method creates and then returns a TStringList containing // the current set of 'NLVBCKeyCaps' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDDCaps::FGetNLVBCKeyCaps_Strings() { // if the strings have not been allocated if (fNLVBCKeyCaps_Strings==NULL) { // attempt to allocate the strings fNLVBCKeyCaps_Strings = new TStringList(); // if the allocation failed if (fNLVBCKeyCaps_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetNLVBCKeyCaps_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various NLVBCKeyCaps_Strings" ); return NULL; } } fNLVBCKeyCaps_Strings->Clear(); if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_DESTBLT) fNLVBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTBLT"); if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_DESTBLTCLRSPACE) fNLVBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTBLTCLRSPACE"); if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_DESTBLTCLRSPACEYUV) fNLVBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTBLTCLRSPACEYUV"); if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_DESTBLTYUV) fNLVBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTBLTYUV"); if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_DESTOVERLAY) fNLVBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAY"); if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_DESTOVERLAYCLRSPACE) fNLVBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAYCLRSPACE"); if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV) fNLVBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV"); if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_DESTOVERLAYONEACTIVE) fNLVBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAYONEACTIVE"); if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_DESTOVERLAYYUV) fNLVBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAYYUV"); if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_NOCOSTOVERLAY) fNLVBCKeyCaps_Strings->Add("DDCKEYCAPS_NOCOSTOVERLAY"); if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_SRCBLT) fNLVBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCBLT"); if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_SRCBLTCLRSPACE) fNLVBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCBLTCLRSPACE"); if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_SRCBLTCLRSPACEYUV) fNLVBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCBLTCLRSPACEYUV"); if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_SRCBLTYUV) fNLVBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCBLTYUV"); if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_SRCOVERLAY) fNLVBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAY"); if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_SRCOVERLAYCLRSPACE) fNLVBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAYCLRSPACE"); if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV) fNLVBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV"); if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_SRCOVERLAYONEACTIVE) fNLVBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAYONEACTIVE"); if (fDDCAPS.dwNLVBCKeyCaps & DDCKEYCAPS_SRCOVERLAYYUV) fNLVBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAYYUV"); return fNLVBCKeyCaps_Strings; } // -------------------------------------------------------------------------- // Method: FGetNLVBCaps_ // Description: This method returns a TDDCaps_NLVBCaps_Set<> of the flags in // the current fDDCAPS.dwNLVBCaps. // Note: Wrapper components use the following method to modify flags // via the BCB Object Inspector. // -------------------------------------------------------------------------- TDDCaps_Caps_Set __fastcall TDDCaps::FGetNLVBCaps_() { TDDCaps_Caps_Set TempNLVBCaps_; TempNLVBCaps_.Clear(); if (fDDCAPS.dwNLVBCaps & DDCAPS_3D) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_3d; if (fDDCAPS.dwNLVBCaps & DDCAPS_ALIGNBOUNDARYDEST) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_alignboundarydest; if (fDDCAPS.dwNLVBCaps & DDCAPS_ALIGNBOUNDARYSRC) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_alignboundarysrc; if (fDDCAPS.dwNLVBCaps & DDCAPS_ALIGNSIZEDEST) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_alignsizedest; if (fDDCAPS.dwNLVBCaps & DDCAPS_ALIGNSIZESRC) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_alignsizesrc; if (fDDCAPS.dwNLVBCaps & DDCAPS_ALIGNSTRIDE) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_alignstride; if (fDDCAPS.dwNLVBCaps & DDCAPS_ALPHA) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_alpha; if (fDDCAPS.dwNLVBCaps & DDCAPS_BANKSWITCHED) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_bankswitched; if (fDDCAPS.dwNLVBCaps & DDCAPS_BLT) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_blt; if (fDDCAPS.dwNLVBCaps & DDCAPS_BLTCOLORFILL) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_bltcolorfill; if (fDDCAPS.dwNLVBCaps & DDCAPS_BLTDEPTHFILL) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_bltdepthfill; if (fDDCAPS.dwNLVBCaps & DDCAPS_BLTFOURCC) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_bltfourcc; if (fDDCAPS.dwNLVBCaps & DDCAPS_BLTQUEUE) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_bltqueue; if (fDDCAPS.dwNLVBCaps & DDCAPS_BLTSTRETCH) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_bltstretch; if (fDDCAPS.dwNLVBCaps & DDCAPS_CANBLTSYSMEM) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_canbltsysmem; if (fDDCAPS.dwNLVBCaps & DDCAPS_CANCLIP) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_canclip; if (fDDCAPS.dwNLVBCaps & DDCAPS_CANCLIPSTRETCHED) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_canclipstretched; if (fDDCAPS.dwNLVBCaps & DDCAPS_COLORKEY) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_colorkey; if (fDDCAPS.dwNLVBCaps & DDCAPS_COLORKEYHWASSIST) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_colorkeyhwassist; if (fDDCAPS.dwNLVBCaps & DDCAPS_GDI) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_gdi; if (fDDCAPS.dwNLVBCaps & DDCAPS_NOHARDWARE) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_nohardware; if (fDDCAPS.dwNLVBCaps & DDCAPS_OVERLAY) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_overlay; if (fDDCAPS.dwNLVBCaps & DDCAPS_OVERLAYCANTCLIP) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_overlaycantclip; if (fDDCAPS.dwNLVBCaps & DDCAPS_OVERLAYFOURCC) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_overlayfourcc; if (fDDCAPS.dwNLVBCaps & DDCAPS_OVERLAYSTRETCH) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_overlaystretch; if (fDDCAPS.dwNLVBCaps & DDCAPS_PALETTE) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_palette; if (fDDCAPS.dwNLVBCaps & DDCAPS_PALETTEVSYNC) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_palettevsync; if (fDDCAPS.dwNLVBCaps & DDCAPS_READSCANLINE) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_readscanline; if (fDDCAPS.dwNLVBCaps & DDCAPS_VBI) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_vbi; if (fDDCAPS.dwNLVBCaps & DDCAPS_ZBLTS) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_zblts; if (fDDCAPS.dwNLVBCaps & DDCAPS_ZOVERLAYS) TempNLVBCaps_ = TempNLVBCaps_ << ddcaps_zoverlays; return TempNLVBCaps_; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetNLVBCaps_( TDDCaps_Caps_Set pNLVBCaps_ ) { fDDCAPS.dwNLVBCaps = 0; if (pNLVBCaps_.Contains(ddcaps_3d)) fDDCAPS.dwNLVBCaps |= DDCAPS_3D; if (pNLVBCaps_.Contains(ddcaps_alignboundarydest)) fDDCAPS.dwNLVBCaps |= DDCAPS_ALIGNBOUNDARYDEST; if (pNLVBCaps_.Contains(ddcaps_alignboundarysrc)) fDDCAPS.dwNLVBCaps |= DDCAPS_ALIGNBOUNDARYSRC; if (pNLVBCaps_.Contains(ddcaps_alignsizedest)) fDDCAPS.dwNLVBCaps |= DDCAPS_ALIGNSIZEDEST; if (pNLVBCaps_.Contains(ddcaps_alignsizesrc)) fDDCAPS.dwNLVBCaps |= DDCAPS_ALIGNSIZESRC; if (pNLVBCaps_.Contains(ddcaps_alignstride)) fDDCAPS.dwNLVBCaps |= DDCAPS_ALIGNSTRIDE; if (pNLVBCaps_.Contains(ddcaps_alpha)) fDDCAPS.dwNLVBCaps |= DDCAPS_ALPHA; if (pNLVBCaps_.Contains(ddcaps_bankswitched)) fDDCAPS.dwNLVBCaps |= DDCAPS_BANKSWITCHED; if (pNLVBCaps_.Contains(ddcaps_blt)) fDDCAPS.dwNLVBCaps |= DDCAPS_BLT; if (pNLVBCaps_.Contains(ddcaps_bltcolorfill)) fDDCAPS.dwNLVBCaps |= DDCAPS_BLTCOLORFILL; if (pNLVBCaps_.Contains(ddcaps_bltdepthfill)) fDDCAPS.dwNLVBCaps |= DDCAPS_BLTDEPTHFILL; if (pNLVBCaps_.Contains(ddcaps_bltfourcc)) fDDCAPS.dwNLVBCaps |= DDCAPS_BLTFOURCC; if (pNLVBCaps_.Contains(ddcaps_bltqueue)) fDDCAPS.dwNLVBCaps |= DDCAPS_BLTQUEUE; if (pNLVBCaps_.Contains(ddcaps_bltstretch)) fDDCAPS.dwNLVBCaps |= DDCAPS_BLTSTRETCH; if (pNLVBCaps_.Contains(ddcaps_canbltsysmem)) fDDCAPS.dwNLVBCaps |= DDCAPS_CANBLTSYSMEM; if (pNLVBCaps_.Contains(ddcaps_canclip)) fDDCAPS.dwNLVBCaps |= DDCAPS_CANCLIP; if (pNLVBCaps_.Contains(ddcaps_canclipstretched)) fDDCAPS.dwNLVBCaps |= DDCAPS_CANCLIPSTRETCHED; if (pNLVBCaps_.Contains(ddcaps_colorkey)) fDDCAPS.dwNLVBCaps |= DDCAPS_COLORKEY; if (pNLVBCaps_.Contains(ddcaps_colorkeyhwassist)) fDDCAPS.dwNLVBCaps |= DDCAPS_COLORKEYHWASSIST; if (pNLVBCaps_.Contains(ddcaps_gdi)) fDDCAPS.dwNLVBCaps |= DDCAPS_GDI; if (pNLVBCaps_.Contains(ddcaps_nohardware)) fDDCAPS.dwNLVBCaps |= DDCAPS_NOHARDWARE; if (pNLVBCaps_.Contains(ddcaps_overlay)) fDDCAPS.dwNLVBCaps |= DDCAPS_OVERLAY; if (pNLVBCaps_.Contains(ddcaps_overlaycantclip)) fDDCAPS.dwNLVBCaps |= DDCAPS_OVERLAYCANTCLIP; if (pNLVBCaps_.Contains(ddcaps_overlayfourcc)) fDDCAPS.dwNLVBCaps |= DDCAPS_OVERLAYFOURCC; if (pNLVBCaps_.Contains(ddcaps_overlaystretch)) fDDCAPS.dwNLVBCaps |= DDCAPS_OVERLAYSTRETCH; if (pNLVBCaps_.Contains(ddcaps_palette)) fDDCAPS.dwNLVBCaps |= DDCAPS_PALETTE; if (pNLVBCaps_.Contains(ddcaps_palettevsync)) fDDCAPS.dwNLVBCaps |= DDCAPS_PALETTEVSYNC; if (pNLVBCaps_.Contains(ddcaps_readscanline)) fDDCAPS.dwNLVBCaps |= DDCAPS_READSCANLINE; if (pNLVBCaps_.Contains(ddcaps_vbi)) fDDCAPS.dwNLVBCaps |= DDCAPS_VBI; if (pNLVBCaps_.Contains(ddcaps_zblts)) fDDCAPS.dwNLVBCaps |= DDCAPS_ZBLTS; if (pNLVBCaps_.Contains(ddcaps_zoverlays)) fDDCAPS.dwNLVBCaps |= DDCAPS_ZOVERLAYS; } // -------------------------------------------------------------------------- // Method: FGetNLVBCaps_Strings() // This method creates and then returns a TStringList containing // the current set of 'NLVBCaps' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDDCaps::FGetNLVBCaps_Strings() { // if the strings have not been allocated if (fNLVBCaps_Strings==NULL) { // attempt to allocate the strings fNLVBCaps_Strings = new TStringList(); // if the allocation failed if (fNLVBCaps_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetNLVBCaps_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various NLVBCaps_Strings" ); return NULL; } } fNLVBCaps_Strings->Clear(); if (fDDCAPS.dwNLVBCaps & DDCAPS_3D) fNLVBCaps_Strings->Add("DDCAPS_3D"); if (fDDCAPS.dwNLVBCaps & DDCAPS_ALIGNBOUNDARYDEST) fNLVBCaps_Strings->Add("DDCAPS_ALIGNBOUNDARYDEST"); if (fDDCAPS.dwNLVBCaps & DDCAPS_ALIGNBOUNDARYSRC) fNLVBCaps_Strings->Add("DDCAPS_ALIGNBOUNDARYSRC"); if (fDDCAPS.dwNLVBCaps & DDCAPS_ALIGNSIZEDEST) fNLVBCaps_Strings->Add("DDCAPS_ALIGNSIZEDEST"); if (fDDCAPS.dwNLVBCaps & DDCAPS_ALIGNSIZESRC) fNLVBCaps_Strings->Add("DDCAPS_ALIGNSIZESRC"); if (fDDCAPS.dwNLVBCaps & DDCAPS_ALIGNSTRIDE) fNLVBCaps_Strings->Add("DDCAPS_ALIGNSTRIDE"); if (fDDCAPS.dwNLVBCaps & DDCAPS_ALPHA) fNLVBCaps_Strings->Add("DDCAPS_ALPHA"); if (fDDCAPS.dwNLVBCaps & DDCAPS_BANKSWITCHED) fNLVBCaps_Strings->Add("DDCAPS_BANKSWITCHED"); if (fDDCAPS.dwNLVBCaps & DDCAPS_BLT) fNLVBCaps_Strings->Add("DDCAPS_BLT"); if (fDDCAPS.dwNLVBCaps & DDCAPS_BLTCOLORFILL) fNLVBCaps_Strings->Add("DDCAPS_BLTCOLORFILL"); if (fDDCAPS.dwNLVBCaps & DDCAPS_BLTDEPTHFILL) fNLVBCaps_Strings->Add("DDCAPS_BLTDEPTHFILL"); if (fDDCAPS.dwNLVBCaps & DDCAPS_BLTFOURCC) fNLVBCaps_Strings->Add("DDCAPS_BLTFOURCC"); if (fDDCAPS.dwNLVBCaps & DDCAPS_BLTQUEUE) fNLVBCaps_Strings->Add("DDCAPS_BLTQUEUE"); if (fDDCAPS.dwNLVBCaps & DDCAPS_BLTSTRETCH) fNLVBCaps_Strings->Add("DDCAPS_BLTSTRETCH"); if (fDDCAPS.dwNLVBCaps & DDCAPS_CANBLTSYSMEM) fNLVBCaps_Strings->Add("DDCAPS_CANBLTSYSMEM"); if (fDDCAPS.dwNLVBCaps & DDCAPS_CANCLIP) fNLVBCaps_Strings->Add("DDCAPS_CANCLIP"); if (fDDCAPS.dwNLVBCaps & DDCAPS_CANCLIPSTRETCHED) fNLVBCaps_Strings->Add("DDCAPS_CANCLIPSTRETCHED"); if (fDDCAPS.dwNLVBCaps & DDCAPS_COLORKEY) fNLVBCaps_Strings->Add("DDCAPS_COLORKEY"); if (fDDCAPS.dwNLVBCaps & DDCAPS_COLORKEYHWASSIST) fNLVBCaps_Strings->Add("DDCAPS_COLORKEYHWASSIST"); if (fDDCAPS.dwNLVBCaps & DDCAPS_GDI) fNLVBCaps_Strings->Add("DDCAPS_GDI"); if (fDDCAPS.dwNLVBCaps & DDCAPS_NOHARDWARE) fNLVBCaps_Strings->Add("DDCAPS_NOHARDWARE"); if (fDDCAPS.dwNLVBCaps & DDCAPS_OVERLAY) fNLVBCaps_Strings->Add("DDCAPS_OVERLAY"); if (fDDCAPS.dwNLVBCaps & DDCAPS_OVERLAYCANTCLIP) fNLVBCaps_Strings->Add("DDCAPS_OVERLAYCANTCLIP"); if (fDDCAPS.dwNLVBCaps & DDCAPS_OVERLAYFOURCC) fNLVBCaps_Strings->Add("DDCAPS_OVERLAYFOURCC"); if (fDDCAPS.dwNLVBCaps & DDCAPS_OVERLAYSTRETCH) fNLVBCaps_Strings->Add("DDCAPS_OVERLAYSTRETCH"); if (fDDCAPS.dwNLVBCaps & DDCAPS_PALETTE) fNLVBCaps_Strings->Add("DDCAPS_PALETTE"); if (fDDCAPS.dwNLVBCaps & DDCAPS_PALETTEVSYNC) fNLVBCaps_Strings->Add("DDCAPS_PALETTEVSYNC"); if (fDDCAPS.dwNLVBCaps & DDCAPS_READSCANLINE) fNLVBCaps_Strings->Add("DDCAPS_READSCANLINE"); if (fDDCAPS.dwNLVBCaps & DDCAPS_VBI) fNLVBCaps_Strings->Add("DDCAPS_VBI"); if (fDDCAPS.dwNLVBCaps & DDCAPS_ZBLTS) fNLVBCaps_Strings->Add("DDCAPS_ZBLTS"); if (fDDCAPS.dwNLVBCaps & DDCAPS_ZOVERLAYS) fNLVBCaps_Strings->Add("DDCAPS_ZOVERLAYS"); return fNLVBCaps_Strings; } // -------------------------------------------------------------------------- // Method: FGetNLVBCaps2_ // Description: This method returns a TDDCaps_NLVBCaps2_Set<> of the flags in // the current fDDCAPS.dwNLVBCaps2. // Note: Wrapper components use the following method to modify flags // via the BCB Object Inspector. // -------------------------------------------------------------------------- TDDCaps_Caps2_Set __fastcall TDDCaps::FGetNLVBCaps2_() { TDDCaps_Caps2_Set TempNLVBCaps2_; TempNLVBCaps2_.Clear(); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_AUTOFLIPOVERLAY) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_autoflipoverlay; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_CANBOBHARDWARE) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_canbobhardware; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_CANBOBINTERLEAVED) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_canbobinterleaved; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_CANBOBNONINTERLEAVED) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_canbobnoninterleaved; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_CANCALIBRATEGAMMA) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_cancalibrategamma; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_CANDROPZ16BIT) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_candropz16bit; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_CANFLIPODDEVEN) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_canflipoddeven; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_CANMANAGETEXTURE) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_canmanagetexture; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_CANRENDERWINDOWED) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_canrenderwindowed; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_CERTIFIED) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_certified; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_COLORCONTROLOVERLAY) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_colorcontroloverlay; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_COLORCONTROLPRIMARY) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_colorcontrolprimary; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_COPYFOURCC) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_copyfourcc; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_FLIPINTERVAL) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_flipinterval; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_FLIPNOVSYNC) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_flipnovsync; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_NO2DDURING3DSCENE) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_no2dduring3dscene; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_NONLOCALVIDMEM) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_nonlocalvidmem; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_NONLOCALVIDMEMCAPS) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_nonlocalvidmemcaps; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_NOPAGELOCKREQUIRED) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_nopagelockrequired; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_PRIMARYGAMMA) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_primarygamma; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_STEREO) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_stereo; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_TEXMANINNONLOCALVIDMEM) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_texmaninnonlocalvidmem; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_VIDEOPORT) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_videoport; if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_WIDESURFACES) TempNLVBCaps2_ = TempNLVBCaps2_ << ddcaps2_widesurfaces; return TempNLVBCaps2_; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetNLVBCaps2_( TDDCaps_Caps2_Set pNLVBCaps2_ ) { fDDCAPS.dwNLVBCaps2 = 0; if (pNLVBCaps2_.Contains(ddcaps2_autoflipoverlay)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_AUTOFLIPOVERLAY; if (pNLVBCaps2_.Contains(ddcaps2_canbobhardware)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_CANBOBHARDWARE; if (pNLVBCaps2_.Contains(ddcaps2_canbobinterleaved)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_CANBOBINTERLEAVED; if (pNLVBCaps2_.Contains(ddcaps2_canbobnoninterleaved)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_CANBOBNONINTERLEAVED; if (pNLVBCaps2_.Contains(ddcaps2_cancalibrategamma)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_CANCALIBRATEGAMMA; if (pNLVBCaps2_.Contains(ddcaps2_candropz16bit)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_CANDROPZ16BIT; if (pNLVBCaps2_.Contains(ddcaps2_canflipoddeven)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_CANFLIPODDEVEN; if (pNLVBCaps2_.Contains(ddcaps2_canmanagetexture)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_CANMANAGETEXTURE; if (pNLVBCaps2_.Contains(ddcaps2_canrenderwindowed)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_CANRENDERWINDOWED; if (pNLVBCaps2_.Contains(ddcaps2_certified)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_CERTIFIED; if (pNLVBCaps2_.Contains(ddcaps2_colorcontroloverlay)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_COLORCONTROLOVERLAY; if (pNLVBCaps2_.Contains(ddcaps2_colorcontrolprimary)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_COLORCONTROLPRIMARY; if (pNLVBCaps2_.Contains(ddcaps2_copyfourcc)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_COPYFOURCC; if (pNLVBCaps2_.Contains(ddcaps2_flipinterval)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_FLIPINTERVAL; if (pNLVBCaps2_.Contains(ddcaps2_flipnovsync)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_FLIPNOVSYNC; if (pNLVBCaps2_.Contains(ddcaps2_no2dduring3dscene)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_NO2DDURING3DSCENE; if (pNLVBCaps2_.Contains(ddcaps2_nonlocalvidmem)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_NONLOCALVIDMEM; if (pNLVBCaps2_.Contains(ddcaps2_nonlocalvidmemcaps)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_NONLOCALVIDMEMCAPS; if (pNLVBCaps2_.Contains(ddcaps2_nopagelockrequired)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_NOPAGELOCKREQUIRED; if (pNLVBCaps2_.Contains(ddcaps2_primarygamma)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_PRIMARYGAMMA; if (pNLVBCaps2_.Contains(ddcaps2_stereo)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_STEREO; if (pNLVBCaps2_.Contains(ddcaps2_texmaninnonlocalvidmem)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_TEXMANINNONLOCALVIDMEM; if (pNLVBCaps2_.Contains(ddcaps2_videoport)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_VIDEOPORT; if (pNLVBCaps2_.Contains(ddcaps2_widesurfaces)) fDDCAPS.dwNLVBCaps2 |= DDCAPS2_WIDESURFACES; } // -------------------------------------------------------------------------- // Method: FGetNLVBCaps2_Strings() // This method creates and then returns a TStringList containing // the current set of 'NLVBCaps2' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDDCaps::FGetNLVBCaps2_Strings() { // if the strings have not been allocated if (fNLVBCaps2_Strings==NULL) { // attempt to allocate the strings fNLVBCaps2_Strings = new TStringList(); // if the allocation failed if (fNLVBCaps2_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetNLVBCaps2_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various NLVBCaps2_Strings" ); return NULL; } } fNLVBCaps2_Strings->Clear(); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_AUTOFLIPOVERLAY) fNLVBCaps2_Strings->Add("DDCAPS2_AUTOFLIPOVERLAY"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_CANBOBHARDWARE) fNLVBCaps2_Strings->Add("DDCAPS2_CANBOBHARDWARE"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_CANBOBINTERLEAVED) fNLVBCaps2_Strings->Add("DDCAPS2_CANBOBINTERLEAVED"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_CANBOBNONINTERLEAVED) fNLVBCaps2_Strings->Add("DDCAPS2_CANBOBNONINTERLEAVED"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_CANCALIBRATEGAMMA) fNLVBCaps2_Strings->Add("DDCAPS2_CANCALIBRATEGAMMA"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_CANDROPZ16BIT) fNLVBCaps2_Strings->Add("DDCAPS2_CANDROPZ16BIT"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_CANFLIPODDEVEN) fNLVBCaps2_Strings->Add("DDCAPS2_CANFLIPODDEVEN"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_CANMANAGETEXTURE) fNLVBCaps2_Strings->Add("DDCAPS2_CANMANAGETEXTURE"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_CANRENDERWINDOWED) fNLVBCaps2_Strings->Add("DDCAPS2_CANRENDERWINDOWED"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_CERTIFIED) fNLVBCaps2_Strings->Add("DDCAPS2_CERTIFIED"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_COLORCONTROLOVERLAY) fNLVBCaps2_Strings->Add("DDCAPS2_COLORCONTROLOVERLAY"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_COLORCONTROLPRIMARY) fNLVBCaps2_Strings->Add("DDCAPS2_COLORCONTROLPRIMARY"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_COPYFOURCC) fNLVBCaps2_Strings->Add("DDCAPS2_COPYFOURCC"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_FLIPINTERVAL) fNLVBCaps2_Strings->Add("DDCAPS2_FLIPINTERVAL"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_FLIPNOVSYNC) fNLVBCaps2_Strings->Add("DDCAPS2_FLIPNOVSYNC"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_NO2DDURING3DSCENE) fNLVBCaps2_Strings->Add("DDCAPS2_NO2DDURING3DSCENE"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_NONLOCALVIDMEM) fNLVBCaps2_Strings->Add("DDCAPS2_NONLOCALVIDMEM"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_NONLOCALVIDMEMCAPS) fNLVBCaps2_Strings->Add("DDCAPS2_NONLOCALVIDMEMCAPS"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_NOPAGELOCKREQUIRED) fNLVBCaps2_Strings->Add("DDCAPS2_NOPAGELOCKREQUIRED"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_PRIMARYGAMMA) fNLVBCaps2_Strings->Add("DDCAPS2_PRIMARYGAMMA"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_STEREO) fNLVBCaps2_Strings->Add("DDCAPS2_STEREO"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_TEXMANINNONLOCALVIDMEM) fNLVBCaps2_Strings->Add("DDCAPS2_TEXMANINNONLOCALVIDMEM"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_VIDEOPORT) fNLVBCaps2_Strings->Add("DDCAPS2_VIDEOPORT"); if (fDDCAPS.dwNLVBCaps2 & DDCAPS2_WIDESURFACES) fNLVBCaps2_Strings->Add("DDCAPS2_WIDESURFACES"); return fNLVBCaps2_Strings; } // -------------------------------------------------------------------------- // Method: FGetNLVBFXCaps_ // Description: This method returns a TDDCaps_NLVBFXCaps_Set<> of the flags // in the current fDDCAPS.dwNLVBFXCaps. // Note: Wrapper components use the following method to modify flags // via the BCB Object Inspector. // -------------------------------------------------------------------------- TDDCaps_FXCaps_Set __fastcall TDDCaps::FGetNLVBFXCaps_() { TDDCaps_FXCaps_Set TempNLVBFXCaps_; TempNLVBFXCaps_.Clear(); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTALPHA) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_bltalpha; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTARITHSTRETCHY) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_bltarithstretchy; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTARITHSTRETCHYN) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_bltarithstretchyn; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTFILTER) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_bltfilter; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTMIRRORLEFTRIGHT) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_bltmirrorleftright; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTMIRRORUPDOWN) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_bltmirrorupdown; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTROTATION) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_bltrotation; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTROTATION90) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_bltrotation90; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTSHRINKX) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_bltshrinkx; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTSHRINKXN) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_bltshrinkxn; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTSHRINKY) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_bltshrinky; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTSHRINKYN) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_bltshrinkyn; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTSTRETCHX) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_bltstretchx; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTSTRETCHXN) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_bltstretchxn; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTSTRETCHY) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_bltstretchy; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTSTRETCHYN) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_bltstretchyn; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYALPHA) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_overlayalpha; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYARITHSTRETCHY) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_overlayarithstretchy; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYARITHSTRETCHYN) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_overlayarithstretchyn; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYFILTER) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_overlayfilter; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYMIRRORLEFTRIGHT) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_overlaymirrorleftright; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYMIRRORUPDOWN) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_overlaymirrorupdown; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYSHRINKX) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_overlayshrinkx; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYSHRINKXN) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_overlayshrinkxn; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYSHRINKY) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_overlayshrinky; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYSHRINKYN) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_overlayshrinkyn; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYSTRETCHX) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_overlaystretchx; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYSTRETCHXN) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_overlaystretchxn; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYSTRETCHY) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_overlaystretchy; if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYSTRETCHYN) TempNLVBFXCaps_ = TempNLVBFXCaps_ << ddfxcaps_overlaystretchyn; return TempNLVBFXCaps_; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetNLVBFXCaps_( TDDCaps_FXCaps_Set pNLVBFXCaps_ ) { fDDCAPS.dwNLVBFXCaps = 0; if (pNLVBFXCaps_.Contains(ddfxcaps_bltalpha)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_BLTALPHA; if (pNLVBFXCaps_.Contains(ddfxcaps_bltarithstretchy)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_BLTARITHSTRETCHY; if (pNLVBFXCaps_.Contains(ddfxcaps_bltarithstretchyn)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_BLTARITHSTRETCHYN; if (pNLVBFXCaps_.Contains(ddfxcaps_bltfilter)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_BLTFILTER; if (pNLVBFXCaps_.Contains(ddfxcaps_bltmirrorleftright)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_BLTMIRRORLEFTRIGHT; if (pNLVBFXCaps_.Contains(ddfxcaps_bltmirrorupdown)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_BLTMIRRORUPDOWN; if (pNLVBFXCaps_.Contains(ddfxcaps_bltrotation)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_BLTROTATION; if (pNLVBFXCaps_.Contains(ddfxcaps_bltrotation90)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_BLTROTATION90; if (pNLVBFXCaps_.Contains(ddfxcaps_bltshrinkx)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_BLTSHRINKX; if (pNLVBFXCaps_.Contains(ddfxcaps_bltshrinkxn)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_BLTSHRINKXN; if (pNLVBFXCaps_.Contains(ddfxcaps_bltshrinky)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_BLTSHRINKY; if (pNLVBFXCaps_.Contains(ddfxcaps_bltshrinkyn)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_BLTSHRINKYN; if (pNLVBFXCaps_.Contains(ddfxcaps_bltstretchx)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_BLTSTRETCHX; if (pNLVBFXCaps_.Contains(ddfxcaps_bltstretchxn)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_BLTSTRETCHXN; if (pNLVBFXCaps_.Contains(ddfxcaps_bltstretchy)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_BLTSTRETCHY; if (pNLVBFXCaps_.Contains(ddfxcaps_bltstretchyn)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_BLTSTRETCHYN; if (pNLVBFXCaps_.Contains(ddfxcaps_overlayalpha)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_OVERLAYALPHA; if (pNLVBFXCaps_.Contains(ddfxcaps_overlayarithstretchy)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_OVERLAYARITHSTRETCHY; if (pNLVBFXCaps_.Contains(ddfxcaps_overlayarithstretchyn)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_OVERLAYARITHSTRETCHYN; if (pNLVBFXCaps_.Contains(ddfxcaps_overlayfilter)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_OVERLAYFILTER; if (pNLVBFXCaps_.Contains(ddfxcaps_overlaymirrorleftright)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_OVERLAYMIRRORLEFTRIGHT; if (pNLVBFXCaps_.Contains(ddfxcaps_overlaymirrorupdown)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_OVERLAYMIRRORUPDOWN; if (pNLVBFXCaps_.Contains(ddfxcaps_overlayshrinkx)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_OVERLAYSHRINKX; if (pNLVBFXCaps_.Contains(ddfxcaps_overlayshrinkxn)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_OVERLAYSHRINKXN; if (pNLVBFXCaps_.Contains(ddfxcaps_overlayshrinky)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_OVERLAYSHRINKY; if (pNLVBFXCaps_.Contains(ddfxcaps_overlayshrinkyn)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_OVERLAYSHRINKYN; if (pNLVBFXCaps_.Contains(ddfxcaps_overlaystretchx)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_OVERLAYSTRETCHX; if (pNLVBFXCaps_.Contains(ddfxcaps_overlaystretchxn)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_OVERLAYSTRETCHXN; if (pNLVBFXCaps_.Contains(ddfxcaps_overlaystretchy)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_OVERLAYSTRETCHY; if (pNLVBFXCaps_.Contains(ddfxcaps_overlaystretchyn)) fDDCAPS.dwNLVBFXCaps |= DDFXCAPS_OVERLAYSTRETCHYN; } // -------------------------------------------------------------------------- // Method: FGetNLVBFXCaps_Strings() // This method creates and then returns a TStringList containing // the current set of 'NLVBFXCaps' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDDCaps::FGetNLVBFXCaps_Strings() { // if the strings have not been allocated if (fNLVBFXCaps_Strings==NULL) { // attempt to allocate the strings fNLVBFXCaps_Strings = new TStringList(); // if the allocation failed if (fNLVBFXCaps_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetNLVBFXCaps_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various NLVBFXCaps_Strings" ); return NULL; } } fNLVBFXCaps_Strings->Clear(); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTALPHA) fNLVBFXCaps_Strings->Add("DDFXCAPS_BLTALPHA"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTARITHSTRETCHY) fNLVBFXCaps_Strings->Add("DDFXCAPS_BLTARITHSTRETCHY"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTARITHSTRETCHYN) fNLVBFXCaps_Strings->Add("DDFXCAPS_BLTARITHSTRETCHYN"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTFILTER) fNLVBFXCaps_Strings->Add("DDFXCAPS_BLTFILTER"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTMIRRORLEFTRIGHT) fNLVBFXCaps_Strings->Add("DDFXCAPS_BLTMIRRORLEFTRIGHT"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTMIRRORUPDOWN) fNLVBFXCaps_Strings->Add("DDFXCAPS_BLTMIRRORUPDOWN"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTROTATION) fNLVBFXCaps_Strings->Add("DDFXCAPS_BLTROTATION"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTROTATION90) fNLVBFXCaps_Strings->Add("DDFXCAPS_BLTROTATION90"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTSHRINKX) fNLVBFXCaps_Strings->Add("DDFXCAPS_BLTSHRINKX"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTSHRINKXN) fNLVBFXCaps_Strings->Add("DDFXCAPS_BLTSHRINKXN"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTSHRINKY) fNLVBFXCaps_Strings->Add("DDFXCAPS_BLTSHRINKY"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTSHRINKYN) fNLVBFXCaps_Strings->Add("DDFXCAPS_BLTSHRINKYN"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTSTRETCHX) fNLVBFXCaps_Strings->Add("DDFXCAPS_BLTSTRETCHX"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTSTRETCHXN) fNLVBFXCaps_Strings->Add("DDFXCAPS_BLTSTRETCHXN"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTSTRETCHY) fNLVBFXCaps_Strings->Add("DDFXCAPS_BLTSTRETCHY"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_BLTSTRETCHYN) fNLVBFXCaps_Strings->Add("DDFXCAPS_BLTSTRETCHYN"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYALPHA) fNLVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYALPHA"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYARITHSTRETCHY) fNLVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYARITHSTRETCHY"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYARITHSTRETCHYN) fNLVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYARITHSTRETCHYN"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYFILTER) fNLVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYFILTER"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYMIRRORLEFTRIGHT) fNLVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYMIRRORLEFTRIGHT"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYMIRRORUPDOWN) fNLVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYMIRRORUPDOWN"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYSHRINKX) fNLVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSHRINKX"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYSHRINKXN) fNLVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSHRINKXN"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYSHRINKY) fNLVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSHRINKY"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYSHRINKYN) fNLVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSHRINKYN"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYSTRETCHX) fNLVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSTRETCHX"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYSTRETCHXN) fNLVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSTRETCHXN"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYSTRETCHY) fNLVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSTRETCHY"); if (fDDCAPS.dwNLVBFXCaps & DDFXCAPS_OVERLAYSTRETCHYN) fNLVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSTRETCHYN"); return fNLVBFXCaps_Strings; } // -------------------------------------------------------------------------- // Method: FGetPalCaps_ // Description: This method returns a TDDCaps_PalCaps_Set<> of the flags in // the current fDDCAPS.dwPalCaps. // Note: Wrapper components use the following method to modify flags // via the BCB Object Inspector. // -------------------------------------------------------------------------- TDDCaps_PalCaps_Set __fastcall TDDCaps::FGetPalCaps_() { TDDCaps_PalCaps_Set TempPalCaps_; TempPalCaps_.Clear(); if (fDDCAPS.dwPalCaps & DDPCAPS_1BIT) TempPalCaps_ = TempPalCaps_ << ddpcaps_1bit; if (fDDCAPS.dwPalCaps & DDPCAPS_2BIT) TempPalCaps_ = TempPalCaps_ << ddpcaps_2bit; if (fDDCAPS.dwPalCaps & DDPCAPS_4BIT) TempPalCaps_ = TempPalCaps_ << ddpcaps_4bit; if (fDDCAPS.dwPalCaps & DDPCAPS_8BIT) TempPalCaps_ = TempPalCaps_ << ddpcaps_8bit; if (fDDCAPS.dwPalCaps & DDPCAPS_8BITENTRIES) TempPalCaps_ = TempPalCaps_ << ddpcaps_8bitentries; if (fDDCAPS.dwPalCaps & DDPCAPS_ALLOW256) TempPalCaps_ = TempPalCaps_ << ddpcaps_allow256; if (fDDCAPS.dwPalCaps & DDPCAPS_ALPHA) TempPalCaps_ = TempPalCaps_ << ddpcaps_alpha; if (fDDCAPS.dwPalCaps & DDPCAPS_PRIMARYSURFACE) TempPalCaps_ = TempPalCaps_ << ddpcaps_primarysurface; if (fDDCAPS.dwPalCaps & DDPCAPS_PRIMARYSURFACELEFT) TempPalCaps_ = TempPalCaps_ << ddpcaps_primarysurfaceleft; if (fDDCAPS.dwPalCaps & DDPCAPS_VSYNC) TempPalCaps_ = TempPalCaps_ << ddpcaps_vsync; return TempPalCaps_; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetPalCaps_( TDDCaps_PalCaps_Set pPalCaps_ ) { fDDCAPS.dwPalCaps = 0; if (pPalCaps_.Contains(ddpcaps_1bit)) fDDCAPS.dwPalCaps |= DDPCAPS_1BIT; if (pPalCaps_.Contains(ddpcaps_2bit)) fDDCAPS.dwPalCaps |= DDPCAPS_2BIT; if (pPalCaps_.Contains(ddpcaps_4bit)) fDDCAPS.dwPalCaps |= DDPCAPS_4BIT; if (pPalCaps_.Contains(ddpcaps_8bit)) fDDCAPS.dwPalCaps |= DDPCAPS_8BIT; if (pPalCaps_.Contains(ddpcaps_8bitentries)) fDDCAPS.dwPalCaps |= DDPCAPS_8BITENTRIES; if (pPalCaps_.Contains(ddpcaps_allow256)) fDDCAPS.dwPalCaps |= DDPCAPS_ALLOW256; if (pPalCaps_.Contains(ddpcaps_alpha)) fDDCAPS.dwPalCaps |= DDPCAPS_ALPHA; if (pPalCaps_.Contains(ddpcaps_primarysurface)) fDDCAPS.dwPalCaps |= DDPCAPS_PRIMARYSURFACE; if (pPalCaps_.Contains(ddpcaps_primarysurfaceleft)) fDDCAPS.dwPalCaps |= DDPCAPS_PRIMARYSURFACELEFT; if (pPalCaps_.Contains(ddpcaps_vsync)) fDDCAPS.dwPalCaps |= DDPCAPS_VSYNC; } // -------------------------------------------------------------------------- // Method: FGetPalCaps_Strings() // This method creates and then returns a TStringList containing // the current set of 'PalCaps' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDDCaps::FGetPalCaps_Strings() { // if the strings have not been allocated if (fPalCaps_Strings==NULL) { // attempt to allocate the strings fPalCaps_Strings = new TStringList(); // if the allocation failed if (fPalCaps_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetPalCaps_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various PalCaps_Strings" ); return NULL; } } fPalCaps_Strings->Clear(); if (fDDCAPS.dwPalCaps & DDPCAPS_1BIT) fPalCaps_Strings->Add("DDPCAPS_1BIT"); if (fDDCAPS.dwPalCaps & DDPCAPS_2BIT) fPalCaps_Strings->Add("DDPCAPS_2BIT"); if (fDDCAPS.dwPalCaps & DDPCAPS_4BIT) fPalCaps_Strings->Add("DDPCAPS_4BIT"); if (fDDCAPS.dwPalCaps & DDPCAPS_8BIT) fPalCaps_Strings->Add("DDPCAPS_8BIT"); if (fDDCAPS.dwPalCaps & DDPCAPS_8BITENTRIES) fPalCaps_Strings->Add("DDPCAPS_8BITENTRIES"); if (fDDCAPS.dwPalCaps & DDPCAPS_ALLOW256) fPalCaps_Strings->Add("DDPCAPS_ALLOW256"); if (fDDCAPS.dwPalCaps & DDPCAPS_ALPHA) fPalCaps_Strings->Add("DDPCAPS_ALPHA"); if (fDDCAPS.dwPalCaps & DDPCAPS_PRIMARYSURFACE) fPalCaps_Strings->Add("DDPCAPS_PRIMARYSURFACE"); if (fDDCAPS.dwPalCaps & DDPCAPS_PRIMARYSURFACELEFT) fPalCaps_Strings->Add("DDPCAPS_PRIMARYSURFACELEFT"); if (fDDCAPS.dwPalCaps & DDPCAPS_VSYNC) fPalCaps_Strings->Add("DDPCAPS_VSYNC"); return fPalCaps_Strings; } // -------------------------------------------------------------------------- // Method: FGetSSBCKeyCaps_ // Description: This method returns a TDDCaps_SSBCKeyCaps_Set<> of the flags // in the current fDDCAPS.dwSSBCKeyCaps. // Note: Wrapper components use the following method to modify flags // via the BCB Object Inspector. // -------------------------------------------------------------------------- TDDCaps_CKeyCaps_Set __fastcall TDDCaps::FGetSSBCKeyCaps_() { TDDCaps_CKeyCaps_Set TempSSBCKeyCaps_; TempSSBCKeyCaps_.Clear(); if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_DESTBLT) TempSSBCKeyCaps_ = TempSSBCKeyCaps_ << ddckeycaps_destblt; if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_DESTBLTCLRSPACE) TempSSBCKeyCaps_ = TempSSBCKeyCaps_ << ddckeycaps_destbltclrspace; if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_DESTBLTCLRSPACEYUV) TempSSBCKeyCaps_ = TempSSBCKeyCaps_ << ddckeycaps_destbltclrspaceyuv; if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_DESTBLTYUV) TempSSBCKeyCaps_ = TempSSBCKeyCaps_ << ddckeycaps_destbltyuv; if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_DESTOVERLAY) TempSSBCKeyCaps_ = TempSSBCKeyCaps_ << ddckeycaps_destoverlay; if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_DESTOVERLAYCLRSPACE) TempSSBCKeyCaps_ = TempSSBCKeyCaps_ << ddckeycaps_destoverlayclrspace; if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV) TempSSBCKeyCaps_ = TempSSBCKeyCaps_ << ddckeycaps_destoverlayclrspaceyuv; if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_DESTOVERLAYONEACTIVE) TempSSBCKeyCaps_ = TempSSBCKeyCaps_ << ddckeycaps_destoverlayoneactive; if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_DESTOVERLAYYUV) TempSSBCKeyCaps_ = TempSSBCKeyCaps_ << ddckeycaps_destoverlayyuv; if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_NOCOSTOVERLAY) TempSSBCKeyCaps_ = TempSSBCKeyCaps_ << ddckeycaps_nocostoverlay; if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_SRCBLT) TempSSBCKeyCaps_ = TempSSBCKeyCaps_ << ddckeycaps_srcblt; if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_SRCBLTCLRSPACE) TempSSBCKeyCaps_ = TempSSBCKeyCaps_ << ddckeycaps_srcbltclrspace; if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_SRCBLTCLRSPACEYUV) TempSSBCKeyCaps_ = TempSSBCKeyCaps_ << ddckeycaps_srcbltclrspaceyuv; if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_SRCBLTYUV) TempSSBCKeyCaps_ = TempSSBCKeyCaps_ << ddckeycaps_srcbltyuv; if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_SRCOVERLAY) TempSSBCKeyCaps_ = TempSSBCKeyCaps_ << ddckeycaps_srcoverlay; if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_SRCOVERLAYCLRSPACE) TempSSBCKeyCaps_ = TempSSBCKeyCaps_ << ddckeycaps_srcoverlayclrspace; if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV) TempSSBCKeyCaps_ = TempSSBCKeyCaps_ << ddckeycaps_srcoverlayclrspaceyuv; if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_SRCOVERLAYONEACTIVE) TempSSBCKeyCaps_ = TempSSBCKeyCaps_ << ddckeycaps_srcoverlayoneactive; if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_SRCOVERLAYYUV) TempSSBCKeyCaps_ = TempSSBCKeyCaps_ << ddckeycaps_srcoverlayyuv; return TempSSBCKeyCaps_; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetSSBCKeyCaps_( TDDCaps_CKeyCaps_Set pSSBCKeyCaps_ ) { fDDCAPS.dwSSBCKeyCaps = 0; if (pSSBCKeyCaps_.Contains(ddckeycaps_destblt)) fDDCAPS.dwSSBCKeyCaps |= DDCKEYCAPS_DESTBLT; if (pSSBCKeyCaps_.Contains(ddckeycaps_destbltclrspace)) fDDCAPS.dwSSBCKeyCaps |= DDCKEYCAPS_DESTBLTCLRSPACE; if (pSSBCKeyCaps_.Contains(ddckeycaps_destbltclrspaceyuv)) fDDCAPS.dwSSBCKeyCaps |= DDCKEYCAPS_DESTBLTCLRSPACEYUV; if (pSSBCKeyCaps_.Contains(ddckeycaps_destbltyuv)) fDDCAPS.dwSSBCKeyCaps |= DDCKEYCAPS_DESTBLTYUV; if (pSSBCKeyCaps_.Contains(ddckeycaps_destoverlay)) fDDCAPS.dwSSBCKeyCaps |= DDCKEYCAPS_DESTOVERLAY; if (pSSBCKeyCaps_.Contains(ddckeycaps_destoverlayclrspace)) fDDCAPS.dwSSBCKeyCaps |= DDCKEYCAPS_DESTOVERLAYCLRSPACE; if (pSSBCKeyCaps_.Contains(ddckeycaps_destoverlayclrspaceyuv)) fDDCAPS.dwSSBCKeyCaps |= DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV; if (pSSBCKeyCaps_.Contains(ddckeycaps_destoverlayoneactive)) fDDCAPS.dwSSBCKeyCaps |= DDCKEYCAPS_DESTOVERLAYONEACTIVE; if (pSSBCKeyCaps_.Contains(ddckeycaps_destoverlayyuv)) fDDCAPS.dwSSBCKeyCaps |= DDCKEYCAPS_DESTOVERLAYYUV; if (pSSBCKeyCaps_.Contains(ddckeycaps_nocostoverlay)) fDDCAPS.dwSSBCKeyCaps |= DDCKEYCAPS_NOCOSTOVERLAY; if (pSSBCKeyCaps_.Contains(ddckeycaps_srcblt)) fDDCAPS.dwSSBCKeyCaps |= DDCKEYCAPS_SRCBLT; if (pSSBCKeyCaps_.Contains(ddckeycaps_srcbltclrspace)) fDDCAPS.dwSSBCKeyCaps |= DDCKEYCAPS_SRCBLTCLRSPACE; if (pSSBCKeyCaps_.Contains(ddckeycaps_srcbltclrspaceyuv)) fDDCAPS.dwSSBCKeyCaps |= DDCKEYCAPS_SRCBLTCLRSPACEYUV; if (pSSBCKeyCaps_.Contains(ddckeycaps_srcbltyuv)) fDDCAPS.dwSSBCKeyCaps |= DDCKEYCAPS_SRCBLTYUV; if (pSSBCKeyCaps_.Contains(ddckeycaps_srcoverlay)) fDDCAPS.dwSSBCKeyCaps |= DDCKEYCAPS_SRCOVERLAY; if (pSSBCKeyCaps_.Contains(ddckeycaps_srcoverlayclrspace)) fDDCAPS.dwSSBCKeyCaps |= DDCKEYCAPS_SRCOVERLAYCLRSPACE; if (pSSBCKeyCaps_.Contains(ddckeycaps_srcoverlayclrspaceyuv)) fDDCAPS.dwSSBCKeyCaps |= DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV; if (pSSBCKeyCaps_.Contains(ddckeycaps_srcoverlayoneactive)) fDDCAPS.dwSSBCKeyCaps |= DDCKEYCAPS_SRCOVERLAYONEACTIVE; if (pSSBCKeyCaps_.Contains(ddckeycaps_srcoverlayyuv)) fDDCAPS.dwSSBCKeyCaps |= DDCKEYCAPS_SRCOVERLAYYUV; } // -------------------------------------------------------------------------- // Method: FGetSSBCKeyCaps_Strings() // This method creates and then returns a TStringList containing // the current set of 'SSBCKeyCaps' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDDCaps::FGetSSBCKeyCaps_Strings() { // if the strings have not been allocated if (fSSBCKeyCaps_Strings==NULL) { // attempt to allocate the strings fSSBCKeyCaps_Strings = new TStringList(); // if the allocation failed if (fSSBCKeyCaps_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetSSBCKeyCaps_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various SSBCKeyCaps_Strings" ); return NULL; } } fSSBCKeyCaps_Strings->Clear(); if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_DESTBLT) fSSBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTBLT"); if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_DESTBLTCLRSPACE) fSSBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTBLTCLRSPACE"); if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_DESTBLTCLRSPACEYUV) fSSBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTBLTCLRSPACEYUV"); if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_DESTBLTYUV) fSSBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTBLTYUV"); if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_DESTOVERLAY) fSSBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAY"); if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_DESTOVERLAYCLRSPACE) fSSBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAYCLRSPACE"); if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV) fSSBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV"); if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_DESTOVERLAYONEACTIVE) fSSBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAYONEACTIVE"); if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_DESTOVERLAYYUV) fSSBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAYYUV"); if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_NOCOSTOVERLAY) fSSBCKeyCaps_Strings->Add("DDCKEYCAPS_NOCOSTOVERLAY"); if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_SRCBLT) fSSBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCBLT"); if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_SRCBLTCLRSPACE) fSSBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCBLTCLRSPACE"); if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_SRCBLTCLRSPACEYUV) fSSBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCBLTCLRSPACEYUV"); if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_SRCBLTYUV) fSSBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCBLTYUV"); if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_SRCOVERLAY) fSSBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAY"); if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_SRCOVERLAYCLRSPACE) fSSBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAYCLRSPACE"); if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV) fSSBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV"); if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_SRCOVERLAYONEACTIVE) fSSBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAYONEACTIVE"); if (fDDCAPS.dwSSBCKeyCaps & DDCKEYCAPS_SRCOVERLAYYUV) fSSBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAYYUV"); return fSSBCKeyCaps_Strings; } // -------------------------------------------------------------------------- // Method: FGetSSBCaps_ // Description: This method returns a TDDCaps_SSBCaps_Set<> of the flags in // the current fDDCAPS.dwSSBCaps. // Note: Wrapper components use the following method to modify flags // via the BCB Object Inspector. // -------------------------------------------------------------------------- TDDCaps_Caps_Set __fastcall TDDCaps::FGetSSBCaps_() { TDDCaps_Caps_Set TempSSBCaps_; TempSSBCaps_.Clear(); if (fDDCAPS.dwSSBCaps & DDCAPS_3D) TempSSBCaps_ = TempSSBCaps_ << ddcaps_3d; if (fDDCAPS.dwSSBCaps & DDCAPS_ALIGNBOUNDARYDEST) TempSSBCaps_ = TempSSBCaps_ << ddcaps_alignboundarydest; if (fDDCAPS.dwSSBCaps & DDCAPS_ALIGNBOUNDARYSRC) TempSSBCaps_ = TempSSBCaps_ << ddcaps_alignboundarysrc; if (fDDCAPS.dwSSBCaps & DDCAPS_ALIGNSIZEDEST) TempSSBCaps_ = TempSSBCaps_ << ddcaps_alignsizedest; if (fDDCAPS.dwSSBCaps & DDCAPS_ALIGNSIZESRC) TempSSBCaps_ = TempSSBCaps_ << ddcaps_alignsizesrc; if (fDDCAPS.dwSSBCaps & DDCAPS_ALIGNSTRIDE) TempSSBCaps_ = TempSSBCaps_ << ddcaps_alignstride; if (fDDCAPS.dwSSBCaps & DDCAPS_ALPHA) TempSSBCaps_ = TempSSBCaps_ << ddcaps_alpha; if (fDDCAPS.dwSSBCaps & DDCAPS_BANKSWITCHED) TempSSBCaps_ = TempSSBCaps_ << ddcaps_bankswitched; if (fDDCAPS.dwSSBCaps & DDCAPS_BLT) TempSSBCaps_ = TempSSBCaps_ << ddcaps_blt; if (fDDCAPS.dwSSBCaps & DDCAPS_BLTCOLORFILL) TempSSBCaps_ = TempSSBCaps_ << ddcaps_bltcolorfill; if (fDDCAPS.dwSSBCaps & DDCAPS_BLTDEPTHFILL) TempSSBCaps_ = TempSSBCaps_ << ddcaps_bltdepthfill; if (fDDCAPS.dwSSBCaps & DDCAPS_BLTFOURCC) TempSSBCaps_ = TempSSBCaps_ << ddcaps_bltfourcc; if (fDDCAPS.dwSSBCaps & DDCAPS_BLTQUEUE) TempSSBCaps_ = TempSSBCaps_ << ddcaps_bltqueue; if (fDDCAPS.dwSSBCaps & DDCAPS_BLTSTRETCH) TempSSBCaps_ = TempSSBCaps_ << ddcaps_bltstretch; if (fDDCAPS.dwSSBCaps & DDCAPS_CANBLTSYSMEM) TempSSBCaps_ = TempSSBCaps_ << ddcaps_canbltsysmem; if (fDDCAPS.dwSSBCaps & DDCAPS_CANCLIP) TempSSBCaps_ = TempSSBCaps_ << ddcaps_canclip; if (fDDCAPS.dwSSBCaps & DDCAPS_CANCLIPSTRETCHED) TempSSBCaps_ = TempSSBCaps_ << ddcaps_canclipstretched; if (fDDCAPS.dwSSBCaps & DDCAPS_COLORKEY) TempSSBCaps_ = TempSSBCaps_ << ddcaps_colorkey; if (fDDCAPS.dwSSBCaps & DDCAPS_COLORKEYHWASSIST) TempSSBCaps_ = TempSSBCaps_ << ddcaps_colorkeyhwassist; if (fDDCAPS.dwSSBCaps & DDCAPS_GDI) TempSSBCaps_ = TempSSBCaps_ << ddcaps_gdi; if (fDDCAPS.dwSSBCaps & DDCAPS_NOHARDWARE) TempSSBCaps_ = TempSSBCaps_ << ddcaps_nohardware; if (fDDCAPS.dwSSBCaps & DDCAPS_OVERLAY) TempSSBCaps_ = TempSSBCaps_ << ddcaps_overlay; if (fDDCAPS.dwSSBCaps & DDCAPS_OVERLAYCANTCLIP) TempSSBCaps_ = TempSSBCaps_ << ddcaps_overlaycantclip; if (fDDCAPS.dwSSBCaps & DDCAPS_OVERLAYFOURCC) TempSSBCaps_ = TempSSBCaps_ << ddcaps_overlayfourcc; if (fDDCAPS.dwSSBCaps & DDCAPS_OVERLAYSTRETCH) TempSSBCaps_ = TempSSBCaps_ << ddcaps_overlaystretch; if (fDDCAPS.dwSSBCaps & DDCAPS_PALETTE) TempSSBCaps_ = TempSSBCaps_ << ddcaps_palette; if (fDDCAPS.dwSSBCaps & DDCAPS_PALETTEVSYNC) TempSSBCaps_ = TempSSBCaps_ << ddcaps_palettevsync; if (fDDCAPS.dwSSBCaps & DDCAPS_READSCANLINE) TempSSBCaps_ = TempSSBCaps_ << ddcaps_readscanline; if (fDDCAPS.dwSSBCaps & DDCAPS_VBI) TempSSBCaps_ = TempSSBCaps_ << ddcaps_vbi; if (fDDCAPS.dwSSBCaps & DDCAPS_ZBLTS) TempSSBCaps_ = TempSSBCaps_ << ddcaps_zblts; if (fDDCAPS.dwSSBCaps & DDCAPS_ZOVERLAYS) TempSSBCaps_ = TempSSBCaps_ << ddcaps_zoverlays; return TempSSBCaps_; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetSSBCaps_( TDDCaps_Caps_Set pSSBCaps_ ) { fDDCAPS.dwSSBCaps = 0; if (pSSBCaps_.Contains(ddcaps_3d)) fDDCAPS.dwSSBCaps |= DDCAPS_3D; if (pSSBCaps_.Contains(ddcaps_alignboundarydest)) fDDCAPS.dwSSBCaps |= DDCAPS_ALIGNBOUNDARYDEST; if (pSSBCaps_.Contains(ddcaps_alignboundarysrc)) fDDCAPS.dwSSBCaps |= DDCAPS_ALIGNBOUNDARYSRC; if (pSSBCaps_.Contains(ddcaps_alignsizedest)) fDDCAPS.dwSSBCaps |= DDCAPS_ALIGNSIZEDEST; if (pSSBCaps_.Contains(ddcaps_alignsizesrc)) fDDCAPS.dwSSBCaps |= DDCAPS_ALIGNSIZESRC; if (pSSBCaps_.Contains(ddcaps_alignstride)) fDDCAPS.dwSSBCaps |= DDCAPS_ALIGNSTRIDE; if (pSSBCaps_.Contains(ddcaps_alpha)) fDDCAPS.dwSSBCaps |= DDCAPS_ALPHA; if (pSSBCaps_.Contains(ddcaps_bankswitched)) fDDCAPS.dwSSBCaps |= DDCAPS_BANKSWITCHED; if (pSSBCaps_.Contains(ddcaps_blt)) fDDCAPS.dwSSBCaps |= DDCAPS_BLT; if (pSSBCaps_.Contains(ddcaps_bltcolorfill)) fDDCAPS.dwSSBCaps |= DDCAPS_BLTCOLORFILL; if (pSSBCaps_.Contains(ddcaps_bltdepthfill)) fDDCAPS.dwSSBCaps |= DDCAPS_BLTDEPTHFILL; if (pSSBCaps_.Contains(ddcaps_bltfourcc)) fDDCAPS.dwSSBCaps |= DDCAPS_BLTFOURCC; if (pSSBCaps_.Contains(ddcaps_bltqueue)) fDDCAPS.dwSSBCaps |= DDCAPS_BLTQUEUE; if (pSSBCaps_.Contains(ddcaps_bltstretch)) fDDCAPS.dwSSBCaps |= DDCAPS_BLTSTRETCH; if (pSSBCaps_.Contains(ddcaps_canbltsysmem)) fDDCAPS.dwSSBCaps |= DDCAPS_CANBLTSYSMEM; if (pSSBCaps_.Contains(ddcaps_canclip)) fDDCAPS.dwSSBCaps |= DDCAPS_CANCLIP; if (pSSBCaps_.Contains(ddcaps_canclipstretched)) fDDCAPS.dwSSBCaps |= DDCAPS_CANCLIPSTRETCHED; if (pSSBCaps_.Contains(ddcaps_colorkey)) fDDCAPS.dwSSBCaps |= DDCAPS_COLORKEY; if (pSSBCaps_.Contains(ddcaps_colorkeyhwassist)) fDDCAPS.dwSSBCaps |= DDCAPS_COLORKEYHWASSIST; if (pSSBCaps_.Contains(ddcaps_gdi)) fDDCAPS.dwSSBCaps |= DDCAPS_GDI; if (pSSBCaps_.Contains(ddcaps_nohardware)) fDDCAPS.dwSSBCaps |= DDCAPS_NOHARDWARE; if (pSSBCaps_.Contains(ddcaps_overlay)) fDDCAPS.dwSSBCaps |= DDCAPS_OVERLAY; if (pSSBCaps_.Contains(ddcaps_overlaycantclip)) fDDCAPS.dwSSBCaps |= DDCAPS_OVERLAYCANTCLIP; if (pSSBCaps_.Contains(ddcaps_overlayfourcc)) fDDCAPS.dwSSBCaps |= DDCAPS_OVERLAYFOURCC; if (pSSBCaps_.Contains(ddcaps_overlaystretch)) fDDCAPS.dwSSBCaps |= DDCAPS_OVERLAYSTRETCH; if (pSSBCaps_.Contains(ddcaps_palette)) fDDCAPS.dwSSBCaps |= DDCAPS_PALETTE; if (pSSBCaps_.Contains(ddcaps_palettevsync)) fDDCAPS.dwSSBCaps |= DDCAPS_PALETTEVSYNC; if (pSSBCaps_.Contains(ddcaps_readscanline)) fDDCAPS.dwSSBCaps |= DDCAPS_READSCANLINE; if (pSSBCaps_.Contains(ddcaps_vbi)) fDDCAPS.dwSSBCaps |= DDCAPS_VBI; if (pSSBCaps_.Contains(ddcaps_zblts)) fDDCAPS.dwSSBCaps |= DDCAPS_ZBLTS; if (pSSBCaps_.Contains(ddcaps_zoverlays)) fDDCAPS.dwSSBCaps |= DDCAPS_ZOVERLAYS; } // -------------------------------------------------------------------------- // Method: FGetSSBCaps_Strings() // This method creates and then returns a TStringList containing // the current set of 'SSBCaps' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDDCaps::FGetSSBCaps_Strings() { // if the strings have not been allocated if (fSSBCaps_Strings==NULL) { // attempt to allocate the strings fSSBCaps_Strings = new TStringList(); // if the allocation failed if (fSSBCaps_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetSSBCaps_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various SSBCaps_Strings" ); return NULL; } } fSSBCaps_Strings->Clear(); if (fDDCAPS.dwSSBCaps & DDCAPS_3D) fSSBCaps_Strings->Add("DDCAPS_3D"); if (fDDCAPS.dwSSBCaps & DDCAPS_ALIGNBOUNDARYDEST) fSSBCaps_Strings->Add("DDCAPS_ALIGNBOUNDARYDEST"); if (fDDCAPS.dwSSBCaps & DDCAPS_ALIGNBOUNDARYSRC) fSSBCaps_Strings->Add("DDCAPS_ALIGNBOUNDARYSRC"); if (fDDCAPS.dwSSBCaps & DDCAPS_ALIGNSIZEDEST) fSSBCaps_Strings->Add("DDCAPS_ALIGNSIZEDEST"); if (fDDCAPS.dwSSBCaps & DDCAPS_ALIGNSIZESRC) fSSBCaps_Strings->Add("DDCAPS_ALIGNSIZESRC"); if (fDDCAPS.dwSSBCaps & DDCAPS_ALIGNSTRIDE) fSSBCaps_Strings->Add("DDCAPS_ALIGNSTRIDE"); if (fDDCAPS.dwSSBCaps & DDCAPS_ALPHA) fSSBCaps_Strings->Add("DDCAPS_ALPHA"); if (fDDCAPS.dwSSBCaps & DDCAPS_BANKSWITCHED) fSSBCaps_Strings->Add("DDCAPS_BANKSWITCHED"); if (fDDCAPS.dwSSBCaps & DDCAPS_BLT) fSSBCaps_Strings->Add("DDCAPS_BLT"); if (fDDCAPS.dwSSBCaps & DDCAPS_BLTCOLORFILL) fSSBCaps_Strings->Add("DDCAPS_BLTCOLORFILL"); if (fDDCAPS.dwSSBCaps & DDCAPS_BLTDEPTHFILL) fSSBCaps_Strings->Add("DDCAPS_BLTDEPTHFILL"); if (fDDCAPS.dwSSBCaps & DDCAPS_BLTFOURCC) fSSBCaps_Strings->Add("DDCAPS_BLTFOURCC"); if (fDDCAPS.dwSSBCaps & DDCAPS_BLTQUEUE) fSSBCaps_Strings->Add("DDCAPS_BLTQUEUE"); if (fDDCAPS.dwSSBCaps & DDCAPS_BLTSTRETCH) fSSBCaps_Strings->Add("DDCAPS_BLTSTRETCH"); if (fDDCAPS.dwSSBCaps & DDCAPS_CANBLTSYSMEM) fSSBCaps_Strings->Add("DDCAPS_CANBLTSYSMEM"); if (fDDCAPS.dwSSBCaps & DDCAPS_CANCLIP) fSSBCaps_Strings->Add("DDCAPS_CANCLIP"); if (fDDCAPS.dwSSBCaps & DDCAPS_CANCLIPSTRETCHED) fSSBCaps_Strings->Add("DDCAPS_CANCLIPSTRETCHED"); if (fDDCAPS.dwSSBCaps & DDCAPS_COLORKEY) fSSBCaps_Strings->Add("DDCAPS_COLORKEY"); if (fDDCAPS.dwSSBCaps & DDCAPS_COLORKEYHWASSIST) fSSBCaps_Strings->Add("DDCAPS_COLORKEYHWASSIST"); if (fDDCAPS.dwSSBCaps & DDCAPS_GDI) fSSBCaps_Strings->Add("DDCAPS_GDI"); if (fDDCAPS.dwSSBCaps & DDCAPS_NOHARDWARE) fSSBCaps_Strings->Add("DDCAPS_NOHARDWARE"); if (fDDCAPS.dwSSBCaps & DDCAPS_OVERLAY) fSSBCaps_Strings->Add("DDCAPS_OVERLAY"); if (fDDCAPS.dwSSBCaps & DDCAPS_OVERLAYCANTCLIP) fSSBCaps_Strings->Add("DDCAPS_OVERLAYCANTCLIP"); if (fDDCAPS.dwSSBCaps & DDCAPS_OVERLAYFOURCC) fSSBCaps_Strings->Add("DDCAPS_OVERLAYFOURCC"); if (fDDCAPS.dwSSBCaps & DDCAPS_OVERLAYSTRETCH) fSSBCaps_Strings->Add("DDCAPS_OVERLAYSTRETCH"); if (fDDCAPS.dwSSBCaps & DDCAPS_PALETTE) fSSBCaps_Strings->Add("DDCAPS_PALETTE"); if (fDDCAPS.dwSSBCaps & DDCAPS_PALETTEVSYNC) fSSBCaps_Strings->Add("DDCAPS_PALETTEVSYNC"); if (fDDCAPS.dwSSBCaps & DDCAPS_READSCANLINE) fSSBCaps_Strings->Add("DDCAPS_READSCANLINE"); if (fDDCAPS.dwSSBCaps & DDCAPS_VBI) fSSBCaps_Strings->Add("DDCAPS_VBI"); if (fDDCAPS.dwSSBCaps & DDCAPS_ZBLTS) fSSBCaps_Strings->Add("DDCAPS_ZBLTS"); if (fDDCAPS.dwSSBCaps & DDCAPS_ZOVERLAYS) fSSBCaps_Strings->Add("DDCAPS_ZOVERLAYS"); return fSSBCaps_Strings; } // -------------------------------------------------------------------------- // Method: FGetSVBCKeyCaps_ // Description: This method returns a TDDCaps_SVBCKeyCaps_Set<> of the flags // in the current fDDCAPS.dwSVBCKeyCaps. // Note: Wrapper components use the following method to modify flags // via the BCB Object Inspector. // -------------------------------------------------------------------------- TDDCaps_CKeyCaps_Set __fastcall TDDCaps::FGetSVBCKeyCaps_() { TDDCaps_CKeyCaps_Set TempSVBCKeyCaps_; TempSVBCKeyCaps_.Clear(); if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_DESTBLT) TempSVBCKeyCaps_ = TempSVBCKeyCaps_ << ddckeycaps_destblt; if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_DESTBLTCLRSPACE) TempSVBCKeyCaps_ = TempSVBCKeyCaps_ << ddckeycaps_destbltclrspace; if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_DESTBLTCLRSPACEYUV) TempSVBCKeyCaps_ = TempSVBCKeyCaps_ << ddckeycaps_destbltclrspaceyuv; if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_DESTBLTYUV) TempSVBCKeyCaps_ = TempSVBCKeyCaps_ << ddckeycaps_destbltyuv; if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_DESTOVERLAY) TempSVBCKeyCaps_ = TempSVBCKeyCaps_ << ddckeycaps_destoverlay; if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_DESTOVERLAYCLRSPACE) TempSVBCKeyCaps_ = TempSVBCKeyCaps_ << ddckeycaps_destoverlayclrspace; if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV) TempSVBCKeyCaps_ = TempSVBCKeyCaps_ << ddckeycaps_destoverlayclrspaceyuv; if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_DESTOVERLAYONEACTIVE) TempSVBCKeyCaps_ = TempSVBCKeyCaps_ << ddckeycaps_destoverlayoneactive; if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_DESTOVERLAYYUV) TempSVBCKeyCaps_ = TempSVBCKeyCaps_ << ddckeycaps_destoverlayyuv; if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_NOCOSTOVERLAY) TempSVBCKeyCaps_ = TempSVBCKeyCaps_ << ddckeycaps_nocostoverlay; if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_SRCBLT) TempSVBCKeyCaps_ = TempSVBCKeyCaps_ << ddckeycaps_srcblt; if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_SRCBLTCLRSPACE) TempSVBCKeyCaps_ = TempSVBCKeyCaps_ << ddckeycaps_srcbltclrspace; if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_SRCBLTCLRSPACEYUV) TempSVBCKeyCaps_ = TempSVBCKeyCaps_ << ddckeycaps_srcbltclrspaceyuv; if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_SRCBLTYUV) TempSVBCKeyCaps_ = TempSVBCKeyCaps_ << ddckeycaps_srcbltyuv; if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_SRCOVERLAY) TempSVBCKeyCaps_ = TempSVBCKeyCaps_ << ddckeycaps_srcoverlay; if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_SRCOVERLAYCLRSPACE) TempSVBCKeyCaps_ = TempSVBCKeyCaps_ << ddckeycaps_srcoverlayclrspace; if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV) TempSVBCKeyCaps_ = TempSVBCKeyCaps_ << ddckeycaps_srcoverlayclrspaceyuv; if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_SRCOVERLAYONEACTIVE) TempSVBCKeyCaps_ = TempSVBCKeyCaps_ << ddckeycaps_srcoverlayoneactive; if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_SRCOVERLAYYUV) TempSVBCKeyCaps_ = TempSVBCKeyCaps_ << ddckeycaps_srcoverlayyuv; return TempSVBCKeyCaps_; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetSVBCKeyCaps_( TDDCaps_CKeyCaps_Set pSVBCKeyCaps_ ) { fDDCAPS.dwSVBCKeyCaps = 0; if (pSVBCKeyCaps_.Contains(ddckeycaps_destblt)) fDDCAPS.dwSVBCKeyCaps |= DDCKEYCAPS_DESTBLT; if (pSVBCKeyCaps_.Contains(ddckeycaps_destbltclrspace)) fDDCAPS.dwSVBCKeyCaps |= DDCKEYCAPS_DESTBLTCLRSPACE; if (pSVBCKeyCaps_.Contains(ddckeycaps_destbltclrspaceyuv)) fDDCAPS.dwSVBCKeyCaps |= DDCKEYCAPS_DESTBLTCLRSPACEYUV; if (pSVBCKeyCaps_.Contains(ddckeycaps_destbltyuv)) fDDCAPS.dwSVBCKeyCaps |= DDCKEYCAPS_DESTBLTYUV; if (pSVBCKeyCaps_.Contains(ddckeycaps_destoverlay)) fDDCAPS.dwSVBCKeyCaps |= DDCKEYCAPS_DESTOVERLAY; if (pSVBCKeyCaps_.Contains(ddckeycaps_destoverlayclrspace)) fDDCAPS.dwSVBCKeyCaps |= DDCKEYCAPS_DESTOVERLAYCLRSPACE; if (pSVBCKeyCaps_.Contains(ddckeycaps_destoverlayclrspaceyuv)) fDDCAPS.dwSVBCKeyCaps |= DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV; if (pSVBCKeyCaps_.Contains(ddckeycaps_destoverlayoneactive)) fDDCAPS.dwSVBCKeyCaps |= DDCKEYCAPS_DESTOVERLAYONEACTIVE; if (pSVBCKeyCaps_.Contains(ddckeycaps_destoverlayyuv)) fDDCAPS.dwSVBCKeyCaps |= DDCKEYCAPS_DESTOVERLAYYUV; if (pSVBCKeyCaps_.Contains(ddckeycaps_nocostoverlay)) fDDCAPS.dwSVBCKeyCaps |= DDCKEYCAPS_NOCOSTOVERLAY; if (pSVBCKeyCaps_.Contains(ddckeycaps_srcblt)) fDDCAPS.dwSVBCKeyCaps |= DDCKEYCAPS_SRCBLT; if (pSVBCKeyCaps_.Contains(ddckeycaps_srcbltclrspace)) fDDCAPS.dwSVBCKeyCaps |= DDCKEYCAPS_SRCBLTCLRSPACE; if (pSVBCKeyCaps_.Contains(ddckeycaps_srcbltclrspaceyuv)) fDDCAPS.dwSVBCKeyCaps |= DDCKEYCAPS_SRCBLTCLRSPACEYUV; if (pSVBCKeyCaps_.Contains(ddckeycaps_srcbltyuv)) fDDCAPS.dwSVBCKeyCaps |= DDCKEYCAPS_SRCBLTYUV; if (pSVBCKeyCaps_.Contains(ddckeycaps_srcoverlay)) fDDCAPS.dwSVBCKeyCaps |= DDCKEYCAPS_SRCOVERLAY; if (pSVBCKeyCaps_.Contains(ddckeycaps_srcoverlayclrspace)) fDDCAPS.dwSVBCKeyCaps |= DDCKEYCAPS_SRCOVERLAYCLRSPACE; if (pSVBCKeyCaps_.Contains(ddckeycaps_srcoverlayclrspaceyuv)) fDDCAPS.dwSVBCKeyCaps |= DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV; if (pSVBCKeyCaps_.Contains(ddckeycaps_srcoverlayoneactive)) fDDCAPS.dwSVBCKeyCaps |= DDCKEYCAPS_SRCOVERLAYONEACTIVE; if (pSVBCKeyCaps_.Contains(ddckeycaps_srcoverlayyuv)) fDDCAPS.dwSVBCKeyCaps |= DDCKEYCAPS_SRCOVERLAYYUV; } // -------------------------------------------------------------------------- // Method: FGetSVBCKeyCaps_Strings() // This method creates and then returns a TStringList containing // the current set of 'SVBCKeyCaps' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDDCaps::FGetSVBCKeyCaps_Strings() { // if the strings have not been allocated if (fSVBCKeyCaps_Strings==NULL) { // attempt to allocate the strings fSVBCKeyCaps_Strings = new TStringList(); // if the allocation failed if (fSVBCKeyCaps_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetSVBCKeyCaps_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various SVBCKeyCaps_Strings" ); return NULL; } } fSVBCKeyCaps_Strings->Clear(); if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_DESTBLT) fSVBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTBLT"); if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_DESTBLTCLRSPACE) fSVBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTBLTCLRSPACE"); if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_DESTBLTCLRSPACEYUV) fSVBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTBLTCLRSPACEYUV"); if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_DESTBLTYUV) fSVBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTBLTYUV"); if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_DESTOVERLAY) fSVBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAY"); if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_DESTOVERLAYCLRSPACE) fSVBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAYCLRSPACE"); if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV) fSVBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV"); if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_DESTOVERLAYONEACTIVE) fSVBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAYONEACTIVE"); if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_DESTOVERLAYYUV) fSVBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAYYUV"); if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_NOCOSTOVERLAY) fSVBCKeyCaps_Strings->Add("DDCKEYCAPS_NOCOSTOVERLAY"); if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_SRCBLT) fSVBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCBLT"); if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_SRCBLTCLRSPACE) fSVBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCBLTCLRSPACE"); if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_SRCBLTCLRSPACEYUV) fSVBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCBLTCLRSPACEYUV"); if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_SRCBLTYUV) fSVBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCBLTYUV"); if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_SRCOVERLAY) fSVBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAY"); if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_SRCOVERLAYCLRSPACE) fSVBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAYCLRSPACE"); if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV) fSVBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV"); if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_SRCOVERLAYONEACTIVE) fSVBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAYONEACTIVE"); if (fDDCAPS.dwSVBCKeyCaps & DDCKEYCAPS_SRCOVERLAYYUV) fSVBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAYYUV"); return fSVBCKeyCaps_Strings; } // -------------------------------------------------------------------------- // Method: FGetSVBCaps_ // Description: This method returns a TDDCaps_SVBCaps_Set<> of the flags in // the current fDDCAPS.dwSVBCaps. // Note: Wrapper components use the following method to modify flags // via the BCB Object Inspector. // -------------------------------------------------------------------------- TDDCaps_Caps_Set __fastcall TDDCaps::FGetSVBCaps_() { TDDCaps_Caps_Set TempSVBCaps_; TempSVBCaps_.Clear(); if (fDDCAPS.dwSVBCaps & DDCAPS_3D) TempSVBCaps_ = TempSVBCaps_ << ddcaps_3d; if (fDDCAPS.dwSVBCaps & DDCAPS_ALIGNBOUNDARYDEST) TempSVBCaps_ = TempSVBCaps_ << ddcaps_alignboundarydest; if (fDDCAPS.dwSVBCaps & DDCAPS_ALIGNBOUNDARYSRC) TempSVBCaps_ = TempSVBCaps_ << ddcaps_alignboundarysrc; if (fDDCAPS.dwSVBCaps & DDCAPS_ALIGNSIZEDEST) TempSVBCaps_ = TempSVBCaps_ << ddcaps_alignsizedest; if (fDDCAPS.dwSVBCaps & DDCAPS_ALIGNSIZESRC) TempSVBCaps_ = TempSVBCaps_ << ddcaps_alignsizesrc; if (fDDCAPS.dwSVBCaps & DDCAPS_ALIGNSTRIDE) TempSVBCaps_ = TempSVBCaps_ << ddcaps_alignstride; if (fDDCAPS.dwSVBCaps & DDCAPS_ALPHA) TempSVBCaps_ = TempSVBCaps_ << ddcaps_alpha; if (fDDCAPS.dwSVBCaps & DDCAPS_BANKSWITCHED) TempSVBCaps_ = TempSVBCaps_ << ddcaps_bankswitched; if (fDDCAPS.dwSVBCaps & DDCAPS_BLT) TempSVBCaps_ = TempSVBCaps_ << ddcaps_blt; if (fDDCAPS.dwSVBCaps & DDCAPS_BLTCOLORFILL) TempSVBCaps_ = TempSVBCaps_ << ddcaps_bltcolorfill; if (fDDCAPS.dwSVBCaps & DDCAPS_BLTDEPTHFILL) TempSVBCaps_ = TempSVBCaps_ << ddcaps_bltdepthfill; if (fDDCAPS.dwSVBCaps & DDCAPS_BLTFOURCC) TempSVBCaps_ = TempSVBCaps_ << ddcaps_bltfourcc; if (fDDCAPS.dwSVBCaps & DDCAPS_BLTQUEUE) TempSVBCaps_ = TempSVBCaps_ << ddcaps_bltqueue; if (fDDCAPS.dwSVBCaps & DDCAPS_BLTSTRETCH) TempSVBCaps_ = TempSVBCaps_ << ddcaps_bltstretch; if (fDDCAPS.dwSVBCaps & DDCAPS_CANBLTSYSMEM) TempSVBCaps_ = TempSVBCaps_ << ddcaps_canbltsysmem; if (fDDCAPS.dwSVBCaps & DDCAPS_CANCLIP) TempSVBCaps_ = TempSVBCaps_ << ddcaps_canclip; if (fDDCAPS.dwSVBCaps & DDCAPS_CANCLIPSTRETCHED) TempSVBCaps_ = TempSVBCaps_ << ddcaps_canclipstretched; if (fDDCAPS.dwSVBCaps & DDCAPS_COLORKEY) TempSVBCaps_ = TempSVBCaps_ << ddcaps_colorkey; if (fDDCAPS.dwSVBCaps & DDCAPS_COLORKEYHWASSIST) TempSVBCaps_ = TempSVBCaps_ << ddcaps_colorkeyhwassist; if (fDDCAPS.dwSVBCaps & DDCAPS_GDI) TempSVBCaps_ = TempSVBCaps_ << ddcaps_gdi; if (fDDCAPS.dwSVBCaps & DDCAPS_NOHARDWARE) TempSVBCaps_ = TempSVBCaps_ << ddcaps_nohardware; if (fDDCAPS.dwSVBCaps & DDCAPS_OVERLAY) TempSVBCaps_ = TempSVBCaps_ << ddcaps_overlay; if (fDDCAPS.dwSVBCaps & DDCAPS_OVERLAYCANTCLIP) TempSVBCaps_ = TempSVBCaps_ << ddcaps_overlaycantclip; if (fDDCAPS.dwSVBCaps & DDCAPS_OVERLAYFOURCC) TempSVBCaps_ = TempSVBCaps_ << ddcaps_overlayfourcc; if (fDDCAPS.dwSVBCaps & DDCAPS_OVERLAYSTRETCH) TempSVBCaps_ = TempSVBCaps_ << ddcaps_overlaystretch; if (fDDCAPS.dwSVBCaps & DDCAPS_PALETTE) TempSVBCaps_ = TempSVBCaps_ << ddcaps_palette; if (fDDCAPS.dwSVBCaps & DDCAPS_PALETTEVSYNC) TempSVBCaps_ = TempSVBCaps_ << ddcaps_palettevsync; if (fDDCAPS.dwSVBCaps & DDCAPS_READSCANLINE) TempSVBCaps_ = TempSVBCaps_ << ddcaps_readscanline; if (fDDCAPS.dwSVBCaps & DDCAPS_VBI) TempSVBCaps_ = TempSVBCaps_ << ddcaps_vbi; if (fDDCAPS.dwSVBCaps & DDCAPS_ZBLTS) TempSVBCaps_ = TempSVBCaps_ << ddcaps_zblts; if (fDDCAPS.dwSVBCaps & DDCAPS_ZOVERLAYS) TempSVBCaps_ = TempSVBCaps_ << ddcaps_zoverlays; return TempSVBCaps_; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetSVBCaps_( TDDCaps_Caps_Set pSVBCaps_ ) { fDDCAPS.dwSVBCaps = 0; if (pSVBCaps_.Contains(ddcaps_3d)) fDDCAPS.dwSVBCaps |= DDCAPS_3D; if (pSVBCaps_.Contains(ddcaps_alignboundarydest)) fDDCAPS.dwSVBCaps |= DDCAPS_ALIGNBOUNDARYDEST; if (pSVBCaps_.Contains(ddcaps_alignboundarysrc)) fDDCAPS.dwSVBCaps |= DDCAPS_ALIGNBOUNDARYSRC; if (pSVBCaps_.Contains(ddcaps_alignsizedest)) fDDCAPS.dwSVBCaps |= DDCAPS_ALIGNSIZEDEST; if (pSVBCaps_.Contains(ddcaps_alignsizesrc)) fDDCAPS.dwSVBCaps |= DDCAPS_ALIGNSIZESRC; if (pSVBCaps_.Contains(ddcaps_alignstride)) fDDCAPS.dwSVBCaps |= DDCAPS_ALIGNSTRIDE; if (pSVBCaps_.Contains(ddcaps_alpha)) fDDCAPS.dwSVBCaps |= DDCAPS_ALPHA; if (pSVBCaps_.Contains(ddcaps_bankswitched)) fDDCAPS.dwSVBCaps |= DDCAPS_BANKSWITCHED; if (pSVBCaps_.Contains(ddcaps_blt)) fDDCAPS.dwSVBCaps |= DDCAPS_BLT; if (pSVBCaps_.Contains(ddcaps_bltcolorfill)) fDDCAPS.dwSVBCaps |= DDCAPS_BLTCOLORFILL; if (pSVBCaps_.Contains(ddcaps_bltdepthfill)) fDDCAPS.dwSVBCaps |= DDCAPS_BLTDEPTHFILL; if (pSVBCaps_.Contains(ddcaps_bltfourcc)) fDDCAPS.dwSVBCaps |= DDCAPS_BLTFOURCC; if (pSVBCaps_.Contains(ddcaps_bltqueue)) fDDCAPS.dwSVBCaps |= DDCAPS_BLTQUEUE; if (pSVBCaps_.Contains(ddcaps_bltstretch)) fDDCAPS.dwSVBCaps |= DDCAPS_BLTSTRETCH; if (pSVBCaps_.Contains(ddcaps_canbltsysmem)) fDDCAPS.dwSVBCaps |= DDCAPS_CANBLTSYSMEM; if (pSVBCaps_.Contains(ddcaps_canclip)) fDDCAPS.dwSVBCaps |= DDCAPS_CANCLIP; if (pSVBCaps_.Contains(ddcaps_canclipstretched)) fDDCAPS.dwSVBCaps |= DDCAPS_CANCLIPSTRETCHED; if (pSVBCaps_.Contains(ddcaps_colorkey)) fDDCAPS.dwSVBCaps |= DDCAPS_COLORKEY; if (pSVBCaps_.Contains(ddcaps_colorkeyhwassist)) fDDCAPS.dwSVBCaps |= DDCAPS_COLORKEYHWASSIST; if (pSVBCaps_.Contains(ddcaps_gdi)) fDDCAPS.dwSVBCaps |= DDCAPS_GDI; if (pSVBCaps_.Contains(ddcaps_nohardware)) fDDCAPS.dwSVBCaps |= DDCAPS_NOHARDWARE; if (pSVBCaps_.Contains(ddcaps_overlay)) fDDCAPS.dwSVBCaps |= DDCAPS_OVERLAY; if (pSVBCaps_.Contains(ddcaps_overlaycantclip)) fDDCAPS.dwSVBCaps |= DDCAPS_OVERLAYCANTCLIP; if (pSVBCaps_.Contains(ddcaps_overlayfourcc)) fDDCAPS.dwSVBCaps |= DDCAPS_OVERLAYFOURCC; if (pSVBCaps_.Contains(ddcaps_overlaystretch)) fDDCAPS.dwSVBCaps |= DDCAPS_OVERLAYSTRETCH; if (pSVBCaps_.Contains(ddcaps_palette)) fDDCAPS.dwSVBCaps |= DDCAPS_PALETTE; if (pSVBCaps_.Contains(ddcaps_palettevsync)) fDDCAPS.dwSVBCaps |= DDCAPS_PALETTEVSYNC; if (pSVBCaps_.Contains(ddcaps_readscanline)) fDDCAPS.dwSVBCaps |= DDCAPS_READSCANLINE; if (pSVBCaps_.Contains(ddcaps_vbi)) fDDCAPS.dwSVBCaps |= DDCAPS_VBI; if (pSVBCaps_.Contains(ddcaps_zblts)) fDDCAPS.dwSVBCaps |= DDCAPS_ZBLTS; if (pSVBCaps_.Contains(ddcaps_zoverlays)) fDDCAPS.dwSVBCaps |= DDCAPS_ZOVERLAYS; } // -------------------------------------------------------------------------- // Method: FGetSVBCaps_Strings() // This method creates and then returns a TStringList containing // the current set of 'SVBCaps' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDDCaps::FGetSVBCaps_Strings() { // if the strings have not been allocated if (fSVBCaps_Strings==NULL) { // attempt to allocate the strings fSVBCaps_Strings = new TStringList(); // if the allocation failed if (fSVBCaps_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetSVBCaps_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various SVBCaps_Strings" ); return NULL; } } fSVBCaps_Strings->Clear(); if (fDDCAPS.dwSVBCaps & DDCAPS_3D) fSVBCaps_Strings->Add("DDCAPS_3D"); if (fDDCAPS.dwSVBCaps & DDCAPS_ALIGNBOUNDARYDEST) fSVBCaps_Strings->Add("DDCAPS_ALIGNBOUNDARYDEST"); if (fDDCAPS.dwSVBCaps & DDCAPS_ALIGNBOUNDARYSRC) fSVBCaps_Strings->Add("DDCAPS_ALIGNBOUNDARYSRC"); if (fDDCAPS.dwSVBCaps & DDCAPS_ALIGNSIZEDEST) fSVBCaps_Strings->Add("DDCAPS_ALIGNSIZEDEST"); if (fDDCAPS.dwSVBCaps & DDCAPS_ALIGNSIZESRC) fSVBCaps_Strings->Add("DDCAPS_ALIGNSIZESRC"); if (fDDCAPS.dwSVBCaps & DDCAPS_ALIGNSTRIDE) fSVBCaps_Strings->Add("DDCAPS_ALIGNSTRIDE"); if (fDDCAPS.dwSVBCaps & DDCAPS_ALPHA) fSVBCaps_Strings->Add("DDCAPS_ALPHA"); if (fDDCAPS.dwSVBCaps & DDCAPS_BANKSWITCHED) fSVBCaps_Strings->Add("DDCAPS_BANKSWITCHED"); if (fDDCAPS.dwSVBCaps & DDCAPS_BLT) fSVBCaps_Strings->Add("DDCAPS_BLT"); if (fDDCAPS.dwSVBCaps & DDCAPS_BLTCOLORFILL) fSVBCaps_Strings->Add("DDCAPS_BLTCOLORFILL"); if (fDDCAPS.dwSVBCaps & DDCAPS_BLTDEPTHFILL) fSVBCaps_Strings->Add("DDCAPS_BLTDEPTHFILL"); if (fDDCAPS.dwSVBCaps & DDCAPS_BLTFOURCC) fSVBCaps_Strings->Add("DDCAPS_BLTFOURCC"); if (fDDCAPS.dwSVBCaps & DDCAPS_BLTQUEUE) fSVBCaps_Strings->Add("DDCAPS_BLTQUEUE"); if (fDDCAPS.dwSVBCaps & DDCAPS_BLTSTRETCH) fSVBCaps_Strings->Add("DDCAPS_BLTSTRETCH"); if (fDDCAPS.dwSVBCaps & DDCAPS_CANBLTSYSMEM) fSVBCaps_Strings->Add("DDCAPS_CANBLTSYSMEM"); if (fDDCAPS.dwSVBCaps & DDCAPS_CANCLIP) fSVBCaps_Strings->Add("DDCAPS_CANCLIP"); if (fDDCAPS.dwSVBCaps & DDCAPS_CANCLIPSTRETCHED) fSVBCaps_Strings->Add("DDCAPS_CANCLIPSTRETCHED"); if (fDDCAPS.dwSVBCaps & DDCAPS_COLORKEY) fSVBCaps_Strings->Add("DDCAPS_COLORKEY"); if (fDDCAPS.dwSVBCaps & DDCAPS_COLORKEYHWASSIST) fSVBCaps_Strings->Add("DDCAPS_COLORKEYHWASSIST"); if (fDDCAPS.dwSVBCaps & DDCAPS_GDI) fSVBCaps_Strings->Add("DDCAPS_GDI"); if (fDDCAPS.dwSVBCaps & DDCAPS_NOHARDWARE) fSVBCaps_Strings->Add("DDCAPS_NOHARDWARE"); if (fDDCAPS.dwSVBCaps & DDCAPS_OVERLAY) fSVBCaps_Strings->Add("DDCAPS_OVERLAY"); if (fDDCAPS.dwSVBCaps & DDCAPS_OVERLAYCANTCLIP) fSVBCaps_Strings->Add("DDCAPS_OVERLAYCANTCLIP"); if (fDDCAPS.dwSVBCaps & DDCAPS_OVERLAYFOURCC) fSVBCaps_Strings->Add("DDCAPS_OVERLAYFOURCC"); if (fDDCAPS.dwSVBCaps & DDCAPS_OVERLAYSTRETCH) fSVBCaps_Strings->Add("DDCAPS_OVERLAYSTRETCH"); if (fDDCAPS.dwSVBCaps & DDCAPS_PALETTE) fSVBCaps_Strings->Add("DDCAPS_PALETTE"); if (fDDCAPS.dwSVBCaps & DDCAPS_PALETTEVSYNC) fSVBCaps_Strings->Add("DDCAPS_PALETTEVSYNC"); if (fDDCAPS.dwSVBCaps & DDCAPS_READSCANLINE) fSVBCaps_Strings->Add("DDCAPS_READSCANLINE"); if (fDDCAPS.dwSVBCaps & DDCAPS_VBI) fSVBCaps_Strings->Add("DDCAPS_VBI"); if (fDDCAPS.dwSVBCaps & DDCAPS_ZBLTS) fSVBCaps_Strings->Add("DDCAPS_ZBLTS"); if (fDDCAPS.dwSVBCaps & DDCAPS_ZOVERLAYS) fSVBCaps_Strings->Add("DDCAPS_ZOVERLAYS"); return fSVBCaps_Strings; } // -------------------------------------------------------------------------- // Method: FGetSVBCaps2_ // Description: This method returns a TDDCaps_SVBCaps2_Set<> of the flags in // the current fDDCAPS.dwSVBCaps2. // Note: Wrapper components use the following method to modify flags // via the BCB Object Inspector. // -------------------------------------------------------------------------- TDDCaps_Caps2_Set __fastcall TDDCaps::FGetSVBCaps2_() { TDDCaps_Caps2_Set TempSVBCaps2_; TempSVBCaps2_.Clear(); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_AUTOFLIPOVERLAY) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_autoflipoverlay; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_CANBOBHARDWARE) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_canbobhardware; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_CANBOBINTERLEAVED) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_canbobinterleaved; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_CANBOBNONINTERLEAVED) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_canbobnoninterleaved; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_CANCALIBRATEGAMMA) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_cancalibrategamma; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_CANDROPZ16BIT) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_candropz16bit; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_CANFLIPODDEVEN) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_canflipoddeven; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_CANMANAGETEXTURE) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_canmanagetexture; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_CANRENDERWINDOWED) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_canrenderwindowed; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_CERTIFIED) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_certified; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_COLORCONTROLOVERLAY) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_colorcontroloverlay; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_COLORCONTROLPRIMARY) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_colorcontrolprimary; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_COPYFOURCC) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_copyfourcc; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_FLIPINTERVAL) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_flipinterval; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_FLIPNOVSYNC) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_flipnovsync; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_NO2DDURING3DSCENE) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_no2dduring3dscene; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_NONLOCALVIDMEM) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_nonlocalvidmem; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_NONLOCALVIDMEMCAPS) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_nonlocalvidmemcaps; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_NOPAGELOCKREQUIRED) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_nopagelockrequired; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_PRIMARYGAMMA) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_primarygamma; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_STEREO) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_stereo; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_TEXMANINNONLOCALVIDMEM) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_texmaninnonlocalvidmem; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_VIDEOPORT) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_videoport; if (fDDCAPS.dwSVBCaps2 & DDCAPS2_WIDESURFACES) TempSVBCaps2_ = TempSVBCaps2_ << ddcaps2_widesurfaces; return TempSVBCaps2_; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetSVBCaps2_( TDDCaps_Caps2_Set pSVBCaps2_ ) { fDDCAPS.dwSVBCaps2 = 0; if (pSVBCaps2_.Contains(ddcaps2_autoflipoverlay)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_AUTOFLIPOVERLAY; if (pSVBCaps2_.Contains(ddcaps2_canbobhardware)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_CANBOBHARDWARE; if (pSVBCaps2_.Contains(ddcaps2_canbobinterleaved)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_CANBOBINTERLEAVED; if (pSVBCaps2_.Contains(ddcaps2_canbobnoninterleaved)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_CANBOBNONINTERLEAVED; if (pSVBCaps2_.Contains(ddcaps2_cancalibrategamma)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_CANCALIBRATEGAMMA; if (pSVBCaps2_.Contains(ddcaps2_candropz16bit)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_CANDROPZ16BIT; if (pSVBCaps2_.Contains(ddcaps2_canflipoddeven)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_CANFLIPODDEVEN; if (pSVBCaps2_.Contains(ddcaps2_canmanagetexture)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_CANMANAGETEXTURE; if (pSVBCaps2_.Contains(ddcaps2_canrenderwindowed)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_CANRENDERWINDOWED; if (pSVBCaps2_.Contains(ddcaps2_certified)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_CERTIFIED; if (pSVBCaps2_.Contains(ddcaps2_colorcontroloverlay)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_COLORCONTROLOVERLAY; if (pSVBCaps2_.Contains(ddcaps2_colorcontrolprimary)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_COLORCONTROLPRIMARY; if (pSVBCaps2_.Contains(ddcaps2_copyfourcc)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_COPYFOURCC; if (pSVBCaps2_.Contains(ddcaps2_flipinterval)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_FLIPINTERVAL; if (pSVBCaps2_.Contains(ddcaps2_flipnovsync)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_FLIPNOVSYNC; if (pSVBCaps2_.Contains(ddcaps2_no2dduring3dscene)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_NO2DDURING3DSCENE; if (pSVBCaps2_.Contains(ddcaps2_nonlocalvidmem)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_NONLOCALVIDMEM; if (pSVBCaps2_.Contains(ddcaps2_nonlocalvidmemcaps)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_NONLOCALVIDMEMCAPS; if (pSVBCaps2_.Contains(ddcaps2_nopagelockrequired)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_NOPAGELOCKREQUIRED; if (pSVBCaps2_.Contains(ddcaps2_primarygamma)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_PRIMARYGAMMA; if (pSVBCaps2_.Contains(ddcaps2_stereo)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_STEREO; if (pSVBCaps2_.Contains(ddcaps2_texmaninnonlocalvidmem)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_TEXMANINNONLOCALVIDMEM; if (pSVBCaps2_.Contains(ddcaps2_videoport)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_VIDEOPORT; if (pSVBCaps2_.Contains(ddcaps2_widesurfaces)) fDDCAPS.dwSVBCaps2 |= DDCAPS2_WIDESURFACES; } // -------------------------------------------------------------------------- // Method: FGetSVBCaps2_Strings() // This method creates and then returns a TStringList containing // the current set of 'SVBCaps2' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDDCaps::FGetSVBCaps2_Strings() { // if the strings have not been allocated if (fSVBCaps2_Strings==NULL) { // attempt to allocate the strings fSVBCaps2_Strings = new TStringList(); // if the allocation failed if (fSVBCaps2_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetSVBCaps2_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various SVBCaps2_Strings" ); return NULL; } } fSVBCaps2_Strings->Clear(); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_AUTOFLIPOVERLAY) fSVBCaps2_Strings->Add("DDCAPS2_AUTOFLIPOVERLAY"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_CANBOBHARDWARE) fSVBCaps2_Strings->Add("DDCAPS2_CANBOBHARDWARE"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_CANBOBINTERLEAVED) fSVBCaps2_Strings->Add("DDCAPS2_CANBOBINTERLEAVED"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_CANBOBNONINTERLEAVED) fSVBCaps2_Strings->Add("DDCAPS2_CANBOBNONINTERLEAVED"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_CANCALIBRATEGAMMA) fSVBCaps2_Strings->Add("DDCAPS2_CANCALIBRATEGAMMA"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_CANDROPZ16BIT) fSVBCaps2_Strings->Add("DDCAPS2_CANDROPZ16BIT"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_CANFLIPODDEVEN) fSVBCaps2_Strings->Add("DDCAPS2_CANFLIPODDEVEN"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_CANMANAGETEXTURE) fSVBCaps2_Strings->Add("DDCAPS2_CANMANAGETEXTURE"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_CANRENDERWINDOWED) fSVBCaps2_Strings->Add("DDCAPS2_CANRENDERWINDOWED"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_CERTIFIED) fSVBCaps2_Strings->Add("DDCAPS2_CERTIFIED"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_COLORCONTROLOVERLAY) fSVBCaps2_Strings->Add("DDCAPS2_COLORCONTROLOVERLAY"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_COLORCONTROLPRIMARY) fSVBCaps2_Strings->Add("DDCAPS2_COLORCONTROLPRIMARY"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_COPYFOURCC) fSVBCaps2_Strings->Add("DDCAPS2_COPYFOURCC"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_FLIPINTERVAL) fSVBCaps2_Strings->Add("DDCAPS2_FLIPINTERVAL"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_FLIPNOVSYNC) fSVBCaps2_Strings->Add("DDCAPS2_FLIPNOVSYNC"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_NO2DDURING3DSCENE) fSVBCaps2_Strings->Add("DDCAPS2_NO2DDURING3DSCENE"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_NONLOCALVIDMEM) fSVBCaps2_Strings->Add("DDCAPS2_NONLOCALVIDMEM"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_NONLOCALVIDMEMCAPS) fSVBCaps2_Strings->Add("DDCAPS2_NONLOCALVIDMEMCAPS"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_NOPAGELOCKREQUIRED) fSVBCaps2_Strings->Add("DDCAPS2_NOPAGELOCKREQUIRED"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_PRIMARYGAMMA) fSVBCaps2_Strings->Add("DDCAPS2_PRIMARYGAMMA"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_STEREO) fSVBCaps2_Strings->Add("DDCAPS2_STEREO"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_TEXMANINNONLOCALVIDMEM) fSVBCaps2_Strings->Add("DDCAPS2_TEXMANINNONLOCALVIDMEM"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_VIDEOPORT) fSVBCaps2_Strings->Add("DDCAPS2_VIDEOPORT"); if (fDDCAPS.dwSVBCaps2 & DDCAPS2_WIDESURFACES) fSVBCaps2_Strings->Add("DDCAPS2_WIDESURFACES"); return fSVBCaps2_Strings; } // -------------------------------------------------------------------------- // Method: FGetSVBFXCaps_ // Description: This method returns a TDDCaps_SVBFXCaps_Set<> of the flags in // the current fDDCAPS.dwSVBFXCaps. // Note: Wrapper components use the following method to modify flags // via the BCB Object Inspector. // -------------------------------------------------------------------------- TDDCaps_FXCaps_Set __fastcall TDDCaps::FGetSVBFXCaps_() { TDDCaps_FXCaps_Set TempSVBFXCaps_; TempSVBFXCaps_.Clear(); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTALPHA) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_bltalpha; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTARITHSTRETCHY) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_bltarithstretchy; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTARITHSTRETCHYN) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_bltarithstretchyn; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTFILTER) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_bltfilter; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTMIRRORLEFTRIGHT) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_bltmirrorleftright; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTMIRRORUPDOWN) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_bltmirrorupdown; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTROTATION) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_bltrotation; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTROTATION90) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_bltrotation90; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTSHRINKX) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_bltshrinkx; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTSHRINKXN) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_bltshrinkxn; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTSHRINKY) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_bltshrinky; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTSHRINKYN) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_bltshrinkyn; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTSTRETCHX) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_bltstretchx; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTSTRETCHXN) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_bltstretchxn; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTSTRETCHY) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_bltstretchy; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTSTRETCHYN) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_bltstretchyn; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYALPHA) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_overlayalpha; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYARITHSTRETCHY) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_overlayarithstretchy; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYARITHSTRETCHYN) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_overlayarithstretchyn; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYFILTER) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_overlayfilter; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYMIRRORLEFTRIGHT) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_overlaymirrorleftright; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYMIRRORUPDOWN) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_overlaymirrorupdown; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYSHRINKX) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_overlayshrinkx; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYSHRINKXN) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_overlayshrinkxn; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYSHRINKY) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_overlayshrinky; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYSHRINKYN) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_overlayshrinkyn; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYSTRETCHX) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_overlaystretchx; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYSTRETCHXN) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_overlaystretchxn; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYSTRETCHY) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_overlaystretchy; if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYSTRETCHYN) TempSVBFXCaps_ = TempSVBFXCaps_ << ddfxcaps_overlaystretchyn; return TempSVBFXCaps_; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetSVBFXCaps_( TDDCaps_FXCaps_Set pSVBFXCaps_ ) { fDDCAPS.dwSVBFXCaps = 0; if (pSVBFXCaps_.Contains(ddfxcaps_bltalpha)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_BLTALPHA; if (pSVBFXCaps_.Contains(ddfxcaps_bltarithstretchy)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_BLTARITHSTRETCHY; if (pSVBFXCaps_.Contains(ddfxcaps_bltarithstretchyn)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_BLTARITHSTRETCHYN; if (pSVBFXCaps_.Contains(ddfxcaps_bltfilter)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_BLTFILTER; if (pSVBFXCaps_.Contains(ddfxcaps_bltmirrorleftright)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_BLTMIRRORLEFTRIGHT; if (pSVBFXCaps_.Contains(ddfxcaps_bltmirrorupdown)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_BLTMIRRORUPDOWN; if (pSVBFXCaps_.Contains(ddfxcaps_bltrotation)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_BLTROTATION; if (pSVBFXCaps_.Contains(ddfxcaps_bltrotation90)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_BLTROTATION90; if (pSVBFXCaps_.Contains(ddfxcaps_bltshrinkx)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_BLTSHRINKX; if (pSVBFXCaps_.Contains(ddfxcaps_bltshrinkxn)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_BLTSHRINKXN; if (pSVBFXCaps_.Contains(ddfxcaps_bltshrinky)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_BLTSHRINKY; if (pSVBFXCaps_.Contains(ddfxcaps_bltshrinkyn)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_BLTSHRINKYN; if (pSVBFXCaps_.Contains(ddfxcaps_bltstretchx)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_BLTSTRETCHX; if (pSVBFXCaps_.Contains(ddfxcaps_bltstretchxn)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_BLTSTRETCHXN; if (pSVBFXCaps_.Contains(ddfxcaps_bltstretchy)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_BLTSTRETCHY; if (pSVBFXCaps_.Contains(ddfxcaps_bltstretchyn)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_BLTSTRETCHYN; if (pSVBFXCaps_.Contains(ddfxcaps_overlayalpha)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_OVERLAYALPHA; if (pSVBFXCaps_.Contains(ddfxcaps_overlayarithstretchy)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_OVERLAYARITHSTRETCHY; if (pSVBFXCaps_.Contains(ddfxcaps_overlayarithstretchyn)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_OVERLAYARITHSTRETCHYN; if (pSVBFXCaps_.Contains(ddfxcaps_overlayfilter)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_OVERLAYFILTER; if (pSVBFXCaps_.Contains(ddfxcaps_overlaymirrorleftright)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_OVERLAYMIRRORLEFTRIGHT; if (pSVBFXCaps_.Contains(ddfxcaps_overlaymirrorupdown)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_OVERLAYMIRRORUPDOWN; if (pSVBFXCaps_.Contains(ddfxcaps_overlayshrinkx)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_OVERLAYSHRINKX; if (pSVBFXCaps_.Contains(ddfxcaps_overlayshrinkxn)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_OVERLAYSHRINKXN; if (pSVBFXCaps_.Contains(ddfxcaps_overlayshrinky)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_OVERLAYSHRINKY; if (pSVBFXCaps_.Contains(ddfxcaps_overlayshrinkyn)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_OVERLAYSHRINKYN; if (pSVBFXCaps_.Contains(ddfxcaps_overlaystretchx)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_OVERLAYSTRETCHX; if (pSVBFXCaps_.Contains(ddfxcaps_overlaystretchxn)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_OVERLAYSTRETCHXN; if (pSVBFXCaps_.Contains(ddfxcaps_overlaystretchy)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_OVERLAYSTRETCHY; if (pSVBFXCaps_.Contains(ddfxcaps_overlaystretchyn)) fDDCAPS.dwSVBFXCaps |= DDFXCAPS_OVERLAYSTRETCHYN; } // -------------------------------------------------------------------------- // Method: FGetSVBFXCaps_Strings() // This method creates and then returns a TStringList containing // the current set of 'SVBFXCaps' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDDCaps::FGetSVBFXCaps_Strings() { // if the strings have not been allocated if (fSVBFXCaps_Strings==NULL) { // attempt to allocate the strings fSVBFXCaps_Strings = new TStringList(); // if the allocation failed if (fSVBFXCaps_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetSVBFXCaps_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various SVBFXCaps_Strings" ); return NULL; } } fSVBFXCaps_Strings->Clear(); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTALPHA) fSVBFXCaps_Strings->Add("DDFXCAPS_BLTALPHA"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTARITHSTRETCHY) fSVBFXCaps_Strings->Add("DDFXCAPS_BLTARITHSTRETCHY"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTARITHSTRETCHYN) fSVBFXCaps_Strings->Add("DDFXCAPS_BLTARITHSTRETCHYN"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTFILTER) fSVBFXCaps_Strings->Add("DDFXCAPS_BLTFILTER"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTMIRRORLEFTRIGHT) fSVBFXCaps_Strings->Add("DDFXCAPS_BLTMIRRORLEFTRIGHT"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTMIRRORUPDOWN) fSVBFXCaps_Strings->Add("DDFXCAPS_BLTMIRRORUPDOWN"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTROTATION) fSVBFXCaps_Strings->Add("DDFXCAPS_BLTROTATION"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTROTATION90) fSVBFXCaps_Strings->Add("DDFXCAPS_BLTROTATION90"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTSHRINKX) fSVBFXCaps_Strings->Add("DDFXCAPS_BLTSHRINKX"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTSHRINKXN) fSVBFXCaps_Strings->Add("DDFXCAPS_BLTSHRINKXN"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTSHRINKY) fSVBFXCaps_Strings->Add("DDFXCAPS_BLTSHRINKY"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTSHRINKYN) fSVBFXCaps_Strings->Add("DDFXCAPS_BLTSHRINKYN"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTSTRETCHX) fSVBFXCaps_Strings->Add("DDFXCAPS_BLTSTRETCHX"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTSTRETCHXN) fSVBFXCaps_Strings->Add("DDFXCAPS_BLTSTRETCHXN"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTSTRETCHY) fSVBFXCaps_Strings->Add("DDFXCAPS_BLTSTRETCHY"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_BLTSTRETCHYN) fSVBFXCaps_Strings->Add("DDFXCAPS_BLTSTRETCHYN"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYALPHA) fSVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYALPHA"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYARITHSTRETCHY) fSVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYARITHSTRETCHY"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYARITHSTRETCHYN) fSVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYARITHSTRETCHYN"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYFILTER) fSVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYFILTER"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYMIRRORLEFTRIGHT) fSVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYMIRRORLEFTRIGHT"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYMIRRORUPDOWN) fSVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYMIRRORUPDOWN"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYSHRINKX) fSVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSHRINKX"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYSHRINKXN) fSVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSHRINKXN"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYSHRINKY) fSVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSHRINKY"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYSHRINKYN) fSVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSHRINKYN"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYSTRETCHX) fSVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSTRETCHX"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYSTRETCHXN) fSVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSTRETCHXN"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYSTRETCHY) fSVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSTRETCHY"); if (fDDCAPS.dwSVBFXCaps & DDFXCAPS_OVERLAYSTRETCHYN) fSVBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSTRETCHYN"); return fSVBFXCaps_Strings; } // -------------------------------------------------------------------------- // Method: FGetSVCaps_ // Description: This method returns a TDDCaps_SVCaps_Set<> of the flags in // the current fDDCAPS.dwSVCaps. // Note: Wrapper components use the following method to modify flags // via the BCB Object Inspector. // -------------------------------------------------------------------------- TDDCaps_SVCaps_Set __fastcall TDDCaps::FGetSVCaps_() { TDDCaps_SVCaps_Set TempSVCaps_; TempSVCaps_.Clear(); if (fDDCAPS.dwSVCaps & DDSVCAPS_STEREOSEQUENTIAL) TempSVCaps_ = TempSVCaps_ << ddsvcaps_stereosequential; return TempSVCaps_; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetSVCaps_( TDDCaps_SVCaps_Set pSVCaps_ ) { fDDCAPS.dwSVCaps = 0; if (pSVCaps_.Contains(ddsvcaps_stereosequential)) fDDCAPS.dwSVCaps |= DDSVCAPS_STEREOSEQUENTIAL; } // -------------------------------------------------------------------------- // Method: FGetSVCaps_Strings() // This method creates and then returns a TStringList containing // the current set of 'SVCaps' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDDCaps::FGetSVCaps_Strings() { // if the strings have not been allocated if (fSVCaps_Strings==NULL) { // attempt to allocate the strings fSVCaps_Strings = new TStringList(); // if the allocation failed if (fSVCaps_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetSVCaps_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various SVCaps_Strings" ); return NULL; } } fSVCaps_Strings->Clear(); if (fDDCAPS.dwSVCaps & DDSVCAPS_STEREOSEQUENTIAL) fSVCaps_Strings->Add("DDSVCAPS_STEREOSEQUENTIAL"); return fSVCaps_Strings; } // -------------------------------------------------------------------------- // Method: FGetVSBCKeyCaps_ // Description: This method returns a TDDCaps_VSBCKeyCaps_Set<> of the flags // in the current fDDCAPS.dwVSBCKeyCaps. // Note: Wrapper components use the following method to modify flags // via the BCB Object Inspector. // -------------------------------------------------------------------------- TDDCaps_CKeyCaps_Set __fastcall TDDCaps::FGetVSBCKeyCaps_() { TDDCaps_CKeyCaps_Set TempVSBCKeyCaps_; TempVSBCKeyCaps_.Clear(); if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_DESTBLT) TempVSBCKeyCaps_ = TempVSBCKeyCaps_ << ddckeycaps_destblt; if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_DESTBLTCLRSPACE) TempVSBCKeyCaps_ = TempVSBCKeyCaps_ << ddckeycaps_destbltclrspace; if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_DESTBLTCLRSPACEYUV) TempVSBCKeyCaps_ = TempVSBCKeyCaps_ << ddckeycaps_destbltclrspaceyuv; if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_DESTBLTYUV) TempVSBCKeyCaps_ = TempVSBCKeyCaps_ << ddckeycaps_destbltyuv; if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_DESTOVERLAY) TempVSBCKeyCaps_ = TempVSBCKeyCaps_ << ddckeycaps_destoverlay; if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_DESTOVERLAYCLRSPACE) TempVSBCKeyCaps_ = TempVSBCKeyCaps_ << ddckeycaps_destoverlayclrspace; if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV) TempVSBCKeyCaps_ = TempVSBCKeyCaps_ << ddckeycaps_destoverlayclrspaceyuv; if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_DESTOVERLAYONEACTIVE) TempVSBCKeyCaps_ = TempVSBCKeyCaps_ << ddckeycaps_destoverlayoneactive; if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_DESTOVERLAYYUV) TempVSBCKeyCaps_ = TempVSBCKeyCaps_ << ddckeycaps_destoverlayyuv; if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_NOCOSTOVERLAY) TempVSBCKeyCaps_ = TempVSBCKeyCaps_ << ddckeycaps_nocostoverlay; if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_SRCBLT) TempVSBCKeyCaps_ = TempVSBCKeyCaps_ << ddckeycaps_srcblt; if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_SRCBLTCLRSPACE) TempVSBCKeyCaps_ = TempVSBCKeyCaps_ << ddckeycaps_srcbltclrspace; if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_SRCBLTCLRSPACEYUV) TempVSBCKeyCaps_ = TempVSBCKeyCaps_ << ddckeycaps_srcbltclrspaceyuv; if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_SRCBLTYUV) TempVSBCKeyCaps_ = TempVSBCKeyCaps_ << ddckeycaps_srcbltyuv; if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_SRCOVERLAY) TempVSBCKeyCaps_ = TempVSBCKeyCaps_ << ddckeycaps_srcoverlay; if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_SRCOVERLAYCLRSPACE) TempVSBCKeyCaps_ = TempVSBCKeyCaps_ << ddckeycaps_srcoverlayclrspace; if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV) TempVSBCKeyCaps_ = TempVSBCKeyCaps_ << ddckeycaps_srcoverlayclrspaceyuv; if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_SRCOVERLAYONEACTIVE) TempVSBCKeyCaps_ = TempVSBCKeyCaps_ << ddckeycaps_srcoverlayoneactive; if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_SRCOVERLAYYUV) TempVSBCKeyCaps_ = TempVSBCKeyCaps_ << ddckeycaps_srcoverlayyuv; return TempVSBCKeyCaps_; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetVSBCKeyCaps_( TDDCaps_CKeyCaps_Set pVSBCKeyCaps_ ) { fDDCAPS.dwVSBCKeyCaps = 0; if (pVSBCKeyCaps_.Contains(ddckeycaps_destblt)) fDDCAPS.dwVSBCKeyCaps |= DDCKEYCAPS_DESTBLT; if (pVSBCKeyCaps_.Contains(ddckeycaps_destbltclrspace)) fDDCAPS.dwVSBCKeyCaps |= DDCKEYCAPS_DESTBLTCLRSPACE; if (pVSBCKeyCaps_.Contains(ddckeycaps_destbltclrspaceyuv)) fDDCAPS.dwVSBCKeyCaps |= DDCKEYCAPS_DESTBLTCLRSPACEYUV; if (pVSBCKeyCaps_.Contains(ddckeycaps_destbltyuv)) fDDCAPS.dwVSBCKeyCaps |= DDCKEYCAPS_DESTBLTYUV; if (pVSBCKeyCaps_.Contains(ddckeycaps_destoverlay)) fDDCAPS.dwVSBCKeyCaps |= DDCKEYCAPS_DESTOVERLAY; if (pVSBCKeyCaps_.Contains(ddckeycaps_destoverlayclrspace)) fDDCAPS.dwVSBCKeyCaps |= DDCKEYCAPS_DESTOVERLAYCLRSPACE; if (pVSBCKeyCaps_.Contains(ddckeycaps_destoverlayclrspaceyuv)) fDDCAPS.dwVSBCKeyCaps |= DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV; if (pVSBCKeyCaps_.Contains(ddckeycaps_destoverlayoneactive)) fDDCAPS.dwVSBCKeyCaps |= DDCKEYCAPS_DESTOVERLAYONEACTIVE; if (pVSBCKeyCaps_.Contains(ddckeycaps_destoverlayyuv)) fDDCAPS.dwVSBCKeyCaps |= DDCKEYCAPS_DESTOVERLAYYUV; if (pVSBCKeyCaps_.Contains(ddckeycaps_nocostoverlay)) fDDCAPS.dwVSBCKeyCaps |= DDCKEYCAPS_NOCOSTOVERLAY; if (pVSBCKeyCaps_.Contains(ddckeycaps_srcblt)) fDDCAPS.dwVSBCKeyCaps |= DDCKEYCAPS_SRCBLT; if (pVSBCKeyCaps_.Contains(ddckeycaps_srcbltclrspace)) fDDCAPS.dwVSBCKeyCaps |= DDCKEYCAPS_SRCBLTCLRSPACE; if (pVSBCKeyCaps_.Contains(ddckeycaps_srcbltclrspaceyuv)) fDDCAPS.dwVSBCKeyCaps |= DDCKEYCAPS_SRCBLTCLRSPACEYUV; if (pVSBCKeyCaps_.Contains(ddckeycaps_srcbltyuv)) fDDCAPS.dwVSBCKeyCaps |= DDCKEYCAPS_SRCBLTYUV; if (pVSBCKeyCaps_.Contains(ddckeycaps_srcoverlay)) fDDCAPS.dwVSBCKeyCaps |= DDCKEYCAPS_SRCOVERLAY; if (pVSBCKeyCaps_.Contains(ddckeycaps_srcoverlayclrspace)) fDDCAPS.dwVSBCKeyCaps |= DDCKEYCAPS_SRCOVERLAYCLRSPACE; if (pVSBCKeyCaps_.Contains(ddckeycaps_srcoverlayclrspaceyuv)) fDDCAPS.dwVSBCKeyCaps |= DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV; if (pVSBCKeyCaps_.Contains(ddckeycaps_srcoverlayoneactive)) fDDCAPS.dwVSBCKeyCaps |= DDCKEYCAPS_SRCOVERLAYONEACTIVE; if (pVSBCKeyCaps_.Contains(ddckeycaps_srcoverlayyuv)) fDDCAPS.dwVSBCKeyCaps |= DDCKEYCAPS_SRCOVERLAYYUV; } // -------------------------------------------------------------------------- // Method: FGetVSBCKeyCaps_Strings() // This method creates and then returns a TStringList containing // the current set of 'VSBCKeyCaps' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDDCaps::FGetVSBCKeyCaps_Strings() { // if the strings have not been allocated if (fVSBCKeyCaps_Strings==NULL) { // attempt to allocate the strings fVSBCKeyCaps_Strings = new TStringList(); // if the allocation failed if (fVSBCKeyCaps_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetVSBCKeyCaps_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various VSBCKeyCaps_Strings" ); return NULL; } } fVSBCKeyCaps_Strings->Clear(); if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_DESTBLT) fVSBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTBLT"); if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_DESTBLTCLRSPACE) fVSBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTBLTCLRSPACE"); if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_DESTBLTCLRSPACEYUV) fVSBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTBLTCLRSPACEYUV"); if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_DESTBLTYUV) fVSBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTBLTYUV"); if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_DESTOVERLAY) fVSBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAY"); if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_DESTOVERLAYCLRSPACE) fVSBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAYCLRSPACE"); if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV) fVSBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV"); if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_DESTOVERLAYONEACTIVE) fVSBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAYONEACTIVE"); if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_DESTOVERLAYYUV) fVSBCKeyCaps_Strings->Add("DDCKEYCAPS_DESTOVERLAYYUV"); if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_NOCOSTOVERLAY) fVSBCKeyCaps_Strings->Add("DDCKEYCAPS_NOCOSTOVERLAY"); if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_SRCBLT) fVSBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCBLT"); if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_SRCBLTCLRSPACE) fVSBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCBLTCLRSPACE"); if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_SRCBLTCLRSPACEYUV) fVSBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCBLTCLRSPACEYUV"); if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_SRCBLTYUV) fVSBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCBLTYUV"); if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_SRCOVERLAY) fVSBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAY"); if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_SRCOVERLAYCLRSPACE) fVSBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAYCLRSPACE"); if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV) fVSBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV"); if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_SRCOVERLAYONEACTIVE) fVSBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAYONEACTIVE"); if (fDDCAPS.dwVSBCKeyCaps & DDCKEYCAPS_SRCOVERLAYYUV) fVSBCKeyCaps_Strings->Add("DDCKEYCAPS_SRCOVERLAYYUV"); return fVSBCKeyCaps_Strings; } // -------------------------------------------------------------------------- // Method: FGetVSBCaps_ // Description: This method returns a TDDCaps_VSBCaps_Set<> of the flags in // the current fDDCAPS.dwVSBCaps. // Note: Wrapper components use the following method to modify flags // via the BCB Object Inspector. // -------------------------------------------------------------------------- TDDCaps_Caps_Set __fastcall TDDCaps::FGetVSBCaps_() { TDDCaps_Caps_Set TempVSBCaps_; TempVSBCaps_.Clear(); if (fDDCAPS.dwVSBCaps & DDCAPS_3D) TempVSBCaps_ = TempVSBCaps_ << ddcaps_3d; if (fDDCAPS.dwVSBCaps & DDCAPS_ALIGNBOUNDARYDEST) TempVSBCaps_ = TempVSBCaps_ << ddcaps_alignboundarydest; if (fDDCAPS.dwVSBCaps & DDCAPS_ALIGNBOUNDARYSRC) TempVSBCaps_ = TempVSBCaps_ << ddcaps_alignboundarysrc; if (fDDCAPS.dwVSBCaps & DDCAPS_ALIGNSIZEDEST) TempVSBCaps_ = TempVSBCaps_ << ddcaps_alignsizedest; if (fDDCAPS.dwVSBCaps & DDCAPS_ALIGNSIZESRC) TempVSBCaps_ = TempVSBCaps_ << ddcaps_alignsizesrc; if (fDDCAPS.dwVSBCaps & DDCAPS_ALIGNSTRIDE) TempVSBCaps_ = TempVSBCaps_ << ddcaps_alignstride; if (fDDCAPS.dwVSBCaps & DDCAPS_ALPHA) TempVSBCaps_ = TempVSBCaps_ << ddcaps_alpha; if (fDDCAPS.dwVSBCaps & DDCAPS_BANKSWITCHED) TempVSBCaps_ = TempVSBCaps_ << ddcaps_bankswitched; if (fDDCAPS.dwVSBCaps & DDCAPS_BLT) TempVSBCaps_ = TempVSBCaps_ << ddcaps_blt; if (fDDCAPS.dwVSBCaps & DDCAPS_BLTCOLORFILL) TempVSBCaps_ = TempVSBCaps_ << ddcaps_bltcolorfill; if (fDDCAPS.dwVSBCaps & DDCAPS_BLTDEPTHFILL) TempVSBCaps_ = TempVSBCaps_ << ddcaps_bltdepthfill; if (fDDCAPS.dwVSBCaps & DDCAPS_BLTFOURCC) TempVSBCaps_ = TempVSBCaps_ << ddcaps_bltfourcc; if (fDDCAPS.dwVSBCaps & DDCAPS_BLTQUEUE) TempVSBCaps_ = TempVSBCaps_ << ddcaps_bltqueue; if (fDDCAPS.dwVSBCaps & DDCAPS_BLTSTRETCH) TempVSBCaps_ = TempVSBCaps_ << ddcaps_bltstretch; if (fDDCAPS.dwVSBCaps & DDCAPS_CANBLTSYSMEM) TempVSBCaps_ = TempVSBCaps_ << ddcaps_canbltsysmem; if (fDDCAPS.dwVSBCaps & DDCAPS_CANCLIP) TempVSBCaps_ = TempVSBCaps_ << ddcaps_canclip; if (fDDCAPS.dwVSBCaps & DDCAPS_CANCLIPSTRETCHED) TempVSBCaps_ = TempVSBCaps_ << ddcaps_canclipstretched; if (fDDCAPS.dwVSBCaps & DDCAPS_COLORKEY) TempVSBCaps_ = TempVSBCaps_ << ddcaps_colorkey; if (fDDCAPS.dwVSBCaps & DDCAPS_COLORKEYHWASSIST) TempVSBCaps_ = TempVSBCaps_ << ddcaps_colorkeyhwassist; if (fDDCAPS.dwVSBCaps & DDCAPS_GDI) TempVSBCaps_ = TempVSBCaps_ << ddcaps_gdi; if (fDDCAPS.dwVSBCaps & DDCAPS_NOHARDWARE) TempVSBCaps_ = TempVSBCaps_ << ddcaps_nohardware; if (fDDCAPS.dwVSBCaps & DDCAPS_OVERLAY) TempVSBCaps_ = TempVSBCaps_ << ddcaps_overlay; if (fDDCAPS.dwVSBCaps & DDCAPS_OVERLAYCANTCLIP) TempVSBCaps_ = TempVSBCaps_ << ddcaps_overlaycantclip; if (fDDCAPS.dwVSBCaps & DDCAPS_OVERLAYFOURCC) TempVSBCaps_ = TempVSBCaps_ << ddcaps_overlayfourcc; if (fDDCAPS.dwVSBCaps & DDCAPS_OVERLAYSTRETCH) TempVSBCaps_ = TempVSBCaps_ << ddcaps_overlaystretch; if (fDDCAPS.dwVSBCaps & DDCAPS_PALETTE) TempVSBCaps_ = TempVSBCaps_ << ddcaps_palette; if (fDDCAPS.dwVSBCaps & DDCAPS_PALETTEVSYNC) TempVSBCaps_ = TempVSBCaps_ << ddcaps_palettevsync; if (fDDCAPS.dwVSBCaps & DDCAPS_READSCANLINE) TempVSBCaps_ = TempVSBCaps_ << ddcaps_readscanline; if (fDDCAPS.dwVSBCaps & DDCAPS_VBI) TempVSBCaps_ = TempVSBCaps_ << ddcaps_vbi; if (fDDCAPS.dwVSBCaps & DDCAPS_ZBLTS) TempVSBCaps_ = TempVSBCaps_ << ddcaps_zblts; if (fDDCAPS.dwVSBCaps & DDCAPS_ZOVERLAYS) TempVSBCaps_ = TempVSBCaps_ << ddcaps_zoverlays; return TempVSBCaps_; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetVSBCaps_( TDDCaps_Caps_Set pVSBCaps_ ) { fDDCAPS.dwVSBCaps = 0; if (pVSBCaps_.Contains(ddcaps_3d)) fDDCAPS.dwVSBCaps |= DDCAPS_3D; if (pVSBCaps_.Contains(ddcaps_alignboundarydest)) fDDCAPS.dwVSBCaps |= DDCAPS_ALIGNBOUNDARYDEST; if (pVSBCaps_.Contains(ddcaps_alignboundarysrc)) fDDCAPS.dwVSBCaps |= DDCAPS_ALIGNBOUNDARYSRC; if (pVSBCaps_.Contains(ddcaps_alignsizedest)) fDDCAPS.dwVSBCaps |= DDCAPS_ALIGNSIZEDEST; if (pVSBCaps_.Contains(ddcaps_alignsizesrc)) fDDCAPS.dwVSBCaps |= DDCAPS_ALIGNSIZESRC; if (pVSBCaps_.Contains(ddcaps_alignstride)) fDDCAPS.dwVSBCaps |= DDCAPS_ALIGNSTRIDE; if (pVSBCaps_.Contains(ddcaps_alpha)) fDDCAPS.dwVSBCaps |= DDCAPS_ALPHA; if (pVSBCaps_.Contains(ddcaps_bankswitched)) fDDCAPS.dwVSBCaps |= DDCAPS_BANKSWITCHED; if (pVSBCaps_.Contains(ddcaps_blt)) fDDCAPS.dwVSBCaps |= DDCAPS_BLT; if (pVSBCaps_.Contains(ddcaps_bltcolorfill)) fDDCAPS.dwVSBCaps |= DDCAPS_BLTCOLORFILL; if (pVSBCaps_.Contains(ddcaps_bltdepthfill)) fDDCAPS.dwVSBCaps |= DDCAPS_BLTDEPTHFILL; if (pVSBCaps_.Contains(ddcaps_bltfourcc)) fDDCAPS.dwVSBCaps |= DDCAPS_BLTFOURCC; if (pVSBCaps_.Contains(ddcaps_bltqueue)) fDDCAPS.dwVSBCaps |= DDCAPS_BLTQUEUE; if (pVSBCaps_.Contains(ddcaps_bltstretch)) fDDCAPS.dwVSBCaps |= DDCAPS_BLTSTRETCH; if (pVSBCaps_.Contains(ddcaps_canbltsysmem)) fDDCAPS.dwVSBCaps |= DDCAPS_CANBLTSYSMEM; if (pVSBCaps_.Contains(ddcaps_canclip)) fDDCAPS.dwVSBCaps |= DDCAPS_CANCLIP; if (pVSBCaps_.Contains(ddcaps_canclipstretched)) fDDCAPS.dwVSBCaps |= DDCAPS_CANCLIPSTRETCHED; if (pVSBCaps_.Contains(ddcaps_colorkey)) fDDCAPS.dwVSBCaps |= DDCAPS_COLORKEY; if (pVSBCaps_.Contains(ddcaps_colorkeyhwassist)) fDDCAPS.dwVSBCaps |= DDCAPS_COLORKEYHWASSIST; if (pVSBCaps_.Contains(ddcaps_gdi)) fDDCAPS.dwVSBCaps |= DDCAPS_GDI; if (pVSBCaps_.Contains(ddcaps_nohardware)) fDDCAPS.dwVSBCaps |= DDCAPS_NOHARDWARE; if (pVSBCaps_.Contains(ddcaps_overlay)) fDDCAPS.dwVSBCaps |= DDCAPS_OVERLAY; if (pVSBCaps_.Contains(ddcaps_overlaycantclip)) fDDCAPS.dwVSBCaps |= DDCAPS_OVERLAYCANTCLIP; if (pVSBCaps_.Contains(ddcaps_overlayfourcc)) fDDCAPS.dwVSBCaps |= DDCAPS_OVERLAYFOURCC; if (pVSBCaps_.Contains(ddcaps_overlaystretch)) fDDCAPS.dwVSBCaps |= DDCAPS_OVERLAYSTRETCH; if (pVSBCaps_.Contains(ddcaps_palette)) fDDCAPS.dwVSBCaps |= DDCAPS_PALETTE; if (pVSBCaps_.Contains(ddcaps_palettevsync)) fDDCAPS.dwVSBCaps |= DDCAPS_PALETTEVSYNC; if (pVSBCaps_.Contains(ddcaps_readscanline)) fDDCAPS.dwVSBCaps |= DDCAPS_READSCANLINE; if (pVSBCaps_.Contains(ddcaps_vbi)) fDDCAPS.dwVSBCaps |= DDCAPS_VBI; if (pVSBCaps_.Contains(ddcaps_zblts)) fDDCAPS.dwVSBCaps |= DDCAPS_ZBLTS; if (pVSBCaps_.Contains(ddcaps_zoverlays)) fDDCAPS.dwVSBCaps |= DDCAPS_ZOVERLAYS; } // -------------------------------------------------------------------------- // Method: FGetVSBCaps_Strings() // This method creates and then returns a TStringList containing // the current set of 'VSBCaps' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDDCaps::FGetVSBCaps_Strings() { // if the strings have not been allocated if (fVSBCaps_Strings==NULL) { // attempt to allocate the strings fVSBCaps_Strings = new TStringList(); // if the allocation failed if (fVSBCaps_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetVSBCaps_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various VSBCaps_Strings" ); return NULL; } } fVSBCaps_Strings->Clear(); if (fDDCAPS.dwVSBCaps & DDCAPS_3D) fVSBCaps_Strings->Add("DDCAPS_3D"); if (fDDCAPS.dwVSBCaps & DDCAPS_ALIGNBOUNDARYDEST) fVSBCaps_Strings->Add("DDCAPS_ALIGNBOUNDARYDEST"); if (fDDCAPS.dwVSBCaps & DDCAPS_ALIGNBOUNDARYSRC) fVSBCaps_Strings->Add("DDCAPS_ALIGNBOUNDARYSRC"); if (fDDCAPS.dwVSBCaps & DDCAPS_ALIGNSIZEDEST) fVSBCaps_Strings->Add("DDCAPS_ALIGNSIZEDEST"); if (fDDCAPS.dwVSBCaps & DDCAPS_ALIGNSIZESRC) fVSBCaps_Strings->Add("DDCAPS_ALIGNSIZESRC"); if (fDDCAPS.dwVSBCaps & DDCAPS_ALIGNSTRIDE) fVSBCaps_Strings->Add("DDCAPS_ALIGNSTRIDE"); if (fDDCAPS.dwVSBCaps & DDCAPS_ALPHA) fVSBCaps_Strings->Add("DDCAPS_ALPHA"); if (fDDCAPS.dwVSBCaps & DDCAPS_BANKSWITCHED) fVSBCaps_Strings->Add("DDCAPS_BANKSWITCHED"); if (fDDCAPS.dwVSBCaps & DDCAPS_BLT) fVSBCaps_Strings->Add("DDCAPS_BLT"); if (fDDCAPS.dwVSBCaps & DDCAPS_BLTCOLORFILL) fVSBCaps_Strings->Add("DDCAPS_BLTCOLORFILL"); if (fDDCAPS.dwVSBCaps & DDCAPS_BLTDEPTHFILL) fVSBCaps_Strings->Add("DDCAPS_BLTDEPTHFILL"); if (fDDCAPS.dwVSBCaps & DDCAPS_BLTFOURCC) fVSBCaps_Strings->Add("DDCAPS_BLTFOURCC"); if (fDDCAPS.dwVSBCaps & DDCAPS_BLTQUEUE) fVSBCaps_Strings->Add("DDCAPS_BLTQUEUE"); if (fDDCAPS.dwVSBCaps & DDCAPS_BLTSTRETCH) fVSBCaps_Strings->Add("DDCAPS_BLTSTRETCH"); if (fDDCAPS.dwVSBCaps & DDCAPS_CANBLTSYSMEM) fVSBCaps_Strings->Add("DDCAPS_CANBLTSYSMEM"); if (fDDCAPS.dwVSBCaps & DDCAPS_CANCLIP) fVSBCaps_Strings->Add("DDCAPS_CANCLIP"); if (fDDCAPS.dwVSBCaps & DDCAPS_CANCLIPSTRETCHED) fVSBCaps_Strings->Add("DDCAPS_CANCLIPSTRETCHED"); if (fDDCAPS.dwVSBCaps & DDCAPS_COLORKEY) fVSBCaps_Strings->Add("DDCAPS_COLORKEY"); if (fDDCAPS.dwVSBCaps & DDCAPS_COLORKEYHWASSIST) fVSBCaps_Strings->Add("DDCAPS_COLORKEYHWASSIST"); if (fDDCAPS.dwVSBCaps & DDCAPS_GDI) fVSBCaps_Strings->Add("DDCAPS_GDI"); if (fDDCAPS.dwVSBCaps & DDCAPS_NOHARDWARE) fVSBCaps_Strings->Add("DDCAPS_NOHARDWARE"); if (fDDCAPS.dwVSBCaps & DDCAPS_OVERLAY) fVSBCaps_Strings->Add("DDCAPS_OVERLAY"); if (fDDCAPS.dwVSBCaps & DDCAPS_OVERLAYCANTCLIP) fVSBCaps_Strings->Add("DDCAPS_OVERLAYCANTCLIP"); if (fDDCAPS.dwVSBCaps & DDCAPS_OVERLAYFOURCC) fVSBCaps_Strings->Add("DDCAPS_OVERLAYFOURCC"); if (fDDCAPS.dwVSBCaps & DDCAPS_OVERLAYSTRETCH) fVSBCaps_Strings->Add("DDCAPS_OVERLAYSTRETCH"); if (fDDCAPS.dwVSBCaps & DDCAPS_PALETTE) fVSBCaps_Strings->Add("DDCAPS_PALETTE"); if (fDDCAPS.dwVSBCaps & DDCAPS_PALETTEVSYNC) fVSBCaps_Strings->Add("DDCAPS_PALETTEVSYNC"); if (fDDCAPS.dwVSBCaps & DDCAPS_READSCANLINE) fVSBCaps_Strings->Add("DDCAPS_READSCANLINE"); if (fDDCAPS.dwVSBCaps & DDCAPS_VBI) fVSBCaps_Strings->Add("DDCAPS_VBI"); if (fDDCAPS.dwVSBCaps & DDCAPS_ZBLTS) fVSBCaps_Strings->Add("DDCAPS_ZBLTS"); if (fDDCAPS.dwVSBCaps & DDCAPS_ZOVERLAYS) fVSBCaps_Strings->Add("DDCAPS_ZOVERLAYS"); return fVSBCaps_Strings; } // -------------------------------------------------------------------------- // Method: FGetVSBFXCaps_ // Description: This method returns a TDDCaps_VSBFXCaps_Set<> of the flags in // the current fDDCAPS.dwVSBFXCaps. // Note: Wrapper components use the following method to modify flags // via the BCB Object Inspector. // -------------------------------------------------------------------------- TDDCaps_FXCaps_Set __fastcall TDDCaps::FGetVSBFXCaps_() { TDDCaps_FXCaps_Set TempVSBFXCaps_; TempVSBFXCaps_.Clear(); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTALPHA) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_bltalpha; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTARITHSTRETCHY) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_bltarithstretchy; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTARITHSTRETCHYN) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_bltarithstretchyn; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTFILTER) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_bltfilter; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTMIRRORLEFTRIGHT) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_bltmirrorleftright; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTMIRRORUPDOWN) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_bltmirrorupdown; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTROTATION) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_bltrotation; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTROTATION90) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_bltrotation90; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTSHRINKX) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_bltshrinkx; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTSHRINKXN) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_bltshrinkxn; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTSHRINKY) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_bltshrinky; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTSHRINKYN) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_bltshrinkyn; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTSTRETCHX) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_bltstretchx; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTSTRETCHXN) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_bltstretchxn; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTSTRETCHY) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_bltstretchy; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTSTRETCHYN) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_bltstretchyn; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYALPHA) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_overlayalpha; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYARITHSTRETCHY) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_overlayarithstretchy; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYARITHSTRETCHYN) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_overlayarithstretchyn; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYFILTER) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_overlayfilter; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYMIRRORLEFTRIGHT) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_overlaymirrorleftright; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYMIRRORUPDOWN) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_overlaymirrorupdown; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYSHRINKX) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_overlayshrinkx; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYSHRINKXN) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_overlayshrinkxn; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYSHRINKY) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_overlayshrinky; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYSHRINKYN) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_overlayshrinkyn; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYSTRETCHX) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_overlaystretchx; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYSTRETCHXN) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_overlaystretchxn; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYSTRETCHY) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_overlaystretchy; if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYSTRETCHYN) TempVSBFXCaps_ = TempVSBFXCaps_ << ddfxcaps_overlaystretchyn; return TempVSBFXCaps_; } // -------------------------------------------------------------------------- void __fastcall TDDCaps::FSetVSBFXCaps_( TDDCaps_FXCaps_Set pVSBFXCaps_ ) { fDDCAPS.dwVSBFXCaps = 0; if (pVSBFXCaps_.Contains(ddfxcaps_bltalpha)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_BLTALPHA; if (pVSBFXCaps_.Contains(ddfxcaps_bltarithstretchy)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_BLTARITHSTRETCHY; if (pVSBFXCaps_.Contains(ddfxcaps_bltarithstretchyn)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_BLTARITHSTRETCHYN; if (pVSBFXCaps_.Contains(ddfxcaps_bltfilter)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_BLTFILTER; if (pVSBFXCaps_.Contains(ddfxcaps_bltmirrorleftright)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_BLTMIRRORLEFTRIGHT; if (pVSBFXCaps_.Contains(ddfxcaps_bltmirrorupdown)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_BLTMIRRORUPDOWN; if (pVSBFXCaps_.Contains(ddfxcaps_bltrotation)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_BLTROTATION; if (pVSBFXCaps_.Contains(ddfxcaps_bltrotation90)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_BLTROTATION90; if (pVSBFXCaps_.Contains(ddfxcaps_bltshrinkx)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_BLTSHRINKX; if (pVSBFXCaps_.Contains(ddfxcaps_bltshrinkxn)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_BLTSHRINKXN; if (pVSBFXCaps_.Contains(ddfxcaps_bltshrinky)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_BLTSHRINKY; if (pVSBFXCaps_.Contains(ddfxcaps_bltshrinkyn)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_BLTSHRINKYN; if (pVSBFXCaps_.Contains(ddfxcaps_bltstretchx)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_BLTSTRETCHX; if (pVSBFXCaps_.Contains(ddfxcaps_bltstretchxn)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_BLTSTRETCHXN; if (pVSBFXCaps_.Contains(ddfxcaps_bltstretchy)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_BLTSTRETCHY; if (pVSBFXCaps_.Contains(ddfxcaps_bltstretchyn)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_BLTSTRETCHYN; if (pVSBFXCaps_.Contains(ddfxcaps_overlayalpha)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_OVERLAYALPHA; if (pVSBFXCaps_.Contains(ddfxcaps_overlayarithstretchy)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_OVERLAYARITHSTRETCHY; if (pVSBFXCaps_.Contains(ddfxcaps_overlayarithstretchyn)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_OVERLAYARITHSTRETCHYN; if (pVSBFXCaps_.Contains(ddfxcaps_overlayfilter)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_OVERLAYFILTER; if (pVSBFXCaps_.Contains(ddfxcaps_overlaymirrorleftright)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_OVERLAYMIRRORLEFTRIGHT; if (pVSBFXCaps_.Contains(ddfxcaps_overlaymirrorupdown)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_OVERLAYMIRRORUPDOWN; if (pVSBFXCaps_.Contains(ddfxcaps_overlayshrinkx)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_OVERLAYSHRINKX; if (pVSBFXCaps_.Contains(ddfxcaps_overlayshrinkxn)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_OVERLAYSHRINKXN; if (pVSBFXCaps_.Contains(ddfxcaps_overlayshrinky)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_OVERLAYSHRINKY; if (pVSBFXCaps_.Contains(ddfxcaps_overlayshrinkyn)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_OVERLAYSHRINKYN; if (pVSBFXCaps_.Contains(ddfxcaps_overlaystretchx)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_OVERLAYSTRETCHX; if (pVSBFXCaps_.Contains(ddfxcaps_overlaystretchxn)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_OVERLAYSTRETCHXN; if (pVSBFXCaps_.Contains(ddfxcaps_overlaystretchy)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_OVERLAYSTRETCHY; if (pVSBFXCaps_.Contains(ddfxcaps_overlaystretchyn)) fDDCAPS.dwVSBFXCaps |= DDFXCAPS_OVERLAYSTRETCHYN; } // -------------------------------------------------------------------------- // Method: FGetVSBFXCaps_Strings() // This method creates and then returns a TStringList containing // the current set of 'VSBFXCaps' flags. // Note: You must manually delete the retrieved TStringList after use // to avoid memory corruption. // -------------------------------------------------------------------------- TStringList* __fastcall TDDCaps::FGetVSBFXCaps_Strings() { // if the strings have not been allocated if (fVSBFXCaps_Strings==NULL) { // attempt to allocate the strings fVSBFXCaps_Strings = new TStringList(); // if the allocation failed if (fVSBFXCaps_Strings==NULL) { fErrorValue = TDX_ERROR; if (FOnError) FOnError(this, "TDDCaps::FGetVSBFXCaps_Strings()", "TDX_ERROR", "Could not allocate memory used to retrieve various VSBFXCaps_Strings" ); return NULL; } } fVSBFXCaps_Strings->Clear(); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTALPHA) fVSBFXCaps_Strings->Add("DDFXCAPS_BLTALPHA"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTARITHSTRETCHY) fVSBFXCaps_Strings->Add("DDFXCAPS_BLTARITHSTRETCHY"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTARITHSTRETCHYN) fVSBFXCaps_Strings->Add("DDFXCAPS_BLTARITHSTRETCHYN"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTFILTER) fVSBFXCaps_Strings->Add("DDFXCAPS_BLTFILTER"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTMIRRORLEFTRIGHT) fVSBFXCaps_Strings->Add("DDFXCAPS_BLTMIRRORLEFTRIGHT"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTMIRRORUPDOWN) fVSBFXCaps_Strings->Add("DDFXCAPS_BLTMIRRORUPDOWN"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTROTATION) fVSBFXCaps_Strings->Add("DDFXCAPS_BLTROTATION"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTROTATION90) fVSBFXCaps_Strings->Add("DDFXCAPS_BLTROTATION90"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTSHRINKX) fVSBFXCaps_Strings->Add("DDFXCAPS_BLTSHRINKX"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTSHRINKXN) fVSBFXCaps_Strings->Add("DDFXCAPS_BLTSHRINKXN"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTSHRINKY) fVSBFXCaps_Strings->Add("DDFXCAPS_BLTSHRINKY"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTSHRINKYN) fVSBFXCaps_Strings->Add("DDFXCAPS_BLTSHRINKYN"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTSTRETCHX) fVSBFXCaps_Strings->Add("DDFXCAPS_BLTSTRETCHX"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTSTRETCHXN) fVSBFXCaps_Strings->Add("DDFXCAPS_BLTSTRETCHXN"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTSTRETCHY) fVSBFXCaps_Strings->Add("DDFXCAPS_BLTSTRETCHY"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_BLTSTRETCHYN) fVSBFXCaps_Strings->Add("DDFXCAPS_BLTSTRETCHYN"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYALPHA) fVSBFXCaps_Strings->Add("DDFXCAPS_OVERLAYALPHA"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYARITHSTRETCHY) fVSBFXCaps_Strings->Add("DDFXCAPS_OVERLAYARITHSTRETCHY"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYARITHSTRETCHYN) fVSBFXCaps_Strings->Add("DDFXCAPS_OVERLAYARITHSTRETCHYN"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYFILTER) fVSBFXCaps_Strings->Add("DDFXCAPS_OVERLAYFILTER"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYMIRRORLEFTRIGHT) fVSBFXCaps_Strings->Add("DDFXCAPS_OVERLAYMIRRORLEFTRIGHT"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYMIRRORUPDOWN) fVSBFXCaps_Strings->Add("DDFXCAPS_OVERLAYMIRRORUPDOWN"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYSHRINKX) fVSBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSHRINKX"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYSHRINKXN) fVSBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSHRINKXN"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYSHRINKY) fVSBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSHRINKY"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYSHRINKYN) fVSBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSHRINKYN"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYSTRETCHX) fVSBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSTRETCHX"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYSTRETCHXN) fVSBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSTRETCHXN"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYSTRETCHY) fVSBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSTRETCHY"); if (fDDCAPS.dwVSBFXCaps & DDFXCAPS_OVERLAYSTRETCHYN) fVSBFXCaps_Strings->Add("DDFXCAPS_OVERLAYSTRETCHYN"); return fVSBFXCaps_Strings; } // --------------------------------------------------------------------------