• Advertisement

Archived

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

DirectX and MFC

This topic is 5496 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
Advertisement
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
www.creative-asylum.com

Share this post


Link to post
Share on other sites
thx
my debug runtimes crash allways when i try tu run any DirectX application so i cant use them :-(

Share this post


Link to post
Share on other sites

  • Advertisement