Jump to content
  • Advertisement

Archived

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

DarkScythe

MFC D3D Woes...

This topic is 5908 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

Hi! I was wondering if anyone could help me? I am attempting to create a D3D level editor using MFC. The only problem I''ve encountered is that D3D resizes itself to take up the whole screen and I cannot seem to fix it! Here''s what I mean: The first screenshot shows the MFC app not using D3D, the second shows the exact MFC app except with D3D enabled! Here''s the splitter code I used: -------------------------------------------------------- if ( !d3dtoolsSplitter.CreateStatic( this, 1, 2 ) ) return FALSE; if ( !d3dtoolsSplitter.CreateView( 0, 0, RUNTIME_CLASS(CToolsPanel), CSize( TOOLPANEL_SIZE, cr.Height() ), pContext ) ) return FALSE; if ( !d3dtoolsSplitter.CreateView( 0, 1, RUNTIME_CLASS(CD3DEngineApp), CSize( cr.Width() - TOOLPANEL_SIZE, cr.Height() ), pContext ) ) return FALSE; -------------------------------------------------------- My D3D params are: d3dpp.Windowed = TRUE; d3dpp.BackBufferFormat = d3ddm.Format; The window handle passed to D3D is AfxGetMainWnd()->m_hWnd.. maybe that''s the problem? But what would I use to just isolate the second part of the splitter and make D3D only draw there?? Thanks for any help you can offer whatsoever..

Share this post


Link to post
Share on other sites
Advertisement
In a Splitter Window, only the Views are splitted, the Window is always the entire Application Window. If you pass CView::GetSafeHwnd() to the Direct3d initialize, you can attach the device to the view you want to.
To access the second view (if you want to) you must set up a second Render chain. (Dont know the D3DX Interface, but there is one)

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!