BCB-Tools.com

Home of
RAD DirectX

C++ Builder wrapping DirectX

...

Please Register

So we can
create more

the TDx_Library
the TDx9_Library



Welcome to BCB-Tools.com Latest News

Development Tools Demo Applications Step-by-Step Tutorials Component Reference

Register Here! Available Downloads

Frequently Asked Questions Discussion Forums Receive emails from BCB-Tools.com Send us some Feedback

Links to other sites Information about the BCB-Tools.com website


    TDx_Draw_Library v1.90 Component Reference

    -= Click to navigate the reference =-

    -= Go to the TDx_DrawSurface description =-   Component: TDX_DRAWSURFACE::LOCK()

    Go to the Welcome Page
    [ TDx_DrawSurface ]     [ next: PageLock() ]     [ prev: LoadFromSurface() ]

    public:
         virtual bool __fastcall Lock( TRect* pDestRect, TDDSurfaceDesc* pSurfaceDesc, dword pFlags );

    If you would like to submit additions or improvements to this page, click: admin@bcb-tools.com.


    DESCRIPTION

    Top     Parameters     See Also

    The TDx_DrawSurface::Lock method will obtain a pointer to the specified portion of surface memory.

    This prevents the system blitter from accessing that particular area of memory.

    Page flipping is prevented until the surface is unlocked using TDx_DrawSurface::Unlock().

    Attempting to blit from a locked region will return errors and GDI blits will silently fail when used on a locked video memory surface.

    Specify DDLOCK_NOSYSLOCK to avoid the Win16Mutex (Win16Lock) being held for non-primary surfaces.

    If the method call fails, the OnError event will be triggered with one of the following values:
    DDERR_INVALIDOBJECT
    DDERR_INVALIDPARAMS
    DDERR_OUTOFMEMORY
    DDERR_SURFACEBUSY
    DDERR_SURFACELOST
    DDERR_WASSTILLDRAWING




    PARAMETERS

    Top     See Also

      DestRect
      The DestRect parameter references a TRect defining the portion of the surface that is to be locked.
      Set this parameter to NULL to lock an entire surface.

      SurfaceDesc
      The SurfaceDesc parameter references a TDDSurfaceDesc component for holding the description of the locked surface if this method returns successfully.

      Flags
      The Flags parameter defines flags indicating the type of lock to be performed.
      The described effect applies when the flag is set.

        DDLOCK_DISCARDCONTENTS
        No assumptions are made about vertex buffer contents during this lock.

        This flag is only used in relation to TDx_3D vertex-buffer locks and is useful when clearing the vertex buffer and filling it with new data.
        TDx_3D or the driver may provide an alternative memory area for the vertex buffer.

        DDLOCK_DONOTWAIT
        Continue with application execution immediately after the lock is attempted without waiting for a return value indicating a successful lock.

        DDLOCK_EVENT
        This flag has not yet been implemented by Microsoft.

        DDLOCK_NOOVERWRITE
        No 3D vertices referred to since the start of the frame or the last lock without this flag are modified during this lock.
        This flag is only used in relation to TDx_3D vertex-buffer locks and is useful when appending data to the vertex buffer.

        DDLOCK_NOSYSLOCK
        Win16Lock will not be taken unless it is unavoidable.
        This flag does not apply when attempting to lock the primary surface.

        DDLOCK_READONLY
        The locked surface will only be read from.

        DDLOCK_SURFACEMEMORYPTR
        A memory pointer to the top of the rectangle specified in the DestRect parameter of this method will be returned.
        Set the DestRect parameter of this method to NULL to return a pointer to the top of the surface.

        DDLOCK_WAIT
        The lock will wait until it can be obtained or an error other than DDERR_WASSTILLDRAWING occurs.

        DDLOCK_WRITEONLY
        The locked surface will only be written to.





    SEE ALSO

    Top     Parameters






























Top

Welcome |  Latest News |  Tools |  Demos |  Tutorials |  Reference |  Register |  Downloads
FAQ |  Forums |  Feedback |  Mailing List |  Links |  Site Information

This page is Copyright © 2008 Darren John Dwyer, Australia. All Rights Reserved.
Borland C++ Builder, CBuilder, etc are Trademarks of Borland Corporation.
DirectX, DirectDraw, Windows, etc are Trademarks of Microsoft Corporation.