Jump to content
  • Advertisement


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


DirectX and MFC

This topic is 5766 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 want to render in a splitterwindow so i derived a class from CWnd put my 3DClass in it which create a D3DDevice from the HWND of CWnd but if i call render (render just clears the screen with a special color) the render window shows no effect. does anyone know how i have to initialize the Cwnd for working with directX?

Share this post

Link to post
Share on other sites
Take a close look at the MFCFog sample in the DirectX SDK - make sure you are using GetSafeHWND and getting the HWND for the actual place you expect to render. Also pass the pane for the device window and the main application window that recieves messages for the focus window. IIRC it''s important that the focus window is a top level window (i.e. not a pane etc).

Also remember to use the debug version of DirectX with the output levels in the control panel turned up - the debug output often tells you why an application isn''t doing what you expect 99% of the time.

Also confirm that it isn''t simply an error with your viewing parameters - try setting a noticable colour when you call Clear() to see if D3D has touched the window at all.

Simon O''Connor
Creative Asylum Ltd

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!