Overview Members Chapter Previous Next

## CDXSurface::Lock

HRESULT Lock( | ) ;

Locks the surface and provides direct access to the display memory. Should be used before calling graphic functions such as PutPixel, Rect and Line. Remember to call UnLock when you have finished drawing to the display memory. This method will properly restore any lost surfaces when called. This way, ALPHA and SHADOW functions can be safely used with surfaces in video memory.