![]() |
DDraw + Fenster
Was muss ich tun damit DDraw nur in meinem Fenster abläuft und nicht auf dem ganzen Bildschirm?
Code:
var MyDirectDraw: IDirectDraw; MySurface: IDirectDrawSurface; MyDesc: DDSurfaceDesc; function INIT(MyWindow: HWND): LongInt; stdcall; begin Result:=DirectDrawCreate(NIL,MyDirectDRaw,NIL); Result:=MyDirectDraw.SetCooperativeLevel(MyWindow,DDSCL_NORMAL); // Result:=MyDirectDraw.SetDisplayMode(640,480,8); Result:=MyDirectDraw.SetDisplayMode(320,240,8); FillChar(MyDesc,sizeof(MyDesc),0); MyDesc.dwSize:=sizeof(MyDesc); MyDesc.dwFlags:=DDSD_CAPS or DDSD_WIDTH or DDSD_HEIGHT; MyDesc.dwHeight:=100; MyDesc.dwWidth:=100; MyDesc.ddsCaps.dwCaps:=DDSCAPS_3DDEVICE or DDSCAPS_OFFSCREENPLAIN or DDSCAPS_VIDEOMEMORY; Result:=MyDirectDraw.CreateSurface(MyDesc,MySurface,Nil); // Result:=MyDirectDraw.CreateSurface(MyDesc,MySurface,Nil); end; Danke Mfg TheBender |
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:30 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz