DirectDraw7 save backbuffer to *.bmp file
DirectDraw7 save backbuffer to *.bmp file
DirectDraw7 save backbuffer to *.bmp file
DirectDraw7 save backbuffer to *.bmp file
DirectDraw7 save backbuffer to *.bmp file
DirectDraw7 save backbuffer to *.bmp file DirectDraw7 save backbuffer to *.bmp file DirectDraw7 save backbuffer to *.bmp file DirectDraw7 save backbuffer to *.bmp file DirectDraw7 save backbuffer to *.bmp file DirectDraw7 save backbuffer to *.bmp file DirectDraw7 save backbuffer to *.bmp file DirectDraw7 save backbuffer to *.bmp file
DirectDraw7 save backbuffer to *.bmp file DirectDraw7 save backbuffer to *.bmp file
DirectDraw7 save backbuffer to *.bmp file
Go Back  Xtreme Visual Basic Talk > > > DirectDraw7 save backbuffer to *.bmp file


Reply
 
Thread Tools Display Modes
  #1  
Old 04-24-2008, 07:36 AM
r3adm3 r3adm3 is offline
Freshman
 
Join Date: Aug 2005
Posts: 43
Question DirectDraw7 save backbuffer to *.bmp file


I would want to know how to save a picture/backbuffer with diffrent sprites drawn on to a *.bmp file.

I use directdraw 7.

Code:
' Load the sprite
Sub CreateSprRunnerSurface()

Dim ddsd As DDSURFACEDESC2
ddsd.lFlags = DDSD_CAPS Or DDSD_WIDTH Or DDSD_HEIGHT
ddsd.ddsCaps.lCaps = DDSCAPS_OFFSCREENPLAIN
ddsd.lWidth = sprWidth
ddsd.lHeight = sprHeight
Set surfaceRunner = DirectDraw7Obj.CreateSurfaceFromFile(App.Path & "\Graphic\Runner.bmp", ddsd)

End Sub
Code:
'Paint the sprite
Dim ddResult As Long
Dim SrcRect As RECT
Dim DstRect As RECT

    'what sprite on the loaded picture. This is the top left one.
    SrcRect.Left = 0 
    SrcRect.Right = 32
    SrcRect.Top = 0
    SrcRect.Bottom = 32

    DstRect.Left = *location on image - Width
    DstRect.Right = *location on image 
    DstRect.Top = *location on image - Height
    DstRect.Bottom = *location on image 

ddResult = BackBufferSurface.Blt(DstRect, surfaceRunner, SrcRect, DDBLT_KEYSRC Or DDBLT_WAIT)

Code:
Sub BltScreen()
' Print the graphics to the picture from the backbuffer.
Dim ddResult As Long
    DirectX7Obj.GetWindowRect frmMain.picGUI.hWnd, PrimarySurfaceRect
    ddResult = PrimarySurface.Blt(PrimarySurfaceRect, BackBufferSurface, BackBufferRect, DDBLT_WAIT)
End Sub
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
DirectDraw7 save backbuffer to *.bmp file
DirectDraw7 save backbuffer to *.bmp file
DirectDraw7 save backbuffer to *.bmp file DirectDraw7 save backbuffer to *.bmp file
DirectDraw7 save backbuffer to *.bmp file
DirectDraw7 save backbuffer to *.bmp file
DirectDraw7 save backbuffer to *.bmp file DirectDraw7 save backbuffer to *.bmp file DirectDraw7 save backbuffer to *.bmp file DirectDraw7 save backbuffer to *.bmp file DirectDraw7 save backbuffer to *.bmp file DirectDraw7 save backbuffer to *.bmp file DirectDraw7 save backbuffer to *.bmp file
DirectDraw7 save backbuffer to *.bmp file
DirectDraw7 save backbuffer to *.bmp file
 
DirectDraw7 save backbuffer to *.bmp file
DirectDraw7 save backbuffer to *.bmp file
 
-->