Click to See Complete Forum and Search --> : A little DirectX help


Pipe
August 10th, 1999, 05:25 PM
Hello,
I have a backbuffer that is all set up and ready to be flipped to the front but before I do this, I need to place a black border on the left and right side of the screen. About 5% of the screen width on each side. How can I go about doing this.

Thanks,
Pipe

ChaiBot
August 12th, 1999, 12:50 AM
With LPDIRECTDRAWSURFACE4 pointers and the IDirectDrawSurface4 Interface there are
IDirectDrawSurface4::GetDC() and IDirectDrawSurface4::Release() functions you will find useful. The main problem is that this function takes the Win16 Mutex, so DON'T Try to debug into your code between GetDC() and ReleaseDC();

Once you've got a dc you can just draw 2 black rectangles on eather side... I'm sure you can figure this out.

Just make sure that you don't set breakpoints or step into your code between GetDC() and ReleaseDC() or you'll hose the machine.