Click here to Skip to main content
15,561,576 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Inheritance classes Pin
Daniel Pfeffer16-Jul-16 21:45
professionalDaniel Pfeffer16-Jul-16 21:45 
AnswerRe: Inheritance classes Pin
Albin George18-Jul-16 2:14
Albin George18-Jul-16 2:14 
QuestionUnmanaged DLL used by C# WPF app not receiving WM_DEVICECHANGE Pin
Leif Simon Goodwin15-Jul-16 4:07
Leif Simon Goodwin15-Jul-16 4:07 
QuestionRe: Unmanaged DLL used by C# WPF app not receiving WM_DEVICECHANGE Pin
David Crow15-Jul-16 6:59
David Crow15-Jul-16 6:59 
AnswerRe: Unmanaged DLL used by C# WPF app not receiving WM_DEVICECHANGE Pin
Leif Simon Goodwin17-Jul-16 4:11
Leif Simon Goodwin17-Jul-16 4:11 
AnswerSolved Pin
Leif Simon Goodwin17-Jul-16 21:42
Leif Simon Goodwin17-Jul-16 21:42 
QuestionDirectX 9 in code:blocks fails on initD3D Pin
Korowai14-Jul-16 10:10
Korowai14-Jul-16 10:10 
AnswerRe: DirectX 9 in code:blocks fails on initD3D Pin
leon de boer14-Jul-16 19:13
leon de boer14-Jul-16 19:13 
Start with the obvious the line that is supposed to make the screen grey is Render_frame
d3ddev->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(70, 70, 70), 1.0f, 0);

That function actually returns a result which isn't used in your code, so use the return and debug it
HRESULT result = d3ddev->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(70, 70, 70), 1.0f, 0);

Now put a breakpoint on the line and check the result is D3D_OK.

It tells you in the directx9 help for the function

IDirect3DDevice9::Clear will fail if you:

Try to clear either the depth buffer or the stencil buffer of a render target that does not have an attached depth buffer.
Try to clear the stencil buffer when the depth buffer does not contain stencil data.

Creating a Depth Buffer (Direct3D 9) (Windows)[^]
It is noted in your initD3D function it doesn't seem to do that

It is noted in you setup these two lines you appear to be missing
d3dpp.EnableAutoDepthStencil = TRUE;
d3dpp.AutoDepthStencilFormat = D3DFMT_D16;

In vino veritas

GeneralRe: DirectX 9 in code:blocks fails on initD3D Pin
Korowai15-Jul-16 7:04
Korowai15-Jul-16 7:04 
GeneralRe: DirectX 9 in code:blocks fails on initD3D Pin
Korowai1-Aug-16 17:19
Korowai1-Aug-16 17:19 
Questionbehaviour when adding custom buttons to CMFCToolBar with CMFCToolBar::ReplaceButton? Pin
Maximilien13-Jul-16 11:27
Maximilien13-Jul-16 11:27 
QuestionCalling C Function in Dll Causing Problem Pin
Django_Untaken12-Jul-16 5:52
Django_Untaken12-Jul-16 5:52 
SuggestionRe: Calling C Function in Dll Causing Problem Pin
Richard MacCutchan12-Jul-16 6:19
mveRichard MacCutchan12-Jul-16 6:19 
GeneralRe: Calling C Function in Dll Causing Problem Pin
Django_Untaken12-Jul-16 6:27
Django_Untaken12-Jul-16 6:27 
AnswerRe: Calling C Function in Dll Causing Problem Pin
Albert Holguin12-Jul-16 6:59
professionalAlbert Holguin12-Jul-16 6:59 
GeneralRe: Calling C Function in Dll Causing Problem Pin
Django_Untaken12-Jul-16 8:18
Django_Untaken12-Jul-16 8:18 
GeneralRe: Calling C Function in Dll Causing Problem Pin
Albert Holguin13-Jul-16 7:36
professionalAlbert Holguin13-Jul-16 7:36 
GeneralRe: Calling C Function in Dll Causing Problem Pin
mariakatosvich13-Aug-16 3:28
mariakatosvich13-Aug-16 3:28 
GeneralRe: Calling C Function in Dll Causing Problem Pin
Richard MacCutchan12-Jul-16 7:08
mveRichard MacCutchan12-Jul-16 7:08 
QuestionNcPaint and Invalid rect/region Pin
Сергей Шевченко12-Jul-16 3:00
Сергей Шевченко12-Jul-16 3:00 
AnswerRe: NcPaint and Invalid rect/region Pin
leon de boer12-Jul-16 3:33
leon de boer12-Jul-16 3:33 
GeneralRe: NcPaint and Invalid rect/region Pin
Сергей Шевченко12-Jul-16 5:15
Сергей Шевченко12-Jul-16 5:15 
QuestionCalling a method with the pointer to a base class Pin
FriendOfAsherah10-Jul-16 22:11
FriendOfAsherah10-Jul-16 22:11 
AnswerRe: Calling a method with the pointer to a base class Pin
Jochen Arndt10-Jul-16 22:47
professionalJochen Arndt10-Jul-16 22:47 
GeneralRe: Calling a method with the pointer to a base class Pin
FriendOfAsherah10-Jul-16 23:33
FriendOfAsherah10-Jul-16 23:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.