DirectX and MFC
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?
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement