CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2008
    Posts
    3

    How do you put direct3d in part of a window?

    I am trying to write a program that uses mainly windows code, but has a small area of the window devoted to direct3d graphics. How would I tell direct3d to only use part of the window? I tried using SetViewPort(), but direct3d drew random garbage in front of the windows stuff. It worked fine in the viewport area, but it put random crap from memory in the rest of the window. Then there was flickering when windows tried unsuccessfully to draw in front of the random crap. Can someone explain a way to have direct3d only put stuff in a part of the window?

  2. #2
    Join Date
    Dec 2003
    Location
    Syracuse, NY
    Posts
    400

    Re: How do you put direct3d in part of a window?

    This kind of a crappy solution but have you tried making a static control and then setting Direct3D's target window to that instead of a whole window?
    "Windows programming is like going to the dentist: You know it's good for you, but no one likes doing it."
    - Andre LaMothe

    DLL For Beginners(UPDATED)
    Please use CODE tags
    Rate me if I've helped.

  3. #3
    Join Date
    Apr 1999
    Posts
    3,585

    Re: How do you put direct3d in part of a window?

    Direct3D can render full screen or to any CWnd object. It does not have to be a static. You should be able to create the CWnd anywhere you want on the screen.
    Gort...Klaatu, Barada Nikto!

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