Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Is it the code, or something else??

This topic is 5425 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

case WM_CREATE: LPDIRECTDRAWSURFACE7 lpDDSPrimary; LPDIRECTDRAWSURFACE7 lpDDSBack; if(FAILED(DirectDrawCreateEx(0,(LPVOID*)&lpDD,IID_IDirectDraw7,0))) MessageBox(hwnd,"DirectDrawCreateEx","Failed",MB_OK); if(FAILED(lpDD->SetCooperativeLevel(hwnd,DDSCL_FULLSCREEN|DDSCL_EXCLUSIVE|DDSCL_ALLOWREBOOT))) MessageBox(hwnd,"CooperativeLevel","FAiled",MB_OK); if(FAILED(lpDD->SetDisplayMode(800,600,16,0,0))) MessageBox(hwnd,"DisplaySettings","Failed",MB_OK); ZeroMemory(&ddsd,sizeof(ddsd)); ddsd.dwSize=sizeof(ddsd); ddsd.dwFlags=DDSD_CAPS|DDSD_BACKBUFFERCOUNT; ddsd.ddsCaps.dwCaps=DDSCAPS_FLIP|DDSCAPS_COMPLEX|DDSCAPS_PRIMARYSURFACE; ddsd.dwBackBufferCount=1; if(FAILED(lpDD->CreateSurface(&ddsd,&lpDDSPrimary,0))) MessageBox(hwnd,"CreateSurface primary","error",MB_OK); ZeroMemory(&ddscaps,sizeof(ddscaps)); ddscaps.dwCaps=DDSCAPS_BACKBUFFER; if(FAILED(lpDDSPrimary->GetAttachedSurface(&ddscaps,&lpDDSBack))) MessageBox(hwnd,"GetAttachedSurface","error",MB_OK); <<<<<====== ERROR!!! The GetAttachedSurface fails!! why?? IT is´nt the code, right??

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!