CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    68

    A little DirectX help

    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


  2. #2
    Join Date
    Jun 1999
    Posts
    25

    Re: A little DirectX help

    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.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured