Archived

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

what does this error mean and how do i fix it?

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

Direct3D8: (ERROR) :Neither hDeviceWindow nor Focus window specified. CreateDevice Failed. i''m trying to make an editor and the same init code works perfectly when i initialize the rendering in the main window HWND but when i try to put it in a smalelr window (for one of the 4 views) i get that error. i just created a smaller window with WS_CHILD and WS_VISIBLE but i can''t seem to make it initialize d3d in there without getting that createdevice failed

Share this post


Link to post
Share on other sites
1) Pass the main application window (i.e. the thing which receives Windows messages) as the "hFocusWindow" parameter of CreateDevice().

2) Pass the smaller, child window as the "hDeviceWindow" member of the PRESENT_PARAMETERS.



Also take a look at the samples in the SDK. Look at where the MFC ones pass their handle(s) to D3D (forget the fact that they''re MFC - its the same thing just a different way of expressing it).

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites