Skip to main content
GameDev.net gamedev.net
🔒 Locked

Direct Draw again

Started by wingman20 Apr 17, 2001 at 5:24 PM 0 replies 350+ views
Original Post
wingman20
wingman20
hi, i posted a quuestion yesterday, i fixed the problem i had, but then realize that something else is messed up with my code. (i''m new to direct draw, all i''ve done before is direct3d). When my game calls lpdds->GetDC(&hDestDC), it either frezes the game or if i''m debugging the game it prevents the screen from being updated. The computer doesn''t freze, i can shut it down nicely (without toutching the power button) but MSVC stays on the screen after i''ve closed it and began to shut down the compter (using keyboard shortcuts) lpdds is passed as an arguemnt in the function, the function that calls this function uses LPDIRECTDRAWSRFACE7 lpddsOffscreen which is created with the following code: .... ddsd.dwHeight=280; ddsd.dwWidth=320; if(FAILED(lpdd7->CreateSurface(&ddsd, &lpddsOffscreen, NULL))) return E_FAIL; what''s happening
Gav
Gav
Make sure you''ve got a corresponding call to lpdds->ReleaseDC() after each call to lpdds->GetDC(&hDestDC).

Also, you can''t debug code between the GetDC and ReleaseDC calls due to what those functions actually do. Check the DirectX help files.

===========================
No sense being pessimistic. It wouldn''''t work anyway.
===========================There are 10 types of people in the world. Those that understand binary and those that don't.( My views in no way reflect the views of my employer. )

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.